Skip to content

docs(job): document switching a job's source in place - #1275

Merged
Astach merged 3 commits into
mainfrom
ao/job-source-switch/job-source-wording
Nov 27, 2026
Merged

Astach merged 3 commits into
mainfrom
ao/job-source-switch/job-source-wording

Conversation

@Astach

@Astach Astach commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Linked ticket: QOV-2600

Plan page: QOV-2600: switch a service's source in place

What

The API reference says a job edit can switch between image and docker in place, keeping the job's id, schedule, lifecycle events and variables.
API users can move a job from a Dockerfile build to a registry image, and back, without deleting and recreating it.

Why

Today an edit that changes a job's source is refused. The only way out is to delete and recreate the job, which loses its id and its variables.

Notes

Stack: 1 of 2 · on main (the application source PR is independent, also on main)

  • Merge only after the q-core release that carries the job switch (slice Q3 of the linked ticket) is live. Before that, the switch documented here still returns 400, and a registry of another organization returns 400 with its name instead of 404.
  • Wording only: with every description stripped, the spec is identical to main. Generated clients change in doc comments only.
  • build_settings follow q-core's job switch, unlike containers, which refuse them on an image. Sent with a switch to image, they are saved as on any image job edit (Terraform sends them on every apply). Left out, a switch to image resets them to the cluster defaults, and a switch to docker keeps the stored settings, or the cluster defaults when none are stored.
  • A left-out auto_deploy or auto_preview becomes false on any switch, in either direction: a switch never turns a trigger on by itself. A body with both image and docker returns 400, on create and on edit.
  • Consumer follow-up: a Terraform in-place switch test on qovery_job (image to Dockerfile build and back, same job id, no replace).
  • Checks: npm test cannot load its Stoplight-hosted ruleset (404, same on main). The stock oas ruleset gives 0 errors on this branch and on main, with one warning fewer here (createJob now has a description).

Proof this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Documents that a job edit can switch between image and docker in place, so API users no longer need to delete and recreate a job to change its source. Today such an edit is refused, which loses the job's id and variables. This is a wording-only change; the schema is unchanged.

Dependency

  • The switch behavior ships with a q-core release; until it is live, source changes still return 400, and a registry of another organization returns 400 with its name instead of 404.

Written for commit 930b1be. Summary will update on new commits.

View guided diff Turn on auto-fix

**Linked ticket:** [QOV-2600](https://qovery.atlassian.net/browse/QOV-2600)

What:
The API reference says a job edit can switch between `image` and `docker` in place, keeping the job's id, schedule, lifecycle events and variables.
API users can move a job from a Dockerfile build to a CI image, and back, without deleting and recreating it.

Why:
Today an edit that changes the job source is refused. The only way out is delete and recreate, which loses the job id and its variables.

Notes:
- Wording only: the schema is unchanged; generated clients differ in doc comments only.
- Describes q-core once its job switch slice ships. Until then a source change still returns 400, and a registry of another organization still returns 400 with its name.
- The `auto_preview` / `auto_deploy` lines follow the run's shared switch rule: a switch never turns a trigger on.
**Linked ticket:** [QOV-2600](https://qovery.atlassian.net/browse/QOV-2600)

What:
The job docs now say what a switch does to build settings and cron runs, what `<ID>` is in the job built-ins, and the registry refusals on create too.
Readers can predict a switch's effects without reading q-core.

Why:
The first wording left gaps: `<ID>` read like the job UUID, `docker` read as Git-only Dockerfiles, `registry_id` was described as a tag, and create did not list its refusals.

Notes:
- `build_settings` with a switch to `image` returns 400, as the container path does. Today an image job accepts `build_settings`; only the switch case is documented as refused.
@Astach

Astach commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 26, 2026

Copy link
Copy Markdown

@cubic-dev-ai review

@Astach I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

View guided diff | Turn on auto-fix | Re-trigger cubic

**Linked ticket:** [QOV-2600](https://qovery.atlassian.net/browse/QOV-2600)

What:
The job docs now say a switch in either direction turns off a left-out `auto_deploy` and `auto_preview`, and that a body with both `image` and `docker` returns 400.
They also state what a switch does to build settings, as q-core's job switch implements it.

Why:
The previous wording kept `auto_deploy` on for a switch to `image`, did not mention the both-keys refusal, and refused `build_settings` on a switch to `image`, which q-core saves.

Notes:
- `build_settings` sent with a switch to `image` are saved, as on any image job edit: Terraform sends them on every apply. Left out, they reset to the cluster defaults. A switch to `docker` without them keeps the stored settings, or the cluster defaults when none are stored.
@Astach

Astach commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 26, 2026

Copy link
Copy Markdown

@cubic-dev-ai review

@Astach I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

View guided diff | Turn on auto-fix | Re-trigger cubic

@Astach
Astach marked this pull request as ready for review November 27, 2026 10:45

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

View guided diff | Turn on auto-fix | Re-trigger cubic

@Astach
Astach merged commit f2bd040 into main Nov 27, 2026
7 checks passed
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.

2 participants