ci-operator: use yaml file instead of env vars to load GSM project config#4981
ci-operator: use yaml file instead of env vars to load GSM project config#4981psalajova wants to merge 1 commit intoopenshift:mainfrom
ci-operator: use yaml file instead of env vars to load GSM project config#4981Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughAdds file-based GSM project configuration support: CLI flag to specify a GSM project config file, a loader function to read/validate that file, and new GSM config fields for GCP project identifiers; replaces environment-based project config retrieval with the file-backed value. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: psalajova 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pkg/api/gsm.go`:
- Around line 95-102: LoadGSMProjectConfigFromFile currently unmarshals into the
passed config but does not validate required fields; after calling
yaml.UnmarshalStrict in LoadGSMProjectConfigFromFile, check that
config.GCP_PROJECT_ID is not empty and config.GCP_PROJECT_NUMBER is present
(non-empty or non-zero as appropriate for its type) and return a clear
fmt.Errorf if either is missing (e.g., "missing required GSM config:
GCP_PROJECT_ID" / "GCP_PROJECT_NUMBER"); perform this validation before
returning so callers never receive a config lacking those required values.
ℹ️ Review info
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (3)
cmd/ci-operator/main.gopkg/api/gsm.gopkg/gsm-secrets/types.go
|
/test lint |
70fddcb to
397d726
Compare
|
@psalajova: 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. |
Use
core-services/ci-secret-bootstrap/gsm-project-config.yaml(added in this PR) as source for the GSM project config instead of ENV vars; this way we only have one source of truth if we ever need to change the project.Summary by CodeRabbit
New Features
Bug Fixes