Skip to content

[release-1.7] fix: Add test case deploying an Orchestrator-flavored instance with a user provided npmrc secret [RHDHBUGS-1893] (#195) - #197

Merged
rm3l merged 1 commit into
redhat-developer:release-1.7from
rm3l:cherry-pick/release-1.7/rhdhbugs-1893-tech-debt-helm-add-test-case-deploying-orchestrator-flavored-rhdh-with-user-provided-npmrc-secret-to-prevent-future-regression-on-this-scenario
Jul 21, 2025
Merged

[release-1.7] fix: Add test case deploying an Orchestrator-flavored instance with a user provided npmrc secret [RHDHBUGS-1893] (#195)#197
rm3l merged 1 commit into
redhat-developer:release-1.7from
rm3l:cherry-pick/release-1.7/rhdhbugs-1893-tech-debt-helm-add-test-case-deploying-orchestrator-flavored-rhdh-with-user-provided-npmrc-secret-to-prevent-future-regression-on-this-scenario

Conversation

@rm3l

@rm3l rm3l commented Jul 21, 2025

Copy link
Copy Markdown
Member

Description of the change

Manual cherry-pick of #195 (comment)

Which issue(s) does this PR fix or relate to

Fixes https://issues.redhat.com/browse/RHDHBUGS-1893

How to test changes / Special notes to the reviewer

Checklist

  • For each Chart updated, version bumped in the corresponding Chart.yaml according to Semantic Versioning.
  • For each Chart updated, variables are documented in the values.yaml and added to the corresponding README.md. The pre-commit utility can be used to generate the necessary content. Use pre-commit run -a to apply changes. The pre-commit Workflow will do this automatically for you if needed.
  • JSON Schema template updated and re-generated the raw schema via the pre-commit hook.
  • Tests pass using the Chart Testing tool and the ct lint command.
  • If you updated the orchestrator-infra chart, make sure the versions of the Knative CRDs are aligned with the versions of the CRDs installed by the OpenShift Serverless operators declared in the values.yaml file. See Installing Knative Eventing and Knative Serving CRDs for more details.

Summary by Sourcery

Enable injecting a user-provided .npmrc secret for dynamic plugins in helm test workflows and update chart version and documentation accordingly

Enhancements:

  • Add injectTestNpmrcSecret flag in values.yaml to toggle injecting a fake dynamic plugins npmrc secret during helm tests
  • Provide a new test-secret.yaml Helm hook template to generate a dynamic plugins .npmrc Secret in pre-install and pre-upgrade hooks when testing
  • Introduce a CI-specific values file that enables orchestrator mode, dynamic plugins, and npmrc injection for automated test deployments

Documentation:

  • Update README.md badge and document the new injectTestNpmrcSecret option

Chores:

  • Bump backstage chart version to 4.4.3

… 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>
@sourcery-ai

sourcery-ai Bot commented Jul 21, 2025

Copy link
Copy Markdown

Reviewer's Guide

This PR backports a new test-only option to inject a user-provided npmrc secret into an Orchestrator-flavored Backstage deployment, bumps the chart version, and adds supporting CI values and a Helm test secret template.

Entity relationship diagram for test configuration changes

erDiagram
    TEST {
      bool enabled
      object image
      bool injectTestNpmrcSecret
    }
    IMAGE {
      string registry
      string repository
      string tag
    }
    TEST ||--o{ IMAGE : uses
Loading

Class diagram for test configuration and secret injection

classDiagram
    class TestConfig {
      +bool enabled
      +ImageConfig image
      +bool injectTestNpmrcSecret
    }
    class ImageConfig {
      +string registry
      +string repository
      +string tag
    }
    class OrchestratorConfig {
      +bool enabled
    }
    class SecretTemplate {
      <<new>>
      +string npmrcSecret
    }
    TestConfig --> ImageConfig
    TestConfig --> SecretTemplate : injects when injectTestNpmrcSecret==true
    OrchestratorConfig <.. TestConfig : tested with
Loading

File-Level Changes

Change Details Files
Introduce injectTestNpmrcSecret flag for test deployments
  • Add injectTestNpmrcSecret default in values.yaml
  • Document new flag in README.md alongside existing test options
charts/backstage/values.yaml
charts/backstage/README.md
Bump chart version to 4.4.3
  • Increment version in Chart.yaml
  • Update version badge in README.md
charts/backstage/Chart.yaml
charts/backstage/README.md
Add CI sample values file for orchestrator with dynamic plugins and npmrc injection
  • Create with-orchestrator-and-dynamic-plugins-npmrc-values.yaml
  • Enable orchestrator, dynamic plugins and set injectTestNpmrcSecret: true
charts/backstage/ci/with-orchestrator-and-dynamic-plugins-npmrc-values.yaml
Add Helm template to generate a test-only npmrc Secret
  • Create conditional Secret resource activated by the new flag
  • Use Helm hooks to inject before install/upgrade with static npmrc data
charts/backstage/templates/tests/test-secret.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sonarqubecloud

Copy link
Copy Markdown

@rm3l rm3l added the lgtm label Jul 21, 2025
@rm3l
rm3l enabled auto-merge (squash) July 21, 2025 14:47
@rm3l
rm3l merged commit 45f7b11 into redhat-developer:release-1.7 Jul 21, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant