Skip to content

fix(orchestrator): use versioned name for the DB creation Job to avoid immutable upgrade errors (1.10.1)#427

Open
gustavolira wants to merge 1 commit into
redhat-developer:release-1.10from
gustavolira:backport-407-release-1.10
Open

fix(orchestrator): use versioned name for the DB creation Job to avoid immutable upgrade errors (1.10.1)#427
gustavolira wants to merge 1 commit into
redhat-developer:release-1.10from
gustavolira:backport-407-release-1.10

Conversation

@gustavolira

@gustavolira gustavolira commented Jun 8, 2026

Copy link
Copy Markdown
Member

Description of the change

Backports only the versioned Job-name change from #407 to release-1.10 (targets 1.10.1).

The orchestrator DB-creation Job uses a fixed name <release>-create-sonataflow-database across chart versions. When any field of the rendered pod spec changes between versions — in practice the pinned PostgreSQL image digest — an in-place helm upgrade of an Orchestrator-enabled release tries to patch the Job's immutable spec.template and fails:

Error: UPGRADE FAILED: Job.batch "<release>-create-sonataflow-database" is invalid:
spec.template: Invalid value: { ... }: field is immutable

This is latent: the Job template itself is unchanged between 1.9 and 1.10 — the only differing field is the postgres image digest, so it can affect any upgrade where that digest bumps.

Using a versioned name <release>-create-sf-db-<chart-version> gives each chart version a distinct Job (recreated instead of patched), avoiding the immutable-field error.

Scope

Per discussion, this intentionally includes only the versioned-name change. The fail-hard / configurable backoffLimit / TTL changes from #407 (RHDHBUGS-2577) are left out of the 1.10 line on purpose, so activeDeadlineSeconds, backoffLimit and the psql command are unchanged.

How was the change tested?

  • helm template with orchestrator.enabled=true renders the Job as <release>-create-sf-db-5-12-4.
  • Reproduced the original immutable-Job failure on an in-place RHDH 1.9.3 -> 1.10 upgrade with Orchestrator enabled; the versioned name avoids it.

Related

@gustavolira gustavolira requested a review from a team as a code owner June 8, 2026 17:55
@openshift-ci openshift-ci Bot requested review from rm3l and subhashkhileri June 8, 2026 17:55
@rhdh-qodo-merge

Copy link
Copy Markdown

Code Review by Qodo

Grey Divider

Sorry, something went wrong

We weren't able to complete the code review on our side. Please try again

Grey Divider

Qodo Logo

@rhdh-qodo-merge rhdh-qodo-merge Bot added documentation Improvements or additions to documentation enhancement New feature or request bug_fix labels Jun 8, 2026
@nickboldt

nickboldt commented Jun 8, 2026

Copy link
Copy Markdown
Member

AI summary failed to mention BOTH related issues, so I've added them to the summary and here too:

Related issues:

…d immutable upgrade errors

The `<release>-create-sonataflow-database` Job uses a fixed name across
chart versions. When a field in the rendered pod spec changes between
versions (e.g. the pinned PostgreSQL image digest), an in-place
`helm upgrade` of an Orchestrator-enabled release tries to patch the
Job's immutable `spec.template` and fails:

  Job.batch "<release>-create-sonataflow-database" is invalid:
  spec.template: ... field is immutable

Use a versioned name `<release>-create-sf-db-<chart-version>` so each
chart version gets a distinct Job (recreated instead of patched).

This is the minimal part of redhat-developer#407 needed to fix the upgrade; the
fail-hard / configurable backoffLimit changes (RHDHBUGS-2577) are
intentionally left out of the 1.10 line.

Fixes RHDHBUGS-3325. Targets 1.10.1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Gustavo Lira <guga.java@gmail.com>
@gustavolira gustavolira force-pushed the backport-407-release-1.10 branch from 16aa7f5 to 4fbe981 Compare June 9, 2026 14:53
@gustavolira gustavolira changed the title fix(orchestrator): backport #407 to release-1.10 — versioned DB-creation Job name to avoid immutable upgrade errors fix(orchestrator): use versioned name for the DB creation Job to avoid immutable upgrade errors (1.10.1) Jun 9, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

@rm3l rm3l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but on hold until 1.10.0 is out.

/hold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug_fix do-not-merge/hold documentation Improvements or additions to documentation enhancement New feature or request lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants