Merged
Conversation
- Add support for linting specific files and directories via arguments - Implement smart file type detection (Python, YAML, JSON, Markdown, TOML) - Add convenience targets: lint-quick, lint-fix, lint-smart - Add git integration: lint-changed, lint-staged, pre-commit hooks - Fix TARGET variable parsing for multiple directories - Remove duplicate lint-changed target definitions - Add dummy targets to prevent 'No rule to make target' errors Usage: - make lint filename.py (single file) - make lint dirname/ (directory) - make lint-quick filename.py (fast linters only) - make lint-changed (git changed files) Resolves: 'mcpgateway tests is not a Python file or directory' error Fixes: Duplicate target override warnings Implements: All requirements from file-specific linting chore
- Fix gateway initialization failure with multi-header authentication by properly encoding header dictionaries before passing to _initialize_gateway() - Fix error formatter IndexError when validation errors have empty location tuples - Fix GatewayRead model to support multiple authentication headers instead of requiring exactly one Resolves issue IBM#526 - multi-header authentication support
- Add dynamic multi-header UI with add/remove functionality - Update backend validation to accept auth_headers array - Maintain backward compatibility with single header format - Add comprehensive tests and documentation - Handle edge cases (duplicates, validation, limits) Fixes IBM#526
…_headers is an empty list
Signed-off-by: Manav Gupta <manavg@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
899e0b3 to
c2d1b29
Compare
crivetimihai
approved these changes
Aug 9, 2025
Member
crivetimihai
left a comment
There was a problem hiding this comment.
The branch has been updated with:
- ✅ Rebased onto main
- ✅ Multi-header authentication feature implemented
- ✅ All linting and formatting applied
- ✅ Pylint score: 10.00/10
- ✅ All tests passing: 1397 passed, 10 skipped
- ✅ JavaScript formatting fixes applied
- ✅ Test configuration issues resolved
vk-playground
pushed a commit
to vk-playground/mcp-context-forge
that referenced
this pull request
Sep 14, 2025
* feat(makefile): add comprehensive file-specific linting support - Add support for linting specific files and directories via arguments - Implement smart file type detection (Python, YAML, JSON, Markdown, TOML) - Add convenience targets: lint-quick, lint-fix, lint-smart - Add git integration: lint-changed, lint-staged, pre-commit hooks - Fix TARGET variable parsing for multiple directories - Remove duplicate lint-changed target definitions - Add dummy targets to prevent 'No rule to make target' errors Usage: - make lint filename.py (single file) - make lint dirname/ (directory) - make lint-quick filename.py (fast linters only) - make lint-changed (git changed files) Resolves: 'mcpgateway tests is not a Python file or directory' error Fixes: Duplicate target override warnings Implements: All requirements from file-specific linting chore * fix: resolve multiple authentication headers and validation issues - Fix gateway initialization failure with multi-header authentication by properly encoding header dictionaries before passing to _initialize_gateway() - Fix error formatter IndexError when validation errors have empty location tuples - Fix GatewayRead model to support multiple authentication headers instead of requiring exactly one Resolves issue IBM#526 - multi-header authentication support * feat: support multiple custom authentication headers for MCP gateways - Add dynamic multi-header UI with add/remove functionality - Update backend validation to accept auth_headers array - Maintain backward compatibility with single header format - Add comprehensive tests and documentation - Handle edge cases (duplicates, validation, limits) Fixes IBM#526 * fix: updated test assertion to match the updated validation when auth_headers is an empty list * updated files with linter formatting Signed-off-by: Manav Gupta <manavg@gmail.com> * Rebase, lint and revert Makefile changes Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * Rebase, lint and revert Makefile changes Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * Rebase, lint and revert Makefile changes Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: Manav Gupta <manavg@gmail.com> Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Co-authored-by: Mihai Criveti <crivetimihai@gmail.com>
vk-playground
pushed a commit
to vk-playground/mcp-context-forge
that referenced
this pull request
Sep 14, 2025
* feat(makefile): add comprehensive file-specific linting support - Add support for linting specific files and directories via arguments - Implement smart file type detection (Python, YAML, JSON, Markdown, TOML) - Add convenience targets: lint-quick, lint-fix, lint-smart - Add git integration: lint-changed, lint-staged, pre-commit hooks - Fix TARGET variable parsing for multiple directories - Remove duplicate lint-changed target definitions - Add dummy targets to prevent 'No rule to make target' errors Usage: - make lint filename.py (single file) - make lint dirname/ (directory) - make lint-quick filename.py (fast linters only) - make lint-changed (git changed files) Resolves: 'mcpgateway tests is not a Python file or directory' error Fixes: Duplicate target override warnings Implements: All requirements from file-specific linting chore * fix: resolve multiple authentication headers and validation issues - Fix gateway initialization failure with multi-header authentication by properly encoding header dictionaries before passing to _initialize_gateway() - Fix error formatter IndexError when validation errors have empty location tuples - Fix GatewayRead model to support multiple authentication headers instead of requiring exactly one Resolves issue IBM#526 - multi-header authentication support * feat: support multiple custom authentication headers for MCP gateways - Add dynamic multi-header UI with add/remove functionality - Update backend validation to accept auth_headers array - Maintain backward compatibility with single header format - Add comprehensive tests and documentation - Handle edge cases (duplicates, validation, limits) Fixes IBM#526 * fix: updated test assertion to match the updated validation when auth_headers is an empty list * updated files with linter formatting Signed-off-by: Manav Gupta <manavg@gmail.com> * Rebase, lint and revert Makefile changes Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * Rebase, lint and revert Makefile changes Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * Rebase, lint and revert Makefile changes Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: Manav Gupta <manavg@gmail.com> Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Co-authored-by: Mihai Criveti <crivetimihai@gmail.com>
vk-playground
pushed a commit
to vk-playground/mcp-context-forge
that referenced
this pull request
Sep 16, 2025
* feat(makefile): add comprehensive file-specific linting support - Add support for linting specific files and directories via arguments - Implement smart file type detection (Python, YAML, JSON, Markdown, TOML) - Add convenience targets: lint-quick, lint-fix, lint-smart - Add git integration: lint-changed, lint-staged, pre-commit hooks - Fix TARGET variable parsing for multiple directories - Remove duplicate lint-changed target definitions - Add dummy targets to prevent 'No rule to make target' errors Usage: - make lint filename.py (single file) - make lint dirname/ (directory) - make lint-quick filename.py (fast linters only) - make lint-changed (git changed files) Resolves: 'mcpgateway tests is not a Python file or directory' error Fixes: Duplicate target override warnings Implements: All requirements from file-specific linting chore * fix: resolve multiple authentication headers and validation issues - Fix gateway initialization failure with multi-header authentication by properly encoding header dictionaries before passing to _initialize_gateway() - Fix error formatter IndexError when validation errors have empty location tuples - Fix GatewayRead model to support multiple authentication headers instead of requiring exactly one Resolves issue IBM#526 - multi-header authentication support * feat: support multiple custom authentication headers for MCP gateways - Add dynamic multi-header UI with add/remove functionality - Update backend validation to accept auth_headers array - Maintain backward compatibility with single header format - Add comprehensive tests and documentation - Handle edge cases (duplicates, validation, limits) Fixes IBM#526 * fix: updated test assertion to match the updated validation when auth_headers is an empty list * updated files with linter formatting Signed-off-by: Manav Gupta <manavg@gmail.com> * Rebase, lint and revert Makefile changes Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * Rebase, lint and revert Makefile changes Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * Rebase, lint and revert Makefile changes Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: Manav Gupta <manavg@gmail.com> Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Co-authored-by: Mihai Criveti <crivetimihai@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #526
Modified Files (6):
- Updated validation logic for multi-header support
- Added edge case handling (duplicate keys, header validation, limits)
- Maintains backward compatibility
- Updated admin_add_gateway and admin_edit_gateway functions
- Added JSON parsing for auth_headers field
- Added passthrough headers handling
- Added multi-header management functions
- Added validation and edge case handling
- Added duplicate key detection
- Replaced single header inputs with dynamic multi-header interface
- Added containers and hidden JSON fields
- Fixed authentication encoding issue (early in session)
- Added encode_auth import
Created Files (3):
- Comprehensive test suite with 14 test cases
- Tests for validation, edge cases, backward compatibility
- Complete documentation for the feature
- Usage examples, troubleshooting, best practices
- Database migration script (though not needed as we reused existing field)