Repository navigation
docs(accessanalyzer): keep 26.1 version numbers in one release list and add a versions page - #1814
Conversation
… at build time
Pages under docs/accessanalyzer/26.1 can write {{appVersion}},
{{installerVersion}}, {{k3sVersion}}, {{argocdVersion}},
{{previousAppVersion}} and {{releaseTable}}. A markdown.preprocessor
(src/config/docVariables.js) replaces them before MDX parses the page, so
they work in prose, inline code and fenced code blocks alike. An unknown
token fails the build with the page name and the known names. Pages in
other products are passed through untouched.
The values come from src/config/releases/accessanalyzer-26.1.js, a
newest-first list of releases with the dspm-installer, k3s and ArgoCD
versions each one ships with. Publishing a release is one new entry at
the top of that list. The first entry is the latest release.
The list is a JS module imported by docusaurus.config.js rather than a
file read at runtime: CI restores the Rspack persistent cache, and
Docusaurus evicts it only when the config or a module it imports
changes. With a warm cache, a change to the list alone updated every
page that uses it.
src/config/docVariables.test.mjs runs in test:scripts. Besides the
replacement itself, it checks that every token used in the 26.1 pages is
known and that none sits in front matter or a heading, where the
preprocessor never sees it.
… and add a versions page The 26.1 pages used made-up examples (1.5.0, 1.6.0, 1.1.2) and named no installer version. They now use the release tokens, so they show the latest release, 1.2.0, and its installer, 1.0.21, and follow the release list from now on: - installer-reference: the --target-revision example, and the k3s and ArgoCD defaults - run-the-installer: the air-gapped VERSION line is set to the latest release, and both "confirm it runs" steps show the expected dspm-installer version output - upgrade-to-a-new-version: the --target-revision and VERSION examples, the expected installer version, and the latest release to compare with dspmctl version - roll-back-to-a-previous-version: the examples use the previous release, 1.1.10, since a rollback goes one release back The registry dspmctl set-revision example now reads <version>. The latest release, 1.2.0, is the one upgrade dspmctl can't make from an earlier release, so filling it in would contradict the warning at the top of the page. The "Upgrade to 1.2.0" section and the "earlier than 1.1.7" note stay literal, because they describe those releases. The new What's New page, Release and Installer Versions, lists each release with its installer, k3s and ArgoCD versions. It starts at 1.2.0, the first release that pins a stable installer for in-app upgrades. The What's New index and the upgrade page link to it.
Auto-Fix Summary1 issues fixed, 1 skipped across 6 files
| Ask |
…' into thobed/aa-26-1-version-variables
Documentation PR ReviewEditorial Reviewdocs/accessanalyzer/26.1/release-notes/versions.md
docs/accessanalyzer/26.1/release-notes/index.md
docs/accessanalyzer/26.1/install/upgrade-to-a-new-version.md
docs/accessanalyzer/26.1/install/run-the-installer.md No issues found. The new "Output such as docs/accessanalyzer/26.1/install/installer-reference.md No issues found. docs/accessanalyzer/26.1/install/roll-back-to-a-previous-version.md No issues found. Summary8 editorial suggestions across 3 files. Vale and Dale issues are auto-fixed separately. What to do next: Comment
You can ask Claude anything about the review or about Netwrix writing standards.
|
Auto-Fix Summary1 issues fixed, 1 skipped across 6 files
| Ask |
Code ReviewNo blocking issues. The preprocessor is scoped to Two non-blocking notes:
|
Summary
Access Analyzer 26.1 pages now take their version numbers from one file,
src/config/releases/accessanalyzer-26.1.js. To publish a release, add its entry at the top of that list. Every page that shows a version, and the new versions table, picks it up at build time.Until now the pages used made-up examples (
1.5.0,1.6.0,1.1.2) and never named an installer version. They now show the latest release, 1.2.0, and its installer, 1.0.21.How it works
src/config/docVariables.jsis wired in asmarkdown.preprocessorindocusaurus.config.js. For pages underdocs/accessanalyzer/26.1only, it replaces these tokens before MDX parses the page, so they work in prose, inline code and code blocks:{{appVersion}}{{installerVersion}}{{k3sVersion}}{{argocdVersion}}{{previousAppVersion}}{{releaseTable}}An unknown token fails the build and names the page and the known tokens. Pages in other products pass through unchanged.
The release list is a JS module that the config imports, not a file read at runtime. CI restores the Rspack persistent cache, and Docusaurus evicts it only when the config or something it imports changes. I checked this locally: with a warm cache, changing only the list updated every page that uses it.
Page changes
--target-revisionexample, and the k3s and ArgoCD defaultsVERSION=line is set to the latest release, and both "confirm it runs" steps show the expecteddspm-installer versionoutput--target-revisionandVERSION=examples, the expected installer version, and the latest release to comparedspmctl versionwithSome version numbers stay literal on purpose. The "Upgrade to 1.2.0" section and the "earlier than 1.1.7" note describe those specific releases. The registry
dspmctl set-revisionexample now reads<version>, because 1.2.0 is the one upgradedspmctlcan't make from an earlier release, and filling in the latest version there would contradict the warning at the top of the page.Where the values come from
The access-analyzer release tags. The installer is
config.mediaUpgrade.image.tagindeploy/helm/apps/values.yamlatv1.2.0. k3s and ArgoCD are the defaults indeploy/installer/internal/config/config.go, which are the same atinstaller/v1.0.21and atv1.2.0, where the media build reads them.Testing
src/config/docVariables.test.mjs, added totest:scripts, covers the replacement, unknown tokens, scoping and the table, and checks that no 26.1 page puts a token in front matter or a heading.DOCS_PRODUCT=accessanalyzer DOCS_PRODUCT_LATEST_ONLY=true npm run buildpasses. The rendered pages show the values above, with no{{left.scripts/test-heading-skip.shfails on my Mac, on an untoucheddevcheckout too. The rest oftest:scriptspasses.