Repository navigation
feat(variable): [QOV-2445] add --override-if-exists to env create commands - #747
Merged
Merged
Conversation
Guimove
marked this pull request as ready for review
October 22, 2026 09:58
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 10 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Astach
approved these changes
Oct 22, 2026
Application, container, cronjob, lifecycle, helm and environment env create commands get a --override-if-exists flag that sets override_if_exists on POST /variable: when the key already exists at a higher scope, q-core creates an override instead of returning 409. CreateVariable errors now include the API's problem detail instead of the bare status line, so a 409 says which scope holds the key.
Guimove
force-pushed
the
feat/env-create-override-if-exists
branch
from
October 30, 2026 09:54
44d95e0 to
86dab45
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira: QOV-2445
Related changes:
Adds
--override-if-existstoenv createfor application, container, cronjob, lifecycle, helm and environment. When set, the CLI sendsoverride_if_exists: trueon POST /variable (Qovery/qovery-openapi-spec#1237). If the key already exists at a higher scope (project or environment), q-core creates an override of it instead of returning 409. Projectenv createdoesn't get the flag, since nothing sits above a project. The field is only sent when the flag is set, so default requests are unchanged.CreateVariableerrors now include thedetailof the API's problem response. Before, a 409 printed only409 Conflict. Now it shows q-core's message naming the scope that holds the key.Blocked on the client bump. This needs
go get -u github.com/qovery/qovery-client-goonce Qovery/qovery-openapi-spec#1237 merges and the Go client is regenerated. CI fails until then (SetOverrideIfExistsis undefined in the published client).Tested: generated the Go client from the spec PR with openapi-generator 7.6.0 (the CI version), pointed go.mod at it with a temporary replace (not committed), then ran
go build ./...,go vet -tags testing ./...andgo test ./cmd/ ./utils/(270 passed). Checked the--helpoutput for application and environment.Summary by cubic
Adds
--override-if-existsto the application, container, cronjob, lifecycle, helm, and environmentenv createcommands so that when the key already exists at a higher scope, the CLI sendsoverride_if_exists: trueand q-core creates an override instead of returning 409. The field is only sent when the flag is set; the projectenv createcommand is unchanged since nothing sits above a project. Variable and external secret creation errors now include the API's problemdetail, so a 409 names the scope that already holds the key instead of showing only409 Conflict.Bumps
github.com/qovery/qovery-client-goto a version that exposesSetOverrideIfExists.Written for commit c17c683. Summary will update on new commits.