Repository navigation
feat: allow staging GitOps ref override - #162
ilin-andrey wants to merge 2 commits into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
|
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. |
|
@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. |
|
decided to close it after discussion |
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
stagingDeploymentRepoRefinput 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 requirepushToEnvTag: true, so the workflow publishes the configuration through thestagingtag and rejects attempts to push it tomain. 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