Skip to content

feat: allow staging GitOps ref override - #162

Closed
ilin-andrey wants to merge 2 commits into
mainfrom
fix/staging-deployment-config-ref
Closed

ilin-andrey wants to merge 2 commits into
mainfrom
fix/staging-deployment-config-ref

Conversation

@ilin-andrey

@ilin-andrey ilin-andrey commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Description

Deploying a feature branch to staging currently combines its application image with Helm configuration from main. This prevents testing changes such as separate API and worker images together with their deployment configuration before merging.

Add the opt-in stagingDeploymentRepoRef input to the Kubernetes workflow. Callers whose charts live in the application repository can pass ${{ github.event.deployment.sha }} to deploy code and configuration from the same commit. Overrides require pushToEnvTag: true, so the workflow publishes the configuration through the staging tag and rejects attempts to push it to main. Empty input preserves existing behavior; other environments, including production rebuilds, ignore the override. Backend must opt in separately.

Validation: actionlint, Prettier, 480 local ref-selection/guard combinations, and an isolated GitOps test confirming that the staging tag contains the feature chart and updated image version while main, prod, and the source branch remain unchanged. No live deployment was run.

Checklist

  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@github-actions github-actions Bot added docs Improvements or additions to documentation ci yaml labels Nov 12, 2026
@ilin-andrey
ilin-andrey marked this pull request as ready for review November 12, 2026 12:29
@ilin-andrey
ilin-andrey requested a review from a team as a code owner November 12, 2026 12:29
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T12:31:27.624958Z eaa319c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eaa319c677

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/kubernetes.yaml Resolved
@kpplis

kpplis commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Could you clarify what problem this PR solves or what feature it implements? From the description, it looks like it might be part of the preview functionality, but I’m not sure I’m reading it correctly.

@ilin-andrey

ilin-andrey commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Could you clarify what problem this PR solves or what feature it implements? From the description, it looks like it might be part of the preview functionality, but I’m not sure I’m reading it correctly.

@kpplis This is for our existing staging environment. Currently, deploying a feature branch builds its application image but takes the Helm configuration from main. That means we can’t test application and chart changes together before merging.

This PR lets staging use configuration from the same commit as the application. Backend opts in through parcelLab/Backend#53084.

It doesn’t create separate preview environments.

@kpplis

kpplis commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@ilin-andrey Thanks, that clears it up. This sounds like exactly how previews work: the code and chart come from the same commit. That way nothing gets pushed to the deployment repo and shared staging isn't overwritten. Why not set up a preview for Backend instead?

I'd also rather not add a special case for one repo to the shared kubernetes.yaml. The extra conditionals make the workflow harder to follow for every caller and add maintenance, since every future change to the checkout/push logic has to account for this path. Previews would need no changes in ci at all.

@ilin-andrey

Copy link
Copy Markdown
Contributor Author

decided to close it after discussion

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

Labels

ci docs Improvements or additions to documentation yaml

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants