fix: Add test case deploying an Orchestrator-flavored instance with a user provided npmrc secret [RHDHBUGS-1893] - #195
Conversation
Reviewer's GuideIntroduce a test-only dynamic plugins npmrc secret injection in Helm tests to prevent secret conflicts when deploying an Orchestrator-flavored Backstage instance, bump the chart version to 4.5.1, update documentation, and include a sample CI values file for this scenario. Entity relationship diagram for test-only npmrc Secret injectionerDiagram
TEST_CONFIG ||--o{ TEST_SECRET : injects
TEST_SECRET {
bool injectTestNpmrcSecret
}
TEST_CONFIG {
bool enabled
string imageRegistry
string imageRepository
string imageTag
bool injectTestNpmrcSecret
}
Class diagram for the new test.injectTestNpmrcSecret Helm valueclassDiagram
class TestConfig {
+bool enabled
+ImageConfig image
+bool injectTestNpmrcSecret
}
class ImageConfig {
+string registry
+string repository
+string tag
}
TestConfig --> ImageConfig
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
/cherry-pick release-1.7 |
|
@rm3l: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
3e8f819 to
ebda649
Compare
ebda649 to
f7a0a73
Compare
There was a problem hiding this comment.
Hey @rm3l - I've reviewed your changes - here's some feedback:
- Consider adding a helm.sh/hook-delete-policy annotation to the test-secret hook so it cleans up between runs and avoids secret conflicts on upgrades.
- Add a reference to the new CI example values file (with-orchestrator-and-dynamic-plugins-npmrc-values.yaml) in the chart README so users can easily find and use it.
- Verify that the chart's JSON schema has been updated to include the new test.injectTestNpmrcSecret field for proper validation.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider adding a helm.sh/hook-delete-policy annotation to the test-secret hook so it cleans up between runs and avoids secret conflicts on upgrades.
- Add a reference to the new CI example values file (with-orchestrator-and-dynamic-plugins-npmrc-values.yaml) in the chart README so users can easily find and use it.
- Verify that the chart's JSON schema has been updated to include the new test.injectTestNpmrcSecret field for proper validation.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
… pre-install/pre-upgrade hook This is to simulate a user creating their external npmrc Secret Doing it this way because the secret name is dynamic and depends on the release name
…ew test.injectTestNpmrcSecret field for proper validation
f7a0a73 to
34dd5d8
Compare
No need. If no hook deletion policy annotation is specified, the
Not needed. All CI values are located under a standard directory.
Done in |
Co-authored-by: rm3l <rm3l@users.noreply.github.com>
|
|
|
|
@rm3l: #195 failed to apply on top of branch "release-1.7": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
… user provided npmrc secret [RHDHBUGS-1893] (redhat-developer#195) Co-authored-by: rm3l <rm3l@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
… user provided npmrc secret [RHDHBUGS-1893] (#195) (#197) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>



Description of the change
This is a follow-up to #186. It tries to prevent future regression on this by testing this scenario.
Which issue(s) does this PR fix or relate to
How to test changes / Special notes to the reviewer
Without the changes in #186, deploying with the
charts/backstage/ci/with-orchestrator-and-dynamic-plugins-npmrc-values.yamlvalues file fails (as expected) with the following error:With the changes in #186, it passes.
Checklist
Chart.yamlaccording to Semantic Versioning.values.yamland added to the corresponding README.md. The pre-commit utility can be used to generate the necessary content. Usepre-commit run -ato apply changes. The pre-commit Workflow will do this automatically for you if needed.pre-commithook.ct lintcommand.Summary by Sourcery
Enable injection of a test-only dynamic plugins npmrc Secret in Helm tests to fix secret conflict regressions, bump the chart version, update documentation, and add an example values file for orchestrator scenarios.
New Features:
Bug Fixes:
Enhancements:
Build:
Documentation:
Summary by Sourcery
Enable test-only injection of a dynamic plugins npmrc Secret to prevent Helm test failures when deploying orchestrator-flavored Backstage instances under user-provided npmrc scenarios, bump the chart version, document the new option, and supply an example values file.
New Features:
Bug Fixes:
Enhancements:
Build:
Documentation:
Tests: