SMC-13: Add CI pipeline for openshift/ocp-secrets-management-console#80190
Conversation
Onboard the OCP Secrets Management Console plugin to OpenShift CI with presubmit jobs that run on every PR to the main branch: - unit: Jest unit tests (103 tests across 6 suites) - operator-unit: Go operator tests (controller, reconciler) - lint: ESLint + stylelint checks - frontend: i18n validation via test-frontend.sh - images: Dockerfile build verification The build root is sourced from the repository's .ci-operator.yaml (nodejs-18 image). A Go builder base image is pulled for operator tests. No promotion or release integration is configured at this stage since this is the initial CI onboarding. Co-authored-by: Cursor <cursoragent@cursor.com>
WalkthroughAdds a ci-operator job for ocp-secrets-management-console (builder image, build root, image mapping, resources), a three-entry test matrix (unit, operator-unit, frontend), zz_generated_metadata, and updates OWNERS to add two approvers. Changesocp-secrets-management-console CI Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/pj-rehearse |
|
@sarthakpurohit: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ci-operator/config/openshift/ocp-secrets-management-console/openshift-ocp-secrets-management-console-main.yaml (1)
35-40: 💤 Low valueConsider using a dynamic path for
safe.directoryconfig.The hardcoded path
/go/src/github.com/openshift/ocp-secrets-management-consoleworks but reduces portability. Consider using a dynamic reference:- as: frontend commands: | - git config --global --add safe.directory /go/src/github.com/openshift/ocp-secrets-management-console + git config --global --add safe.directory "$(pwd)" ./test-frontend.sh container: from: srcThis makes the config more resilient to changes in ci-operator's checkout path structure.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ci-operator/config/openshift/ocp-secrets-management-console/openshift-ocp-secrets-management-console-main.yaml` around lines 35 - 40, Replace the hardcoded safe.directory path in the commands block with a dynamic runtime path: change the git config --global --add safe.directory entry to use the current working directory (e.g., $(pwd) or $PWD) so the command in the commands block sets safe.directory to the container's actual checkout location when running ./test-frontend.sh; update the commands block accordingly where safe.directory is referenced.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@ci-operator/config/openshift/ocp-secrets-management-console/openshift-ocp-secrets-management-console-main.yaml`:
- Around line 35-40: Replace the hardcoded safe.directory path in the commands
block with a dynamic runtime path: change the git config --global --add
safe.directory entry to use the current working directory (e.g., $(pwd) or $PWD)
so the command in the commands block sets safe.directory to the container's
actual checkout location when running ./test-frontend.sh; update the commands
block accordingly where safe.directory is referenced.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 12c3b535-a4ce-4762-9589-f044497b31ae
⛔ Files ignored due to path filters (1)
ci-operator/jobs/openshift/ocp-secrets-management-console/openshift-ocp-secrets-management-console-main-presubmits.yamlis excluded by!ci-operator/jobs/**
📒 Files selected for processing (2)
ci-operator/config/openshift/ocp-secrets-management-console/OWNERSci-operator/config/openshift/ocp-secrets-management-console/openshift-ocp-secrets-management-console-main.yaml
- Replace from_repository (.ci-operator.yaml references non-existent openshift/nodejs-18:latest) with the proven tectonic-console-builder-v29 image used by all other console plugins - Unset GOFLAGS in operator-unit to avoid -mod=vendor conflict when installing controller-gen via go install Co-authored-by: Cursor <cursoragent@cursor.com>
|
/pj-rehearse |
|
@sarthakpurohit: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
- Use ci/console-plugin-test-cypress:node22 as build root (same image used by openshift/console-plugin-template; provides Node 22 which satisfies the Node 20+ requirement after upstream Dockerfile upgrade) - Remove lint job: pre-existing ESLint config failure on main (typescript-eslint parserOptions not set for integration-tests/) - Add yarn install before test-frontend.sh in frontend job - All changes verified locally: - make plugin-test: 6 suites, 103 tests PASS - make operator-test: Go tests PASS (59.8% coverage) - make plugin-lint: FAIL (pre-existing, confirmed) Co-authored-by: Cursor <cursoragent@cursor.com>
|
/pj-rehearse |
|
@sarthakpurohit: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse |
|
@sarthakpurohit: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ci-operator/config/openshift/ocp-secrets-management-console/openshift-ocp-secrets-management-console-main.yaml (1)
22-37: 💤 Low valueTest configuration looks solid.
The three-test split (unit, operator-unit, frontend) provides good separation of concerns and parallel execution. Commands are correctly structured with fail-fast behavior.
Optional optimization: Both
unitandfrontendtests executeyarn installseparately. Since they run in separate containers, this duplication is functionally correct but slightly inefficient. Consider whether a shared step or pre-test phase could install dependencies once if CI execution time becomes a concern. This is a minor optimization and not required for initial onboarding.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ci-operator/config/openshift/ocp-secrets-management-console/openshift-ocp-secrets-management-console-main.yaml` around lines 22 - 37, The unit and frontend test entries both run "yarn install" separately causing duplicated install work; to optimize, either introduce a shared pre-test step or enable dependency caching for those jobs so the "unit" and "frontend" entries (referenced by their job names unit and frontend and the frontend script test-frontend.sh) reuse the installed node_modules instead of re-running yarn install in each container—update the CI config to add a shared step or CI cache configuration for node_modules and remove the duplicate install from one of the job commands accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@ci-operator/config/openshift/ocp-secrets-management-console/openshift-ocp-secrets-management-console-main.yaml`:
- Around line 22-37: The unit and frontend test entries both run "yarn install"
separately causing duplicated install work; to optimize, either introduce a
shared pre-test step or enable dependency caching for those jobs so the "unit"
and "frontend" entries (referenced by their job names unit and frontend and the
frontend script test-frontend.sh) reuse the installed node_modules instead of
re-running yarn install in each container—update the CI config to add a shared
step or CI cache configuration for node_modules and remove the duplicate install
from one of the job commands accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 1cc0026a-e4af-4e96-8851-f58a1fa6278f
⛔ Files ignored due to path filters (1)
ci-operator/jobs/openshift/ocp-secrets-management-console/openshift-ocp-secrets-management-console-main-presubmits.yamlis excluded by!ci-operator/jobs/**
📒 Files selected for processing (1)
ci-operator/config/openshift/ocp-secrets-management-console/openshift-ocp-secrets-management-console-main.yaml
- Add OWNERS file to ci-operator/jobs/ directory (required by ci/prow/owners check) - Add component field to config OWNERS to match source repo - Remove frontend job: i18n locales files are stale on main (yarn i18n produces different sorted output vs committed files) Will re-add once source repo locales are updated Co-authored-by: Cursor <cursoragent@cursor.com>
|
@sarthakpurohit: This pull request references SMC-13 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set. 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/pj-rehearse |
|
@sarthakpurohit: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
[REHEARSALNOTIFIER]
Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
/jira refresh |
|
@sarthakpurohit: This pull request references SMC-13 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set. 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/cc @jupierce |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: anandkuma77, jupierce, sarthakpurohit The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/label rehearsals-ack |
|
@sarthakpurohit: The label(s) 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. |
|
/pj-rehearse ack |
|
@sarthakpurohit: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
a61f2fe
into
openshift:main
|
@sarthakpurohit: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
…penshift#80190) * Add CI pipeline for openshift/ocp-secrets-management-console Onboard the OCP Secrets Management Console plugin to OpenShift CI with presubmit jobs that run on every PR to the main branch: - unit: Jest unit tests (103 tests across 6 suites) - operator-unit: Go operator tests (controller, reconciler) - lint: ESLint + stylelint checks - frontend: i18n validation via test-frontend.sh - images: Dockerfile build verification The build root is sourced from the repository's .ci-operator.yaml (nodejs-18 image). A Go builder base image is pulled for operator tests. No promotion or release integration is configured at this stage since this is the initial CI onboarding. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix rehearsal failures: use correct build root and unset GOFLAGS - Replace from_repository (.ci-operator.yaml references non-existent openshift/nodejs-18:latest) with the proven tectonic-console-builder-v29 image used by all other console plugins - Unset GOFLAGS in operator-unit to avoid -mod=vendor conflict when installing controller-gen via go install Co-authored-by: Cursor <cursoragent@cursor.com> * Align CI config with upstream changes and remove broken lint - Use ci/console-plugin-test-cypress:node22 as build root (same image used by openshift/console-plugin-template; provides Node 22 which satisfies the Node 20+ requirement after upstream Dockerfile upgrade) - Remove lint job: pre-existing ESLint config failure on main (typescript-eslint parserOptions not set for integration-tests/) - Add yarn install before test-frontend.sh in frontend job - All changes verified locally: - make plugin-test: 6 suites, 103 tests PASS - make operator-test: Go tests PASS (59.8% coverage) - make plugin-lint: FAIL (pre-existing, confirmed) Co-authored-by: Cursor <cursoragent@cursor.com> * Update OWNERS file with new approver * Fix owners check and remove frontend job with stale i18n - Add OWNERS file to ci-operator/jobs/ directory (required by ci/prow/owners check) - Add component field to config OWNERS to match source repo - Remove frontend job: i18n locales files are stale on main (yarn i18n produces different sorted output vs committed files) Will re-add once source repo locales are updated Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
mainbranch:console-plugin-test-cypress)rhel-9-golang-1.23unit+operator-unitmirror whatmake testruns locally (frontend Jest + operator Go tests), split into separate CI jobs for parallelism and clear failure attributionDetails
This is the initial CI onboarding for openshift/ocp-secrets-management-console. The repo has never been added to the release repo before.
Config:
ci-operator/config/openshift/ocp-secrets-management-console/openshift-ocp-secrets-management-console-main.yamlci/console-plugin-test-cypress:node22(same image used by openshift/console-plugin-template; provides Node 22 which satisfies the project's Node 20+ requirement)golang(rhel-9-golang-1.23-openshift-4.19) for operator Go testsGenerated jobs:
ci-operator/jobs/openshift/ocp-secrets-management-console/openshift-ocp-secrets-management-console-main-presubmits.yamlmake jobs(ci-operator-prowgen + sanitize-prow-jobs)Jobs intentionally excluded for now (pre-existing failures on main, not caused by this PR):
parserOptionsnot set forintegration-tests/cypress.config.jsyarn i18nproduces different sorted output vs committed filesThese will be re-added once the source repo fixes are merged.
Test plan
make ci-operator-config— config determinized successfullymake ci-operator-prowgen— Prow jobs generated successfullymake sanitize-prow-jobs— jobs sanitized successfullymake testpasses (103 Jest tests + Go operator tests)