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

Merged
AS
4d ago
+31-1

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.