Skip to content

chore(QTDI-3805): Regenerate antora.yml before release tag - #1326

Merged
ozhelezniak-talend merged 1 commit into
masterfrom
ozhelezniak-talend/QTDI-3805_fix_antora_release_process
Nov 18, 2026
Merged

ozhelezniak-talend merged 1 commit into
masterfrom
ozhelezniak-talend/QTDI-3805_fix_antora_release_process

Conversation

@ozhelezniak-talend

@ozhelezniak-talend ozhelezniak-talend commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix the Antora release process: QTDI-3805.

antora.yml is generated by Maven, and the Antora site loads every component-runtime-* tag. Two tags with the same antora.yml version caused Duplicate nav in <version>@main.

Root cause: release:prepare creates the tag before Maven regenerates antora.yml. The tag keeps the old version.

  • release-2-prepare.sh: before release:prepare, run mvn clean process-sources --projects documentation and commit the regenerated files. The tag then holds the correct antora.yml (and package-lock.json). The SNAPSHOT version without suffix is the release version, so no version parameter is needed. If antora.yml does not have the release version, the script prints a warning and does not fail.
  • release-2-prepare.sh: the new commit uses git commit -a ... || true, so the script continues when there is nothing to commit.
  • repository-knowledge.md: document the rule. It also records the workaround for tags that already have a wrong version (exclude them in site-template.yml). This PR does not change site-template.yml.

Known limits:

  • process-sources does not regenerate generated_*.adoc (they need compile and process-classes). Release-5 regenerates them after the tag. Only the version links in generated_sample-index.adoc can be old on a maintenance branch.
  • package-lock.json keeps -SNAPSHOT in the tag.

Tests: the documentation-only build (--projects documentation, without -am) passed locally. With antora.yml set to a wrong value, it restored the correct one. The release script was not run. bash -n passed.

Checklist

  • Tests added or updated (UT / IT as applicable) — not applicable: shell change
  • mvn clean verify passes locally — not run
  • Spotless formatting applied (no Java change)
  • No new Sonar issues

AI generated code

https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code

  • this PR has been written with the help of GitHub Copilot or another generative AI tool

AI contribution metrics

  • Code Generation % (this PR): 100%
  • Code Generation % (ticket-wide cumulative): 100%
  • Technical Design % (ticket-wide cumulative): ~83% developer-driven (5 of 6 plan items added by the developer; AI first draft covered 1)

@ozhelezniak-talend

Copy link
Copy Markdown
Contributor Author

Scope & design review

Round 1: APPROVED (0 Blocker, 0 Major). Minor: a later patch release on a maintenance branch keeps the antora.yml version from release-6. The developer accepted this. It is documented in repository-knowledge.md. The pom is unchanged. The release-6 regeneration uses the existing antrun copy and filter executions.

Signed: Claude Sonnet 5.5

@ozhelezniak-talend

Copy link
Copy Markdown
Contributor Author

Compliance report

Critical fixed: 0, Warnings: 0, Info: 0. Files: release-6 script (bash -n OK, license header kept), site-template.yml, repository-knowledge.md. No Java changes. Spotless not applicable.

Signed: Claude Sonnet 5.5

@ozhelezniak-talend
ozhelezniak-talend force-pushed the ozhelezniak-talend/QTDI-3805_fix_antora_release_process branch from a6aecf9 to 72ceb34 Compare November 11, 2026 16:36
@ozhelezniak-talend
ozhelezniak-talend requested a balanced review from Copilot November 11, 2026 17:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the maintenance-branch Antora version update.

No open issues 🎉

What changed in this PR

Updates maintenance-branch creation to set the tracked Antora version after Maven version changes, preventing it from retaining the master branch’s version.

Changes:

  • Rewrites antora.yml with the maintenance version, excluding the snapshot suffix, before committing the branch.
  • Documents version handling, exclusions for incorrectly versioned tags, and the known limitation for later patch releases.
File Description
repository-knowledge.md Documents Antora version rules and release limitations.
.jenkins/​scripts/​release/​release-6-create-maintenance-branch.sh Sets the Antora maintenance version directly without running a Maven build.

Review effort: Balanced

@undx undx 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.

I'm not sure that the fix should be placed at this place...
AFAIR, the issue is at tag level ie during release:perform. At that moment, the change of version in antora.yml from template is effective but not commited.
This is this tagged detached head which leads to the duplicate nav error message.

@ozhelezniak-talend
ozhelezniak-talend requested review from undx and a balanced review from Copilot November 16, 2026 09:34
@ozhelezniak-talend ozhelezniak-talend changed the title fix(QTDI-3805): Fix Antora version on maintenance branches fix(QTDI-3805): Regenerate antora.yml before release tag Nov 16, 2026
@ozhelezniak-talend

ozhelezniak-talend commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

I'm not sure that the fix should be placed at this place... AFAIR, the issue is at tag level ie during release:perform. At that moment, the change of version in antora.yml from template is effective but not commited. This is this tagged detached head which leads to the duplicate nav error message.

changed the approach
sign: human OZ

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the release-preparation changes.

No open issues 🎉

Review effort: Balanced

@ozhelezniak-talend
ozhelezniak-talend force-pushed the ozhelezniak-talend/QTDI-3805_fix_antora_release_process branch from 1720f4d to ad355d6 Compare November 16, 2026 11:15
@ozhelezniak-talend ozhelezniak-talend changed the title fix(QTDI-3805): Regenerate antora.yml before release tag chore(QTDI-3805): Regenerate antora.yml before release tag Nov 16, 2026
undx
undx previously approved these changes Nov 16, 2026

@undx undx 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

@thboileau

thboileau commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

from what I see of the process, we may also update the version of antora when we create a maintenance branch (in script .jenkins/scripts/release/release-6-create-maintenance-branch.sh). Actually, the maintenance branch is created with the version of doc of the master branch.

This is not mandatory, we can't take it in another ticket, but it sounds weird to have a shift between the version of the maintenance branch and the doc's version in this maintenance branch.
I see there is a similar minor issue when "mvn release:prepare" bump the next version (pom is updated, not antora).

With your fix, we will have this sequence of tasks and the state of the pom.xml and antora configuration


0/ initial state
- pom:1.2612.0-SNAPSHOT
- antora: whatever

1/ jenkins/scripts/release/release-2-prepare.sh

mvn clean process-sources -> the fix
    - pom:1.2612.0-SNAPSHOT
    - antora:1.2612.0

mvn release:prepare
    a/ bump final version 
        - pom:1.2612.0
        - antora:1.2612.0
    b/ commit
    c/ create tag 1.2612.0 locally
    d/ bump new snapshot version 
        - pom:1.2701.0-SNAPSHOT
        - antora:1.2612.0 -> the release:prepare command is a block... we may fix that by calling atomic commands (set version, git tag, etc)
    e/ commit

2/ .jenkins/scripts/release/release-3-perform.sh
deploy tag

3/ .jenkins/scripts/release/release-4-docker-image-creation.sh

4/ .jenkins/scripts/release/release-5-prepare-next-iteration.sh
    a/ mvn clean install (to update the doc configuration)
        - pom:1.2701.0-SNAPSHOT
        - antora:1.2701.0
    b/ commit

5/ .jenkins/scripts/release/release-6-create-maintenance-branch.sh
    a/ create branch maintenance/1.2612
        - pom:1.2612.1-SNAPSHOT
        - antora:1.2701.0 -> we may fix that, because that looks really weird

@ozhelezniak-talend

Copy link
Copy Markdown
Contributor Author

antora:1.2612.0 -> the release:prepare command is a block... we may fix that by calling atomic commands (set version, git tag, etc)

Why it blocks anything?

.jenkins/scripts/release/release-6-create-maintenance-branch.sh
a/ create branch maintenance/1.2612
- pom:1.2612.1-SNAPSHOT
- antora:1.2701.0 -> we may fix that, because that looks really weird

You want additional change for maintenance branch creation script? Important: additional. the script release-6 can't replace the change in release-2

We need the change inside the tag, not after otherwise we won't fix the issue of duplicated nav. we gather all other documentation versions by tag and inside that tags for a 2 different tags we have the same carve in stone (or in tag) version in antora.yml

@thboileau

Copy link
Copy Markdown
Contributor

Why it blocks anything?

Oops, sorry for my bad english. I wanted to say that the release:prepare command is an "atomic" sequence of several commands. we need to split into atomic commands in order to have a precise control of what is done.

You want additional change for maintenance branch creation script? Important: additional. the script release-6 can't replace the change in release-2
I think that this is not mandatory for now, so let's postpone this. Your fix helps to generate a correct tag which is the most important.

I'll create a specific ticket to clean the repository, and the release process.

* run the doc build before release:prepare so the tag holds all generated files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

� Conflicts:
�	.jenkins/scripts/release/release-2-prepare.sh
@ozhelezniak-talend
ozhelezniak-talend force-pushed the ozhelezniak-talend/QTDI-3805_fix_antora_release_process branch from ad355d6 to f6ca12d Compare November 17, 2026 16:16
@sonar-rnd

sonar-rnd Bot commented Nov 17, 2026

Copy link
Copy Markdown

@ozhelezniak-talend
ozhelezniak-talend merged commit f64abd6 into master Nov 18, 2026
10 checks passed
@ozhelezniak-talend
ozhelezniak-talend deleted the ozhelezniak-talend/QTDI-3805_fix_antora_release_process branch November 18, 2026 07:19
lxia-talend pushed a commit that referenced this pull request Nov 20, 2026
* run the doc build before release:prepare so the tag holds all generated files

(cherry picked from commit f64abd6)
lxia-talend pushed a commit that referenced this pull request Nov 20, 2026
* run the doc build before release:prepare so the tag holds all generated files

(cherry picked from commit f64abd6)
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.

4 participants