Support additional okteto manifest filename patterns#287
Merged
rberrelleza merged 5 commits intomainfrom Mar 5, 2026
Merged
Conversation
8192530 to
3811096
Compare
Expand manifest file discovery to include: - okteto-*.yml, okteto-*.yaml (e.g., okteto-stack.yml) - okteto.*.yml, okteto.*.yaml (e.g., okteto.dev.yml, okteto.prod.yaml) For deploy commands, any file matching these patterns is now supported. For up commands, only exact matches (okteto.yml, okteto.yaml, docker-compose.yml, docker-compose.yaml) are allowed. Updated glob pattern and added pattern matching logic to filter appropriately based on command type. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Refactored pattern matching logic into exported isManifestSupported function
for better testability.
New test coverage (14 tests, +27% increase):
- Deploy command patterns (allowPatterns=true)
- Exact matches from supported list
- okteto-*.{yml,yaml} patterns
- okteto.*.{yml,yaml} patterns
- Rejection of non-matching files
- Edge cases with multiple dots/dashes
- Up command patterns (allowPatterns=false)
- Exact matches only
- Rejection of all pattern-based files
- Case sensitivity validation
- Empty and invalid input handling
Test results:
- 66 unit tests passing (was 52)
- 10 E2E tests passing
- Extension packages successfully (1.61 MB)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updated documentation: - CHANGELOG.md: Added feature description and updated test count - docs/manifest-patterns.md: New comprehensive guide covering: - All supported patterns and use cases - Command-specific behavior (Up vs Deploy) - Examples and best practices - Troubleshooting guide - Migration guide - docs/index.md: Added link to manifest patterns documentation - README.md: Added supported manifest files section - TESTING.md: Added test cases for custom manifest patterns Documentation covers: - Pattern matching rules (okteto-*.yml, okteto.*.yml) - Differences between Up and Deploy commands - Use cases (environment-specific, feature branches, components) - Multiple manifest handling - Best practices and troubleshooting Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
All Okteto commands (Up, Deploy, Destroy, Test) now support the same
manifest patterns, removing previous restrictions on the Up command.
Changes:
- Removed allowPatterns parameter from isManifestSupported()
- All commands now accept okteto-*.{yml,yaml} and okteto.*.{yml,yaml} patterns
- Enables using environment-specific manifests (okteto.dev.yml) with Up command
- Simplified code and unified behavior across all commands
Updated tests (63 passing):
- Reorganized test cases to reflect unified behavior
- All pattern tests now verify support across all command types
- Removed command-specific filtering tests
Updated documentation:
- CHANGELOG.md: Updated feature description
- docs/manifest-patterns.md: Removed Up command restrictions
- README.md: Clarified all commands support all patterns
- TESTING.md: Updated test cases for unified behavior
Benefits:
- Simpler mental model - one set of rules for all commands
- More flexible workflows - use custom patterns with any command
- Consistent user experience across extension
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
3811096 to
e3d43cc
Compare
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.
Summary
Expands manifest file discovery to support additional naming patterns for Okteto manifests.
Changes
New Supported Patterns
In addition to the existing patterns, the extension now recognizes:
Previously supported:
okteto.yml,okteto.yamldocker-compose.yml,docker-compose.yamlokteto-pipeline.yml,okteto-pipeline.yamlNow also supported:
okteto-*.yml,okteto-*.yaml(e.g.,okteto-stack.yml,okteto-compose.yaml)okteto.*.yml,okteto.*.yaml(e.g.,okteto.dev.yml,okteto.prod.yaml)Implementation
Updated glob pattern:
'**/{okteto,docker-compose,okteto-*,okteto.*}.{yml,yaml}'Smart filtering:
okteto.deploy,okteto.destroy,okteto.test): Accept all matching patternsokteto.up): Only accept exact matches (okteto.yml, docker-compose.yml) - no pipeline or custom variantsPattern matching logic:
Use Cases
This change enables:
okteto.dev.yml,okteto.staging.yml,okteto.us-west.ymlokteto.feature-auth.yml,okteto.feature-api.ymlokteto.local.yaml,okteto.test.yamlTesting
All existing tests pass:
Backward Compatibility
✅ Fully backward compatible - all previously supported filenames continue to work exactly as before.
🤖 Generated with Claude Code