[Misc] Enhance template handling during build#103
Draft
anirudhprasad-sap wants to merge 8 commits into
Draft
Conversation
… add test for user-defined custom templates
…n in CapOperatorBuildPlugin
… improve user-defined template support and logging
…pOperatorBuildPlugin
…uildPlugin and update template handling logic
Contributor
There was a problem hiding this comment.
The PR introduces a meaningful enhancement to template handling, but there are several substantive issues: the missing isConfigurableTemplateChart argument to getHelperTpl is a functional regression for configurable-template charts, the readdir loop doesn't filter out subdirectories, and the double-invocation of generator functions should be addressed for correctness and efficiency. The test suite also needs better isolation to avoid stale gen/ output causing false positives.
PR Bot Information
Version: 1.20.51
- LLM:
anthropic--claude-4.6-sonnet - Event Trigger:
pull_request.opened - File Content Strategy: Full file content
- Correlation ID:
cf9fa3e5-1d1f-4727-81d6-5453242bb5fd
Co-authored-by: hyperspace-insights[bot] <209611008+hyperspace-insights[bot]@users.noreply.github.com>
…orBuildPlugin and update tests for nested templates
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.
Enhance Template Handling During Build
New Feature
✨ Improved the
cds buildprocess to give developers more control over Helm chart templates. Instead of blindly overriding or skipping plugin-generated templates, the build now intelligently handles user-provided templates inchart/templates/:_helpers.tpl,domain.yaml,cap-operator-cros.yaml,service-binding.yaml,service-instance.yaml), the user's version is used and a warning message is printed indicating the override.chart/templates/that are not known plugin templates are copied alongside the standard templates.build()method for better observability.Changes
lib/build.js: RefactoredcopyTemplates()to usestaticEntry/generatedEntryhelpers that model each known template. The method now compares user-provided templates against plugin defaults, logs appropriate messages, and copies extra user-defined files. Also addedgetConfigurableCapOpCroYamlandisConfigurableTemplateChartimports, andfsmodule for directory reading.README.md: Added documentation clarifying how custom files inchart/templatesare handled duringcds build— distinguishing between same-name overrides and additional files.test/build.test.js: Added a new test case verifying that custom user-defined templates are copied into the generated chart while all standard plugin templates are still present. Updated an existing test: a deleted_helpers.tplin--with-templatesmode now correctly expects the plugin to regenerate it (changed assertion fromfalsetotrue).PR Bot Information
Version:
1.20.5162a616a2-736d-49c8-a01d-93e26f565dc9issue_comment.edited