-
Notifications
You must be signed in to change notification settings - Fork 17
feat: deployment version target selector field to scope version to specific targets #907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -109,6 +109,7 @@ local openapi = import '../lib/openapi.libsonnet'; | |
| status: openapi.schemaRef('DeploymentVersionStatus'), | ||
| message: { type: 'string' }, | ||
| createdAt: { type: 'string', format: 'date-time' }, | ||
| selector: { type: 'string', description: 'CEL expression to scope this version to matching release targets' }, | ||
| }, | ||
|
Comment on lines
109
to
113
|
||
| }, | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,10 +6,10 @@ SELECT * FROM deployment_version WHERE deployment_id = $1 ORDER BY created_at DE | |
| LIMIT COALESCE(sqlc.narg('limit')::int, 5000); | ||
|
|
||
| -- name: UpsertDeploymentVersion :one | ||
| INSERT INTO deployment_version (id, name, tag, config, job_agent_config, deployment_id, metadata, status, message, workspace_id, created_at) | ||
| VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, COALESCE(sqlc.narg('created_at')::timestamptz, NOW())) | ||
| INSERT INTO deployment_version (id, name, tag, config, job_agent_config, deployment_id, metadata, status, message, selector, workspace_id, created_at) | ||
| VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, COALESCE(sqlc.narg('created_at')::timestamptz, NOW())) | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ON CONFLICT (deployment_id, tag) DO UPDATE | ||
| SET name = EXCLUDED.name, config = EXCLUDED.config, job_agent_config = EXCLUDED.job_agent_config, metadata = EXCLUDED.metadata, status = EXCLUDED.status, message = EXCLUDED.message, workspace_id = EXCLUDED.workspace_id, | ||
| SET name = EXCLUDED.name, config = EXCLUDED.config, job_agent_config = EXCLUDED.job_agent_config, metadata = EXCLUDED.metadata, status = EXCLUDED.status, message = EXCLUDED.message, selector = EXCLUDED.selector, workspace_id = EXCLUDED.workspace_id, | ||
| created_at = CASE WHEN sqlc.narg('created_at')::timestamptz IS NOT NULL THEN EXCLUDED.created_at ELSE deployment_version.created_at END | ||
|
Comment on lines
8
to
13
|
||
| RETURNING *; | ||
|
|
||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
selectorwas added to the jsonnet schemas, butapps/api/openapi/openapi.jsonis what the API server imports/uses for request validation and Swagger (apps/api/src/server.ts). That bundled spec currently has noselectoronDeploymentVersion, so regenerate/rebuild the OpenAPI JSON output and commit it to keep runtime validation/docs in sync.