Skip to content

fix(schema): bump exportJob past the version instances already carry - #219

Open
rubenvdlinde wants to merge 1 commit into
developmentfrom
fix/export-job-schema-version
Open

fix(schema): bump exportJob past the version instances already carry#219
rubenvdlinde wants to merge 1 commit into
developmentfrom
fix/export-job-schema-version

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Follow-up to #206, which merged with its export e2e still red. This is why it was red — and it is not a test problem.

What was wrong

exportJob declared schema version: 0.1.0. Instances carry 1.0.0 (editing a schema once through the OpenRegister UI bumps it there). ImportHandler skips an import when incoming <= existing, and its escape hatch schemaContentDiffers() compares only properties, required and authorization — so it could not see that the stored schema was missing an entire annotation block.

The consequence is not cosmetic. The declared x-openregister-lifecycle never reached the running schema, so TransitionEngine::transition() found no state machine and returned without doing anything. RunExportJob ran, its oc_jobs row was consumed, and the export sat at status: queued forever, with no log line anywhere.

Proven on a live instance: adding the lifecycle to the stored schema by hand took the job object's available-actions from empty to start → running, and firing it moved the object to running.

The control case is in this same file: applicationVersion declares 0.4.0, is deployed at 0.4.0, and carries its lifecycle correctly.

What this changes

  • version: 0.1.01.1.0 so the import clears the stored 1.0.0 and existing instances converge. fix(import): an annotation-only schema change must not be skipped openregister#2525 is the real fix — this bump is what makes instances converge without waiting for it.
  • The e2e now names this cause instead of reporting the symptom. A job stuck at queued has two explanations that are indistinguishable from the status alone — "the worker never ran it" and "the status could not move" — and that ambiguity is what made this take eight CI iterations. The failure message now includes the object's available-actions; an empty list says the schema has no live lifecycle.

Scope note

This fixes openbuild's own schema. The general defect — any schema whose deployed version is ≥ the declared one silently never receives an annotation-only change, across the whole 23-key vocabulary (lifecycle, mcp, calculations, notifications, widgets, …) — is fixed in ConductionNL/openregister#2525.

🤖 Generated with Claude Code

…ries

The declared version was 0.1.0. Instances carry 1.0.0 — editing a schema once
through the OpenRegister UI bumps it there — so `ImportHandler` version-skipped
every import of this schema, and its escape hatch could not see the difference
because it compares only properties/required/authorization (openregister#2525).

The consequence was not cosmetic: the declared `x-openregister-lifecycle` never
reached the running schema, so `TransitionEngine::transition()` found no state
machine and did nothing. `RunExportJob` ran, its oc_jobs row was consumed, and
the export sat at `status: queued` forever with no log line anywhere. Proven on
a live instance — adding the lifecycle to the stored schema by hand took the
object's `available-actions` from empty to `start → running`.

1.1.0 clears the stored 1.0.0. openregister#2525 is the real fix; this bump is
what makes existing instances converge without it.

Also teaches the e2e to name this cause instead of reporting the symptom: a job
stuck at `queued` now reports the object's `available-actions`, and an empty
list says the schema has no live lifecycle. The two explanations — "the worker
never ran" and "the status could not move" — were indistinguishable from the
status alone, which is what made this take eight CI iterations to find.
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openbuild @ f2e560d

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-manifest
test-l10n
check-gitignore
check-nc-floor
format
composer ✅ 106/106
npm ✅ 626/626
app:check-code ⏭️
info.xml
REUSE
PHPUnit
Newman
Playwright
Hydra gates

Quality workflow — 2026-08-16 11:00 UTC

Download the full PDF report from the workflow artifacts.

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.

1 participant