Skip to content

fix(ci): check deploy SA in deploy workflow gcloud account check - #1948

Open
tommartensen wants to merge 1 commit into
masterfrom
fix/deploy-gcloud-account-check
Open

tommartensen wants to merge 1 commit into
masterfrom
fix/deploy-gcloud-account-check

Conversation

@tommartensen

@tommartensen tommartensen commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Use stored gcloud credentials step added in #1936 reads the expected account from INFRA_CI_AUTOMATION_GCP_SA, but the deploy job authenticates with INFRA_DEPLOY_AUTOMATION_GCP_SA. The account check therefore always fails, breaking deploys (e.g. https://github.com/stackrox/infra/actions/runs/44762190343/job/136377706091).

This switches the step to use INFRA_DEPLOY_AUTOMATION_GCP_SA, matching the auth step.

Testing

Rerun the Deploy infra workflow with changes: https://github.com/stackrox/infra/actions/runs/44770560592/job/136406834383

🤖 Generated with Claude Code

The "Use stored gcloud credentials" step compared gcloud's active account
against INFRA_CI_AUTOMATION_GCP_SA, but the deploy job authenticates with
INFRA_DEPLOY_AUTOMATION_GCP_SA, so the check always failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tommartensen
tommartensen requested review from a team and rhacs-bot as code owners November 20, 2026 16:04
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Chores
    • Updated the deployment workflow’s cloud credential configuration. No changes to product functionality or user experience.

The deployment workflow now reads GCP_CREDENTIALS_JSON from INFRA_DEPLOY_AUTOMATION_GCP_SA instead of INFRA_CI_AUTOMATION_GCP_SA. The account check and deployment steps are unchanged.

Changes: Deployment credentials

Layer / File(s) Summary
Update stored credential source
.github/workflows/deploy.yaml
The stored-credentials step now reads GCP_CREDENTIALS_JSON from INFRA_DEPLOY_AUTOMATION_GCP_SA.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: davdhacs

Merge Risk: Minimal · up to 6222b

This fixes the deploy workflow's credential check so it inspects the same account that authenticates the deploy job, which should stop the check failing every time. No concrete defect remains in the change. Rerunning the Deploy infra workflow after merge will confirm the deploy account's permissions.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the actual change: the deploy workflow's gcloud account check now validates the deploy service account. The raw summary confirms the step switched from INFRA_CI_AUTOMATION_GCP_SA to IN…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description states the problem and the fix. The step added in #1936 checks INFRA_CI_AUTOMATION_GCP_SA, but the deploy job authenticates with INFRA_DEPLOY_AUTOMATION_GCP_SA, so the account check al…
Full details: Title check

Explanation

The title names the actual change: the deploy workflow's gcloud account check now validates the deploy service account. The raw summary confirms the step switched from INFRA_CI_AUTOMATION_GCP_SA to INFRA_DEPLOY_AUTOMATION_GCP_SA. The title is specific and matches the single changed line.

Full details: Description check

Explanation

The description states the problem and the fix. The step added in #1936 checks INFRA_CI_AUTOMATION_GCP_SA, but the deploy job authenticates with INFRA_DEPLOY_AUTOMATION_GCP_SA, so the account check always fails. The change switches the step to INFRA_DEPLOY_AUTOMATION_GCP_SA to match the auth step. It also links a failing run and a rerun of the Deploy infra workflow. This matches the changeset in .github/workflows/deploy.yaml.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 32146140-9ddc-4428-add0-e805e6d3c331
Commits

Reviewing files that changed from the base of the PR and between b646734 and 6222bfe.

Files selected for processing: 1

  • .github/workflows/deploy.yaml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@rhacs-bot

Copy link
Copy Markdown
Collaborator

A single node development cluster (infra-pr-1948) was allocated in production infra for this PR.

CI will attempt to deploy quay.io/rhacs-eng/infra-server: to it.

🔌 You can connect to this cluster with:

gcloud container clusters get-credentials infra-pr-1948 --zone us-central1-a --project acs-team-temp-dev

🛠️ And pull infractl from the deployed dev infra-server with:

nohup kubectl -n infra port-forward svc/infra-server-service 8443:8443 &
make pull-infractl-from-dev-server

🔓 You must go to to export an . Your token from the prod infra instance will not work with dev environments.

🚲 You can then use the dev infra instance e.g.:

bin/infractl -k -e localhost:8443 whoami

⚠️ Any clusters that you start using your dev infra instance should have a lifespan shorter then the development cluster instance. Otherwise they will not be destroyed when the dev infra instance ceases to exist when the development cluster is deleted. ⚠️

Further Development

☕ If you make changes, you can commit and push and CI will take care of updating the development cluster.

🚀 If you only modify configuration (chart/infra-server/configuration) or templates (chart/infra-server/{static,templates}), you can get a faster update with:

make helm-deploy

Logs

Logs for the development infra depending on your @redhat.com authuser:

Or:

kubectl -n infra logs -l app=infra-server --tail=1 -f

@davdhacs davdhacs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants