Skip to content

De-version Change Tracker docs - #1291

Open
DanPiazza-Netwrix wants to merge 4 commits into
devfrom
DanPiazza-Netwrix/changetracker-remove-versioning
Open

De-version Change Tracker docs#1291
DanPiazza-Netwrix wants to merge 4 commits into
devfrom
DanPiazza-Netwrix/changetracker-remove-versioning

Conversation

@DanPiazza-Netwrix

@DanPiazza-Netwrix DanPiazza-Netwrix commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Converted Change Tracker from a versioned product (8.0/8.1/8.2) to a single unversioned "current" product, matching the PolicyPak pattern, so links stay stable across future releases.
  • Flattened docs/changetracker/8.2 into docs/changetracker, moved the sidebar and images to their unversioned locations, and rewrote all internal cross-links and image references.
  • Updated the OpenAPI plugin config, package.json gen-api-docs scripts, and .gitignore for the new unversioned API reference path.
  • Removed remaining version references from doc titles/headers (e.g. index page title, cross-link text).

Test plan

  • Full-site npm run start build with no errors introduced by this change (pre-existing tag-redirect build issue confirmed present on dev baseline too)
  • Verified in Chrome: Change Tracker homepage, sidebar navigation, an internal cross-page link, a KB article and its official-docs cross-link, and the interactive API Reference explorer
  • Verified other products (PolicyPak, Access Analyzer) are unaffected

Closes #1292

Change Tracker docs were split across 8.0/8.1/8.2 folders, which meant
version-scoped links broke every time a version was retired. Converted
Change Tracker to a single unversioned "current" product (matching
PolicyPak's pattern) so URLs stay stable across releases.

Flattened docs/changetracker/8.2 -> docs/changetracker, moved the
sidebar and images to their unversioned locations, rewrote internal
cross-links and image references, updated the OpenAPI plugin config
and generation scripts, and dropped the 8.0/8.1 versions entirely.
hilram7
hilram7 previously approved these changes Jul 30, 2026
@DanPiazza-Netwrix

Copy link
Copy Markdown
Contributor Author

@claude fix all issues

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Fix complete:

  • Add --plugin-id openapi-changetracker to gen-api-docs/clean-api-docs commands in package.json
  • Verify changes
  • Commit and push

Summary:

The code review flagged one build-breaking issue: the OpenAPI plugin id was renamed to openapi-changetracker during de-versioning, but the gen-api-docs/clean-api-docs commands in package.json still relied on the default --plugin-id (openapi). On a clean CI checkout, that plugin instance no longer exists, so the API-reference generation in prestart, prebuild, and preci would fail.

  • package.json: added --plugin-id openapi-changetracker to all gen-api-docs/clean-api-docs invocations — prestart, prebuild, preci, and both commands in openapi:sync.

Note: an equivalent fix landed on the branch concurrently (commit 9c9051123, "Pass --plugin-id to OpenAPI CLI after Change Tracker plugin rename"), so the branch already carries this change. No further action needed.

The OpenAPI plugin id was renamed to openapi-changetracker, but the
gen-api-docs/clean-api-docs invocations still relied on the default
--plugin-id of "openapi". With no plugin instance named "openapi", a
clean CI checkout could not resolve the target instance and the API
reference failed to generate, breaking prestart/prebuild/preci and
openapi:sync. Add --plugin-id openapi-changetracker to all four.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Fixed the one build-breaking issue from the code review in 9c90511.

OpenAPI gen-api-docs --plugin-id mismatch — the plugin id was renamed to openapi-changetracker, but the CLI invocations relied on the default --plugin-id of openapi, which no longer maps to any plugin instance. On a clean CI checkout (no pre-generated files) this would fail to resolve the instance and break prestart, prebuild, preci, and openapi:sync.

Added --plugin-id openapi-changetracker to all four invocations:

  • prestart / prebuild / precigen-api-docs changetracker-hub --plugin-id openapi-changetracker
  • openapi:sync — both clean-api-docs and gen-api-docs

Everything else in the review was noted as correct, so no other changes were needed.

⚠️ Note: I couldn't run a from-scratch npm ci && npm run build in this environment (no node_modules / no network), so please confirm with a clean build. The fix follows the documented --plugin-id flag of docusaurus-plugin-openapi-docs and the review's recommended remedy.

@DanPiazza-Netwrix

Copy link
Copy Markdown
Contributor Author

@claude fix all issues

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Fix complete:

  • Remove redundant staleDir entry in scripts/cleanup-legacy-dirs.mjs
  • Verify changes
  • Commit and push

Summary:

This PR has no editorial "Documentation PR Review" comment (it's a config/refactor PR, not doc-content changes). The only review is the Code Review, which found no blocking issues — the one build-breaker (OpenAPI --plugin-id) was already fixed in 9c9051123. That left two minor/informational items:

  • Redundant staleDir entry (cleanup-legacy-dirs.mjs:17): docs/changetracker/8.1/integration/api/reference is fully subsumed by the docs/changetracker/8.1 entry, which already removes it recursively. Dropped it (commit b4d2a1c38).
  • ⏭️ No redirects for old versioned URLsintentionally not changed. The code review noted this "matches the PolicyPak precedent and does not affect the build." Your PR description states the goal is stable links going forward, and single-current products don't emit versioned redirects by design. If you'd like /docs/changetracker/8_2/... (and 8_1, 8_0) to redirect somewhere instead of 404ing, let me know the target and I can wire that up — otherwise this stands as an accepted tradeoff.

Nothing else in the review required changes.

The docs/changetracker/8.1/integration/api/reference entry is fully
subsumed by the docs/changetracker/8.1 entry, which removes it
recursively. Flagged as redundant in the PR code review.

Co-Authored-By: Claude <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Reviewed the outstanding issues — everything actionable is already resolved on the branch.

I went through the code review's findings against the current branch state:

  • OpenAPI --plugin-id mismatch (build-breaking) — fixed in 9c9051123; all gen-api-docs/clean-api-docs invocations now pass --plugin-id openapi-changetracker.
  • Redundant staleDir entry (cleanup-legacy-dirs.mjs) — the nested docs/changetracker/8.1/integration/api/reference entry was subsumed by the docs/changetracker/8.1 version-root entry and has been dropped in b4d2a1c38.

Not a defect — no change made:

  • No redirects for old versioned URLs (/docs/changetracker/8_2/… etc.). The code review flagged this as informational and noted it's an accepted tradeoff of making the product single-current, matching the PolicyPak precedent and this PR's stated goal of stable links. It doesn't affect the build. Since it's an intentional design decision, I left it as-is — let me know if you'd rather add explicit redirects for the old 8_0/8_1/8_2 paths and I'll wire them up.

All CI checks (build, code-review, doc-review, vale-autofix, CodeQL) are currently passing. Nothing further to fix.

@github-actions

Copy link
Copy Markdown
Contributor

Code Review

I reviewed the non-content changes in this PR (config, scripts, .gitignore, sidebars). No documentation/style review — that is handled separately. No GitHub Actions workflow files are touched by this PR.

Verdict: No build-breaking or correctness bugs found

The de-versioning changes are internally consistent and correctly follow the established single-version current pattern (e.g., 1Secure):

  • src/config/products.js — Change Tracker collapsed to one current/isLatest version pointing at ./sidebars/changetracker.js and ./docs/changetracker/api/reference/sidebar.ts. Dropping defaultVersion is safe: getDefaultVersion() falls back to versions.find(v => v.isLatest).
  • docusaurus.config.js — Single OpenAPI plugin id: openapi-changetracker, docsPluginId: changetracker. generatePluginId('changetracker', 'current') returns 'changetracker', so the docs plugin id matches. outputDir/baseUrl (docs/changetracker/api/reference) are consistent, and specPath points to changetracker-hub-8.2.yaml (retained; only the 8.1 spec was removed).
  • package.jsongen-api-docs changetracker-hub --plugin-id openapi-changetracker matches the renamed plugin id and config key. The now-obsolete changetracker-hub-8-2 invocation is removed, and openapi:sync is updated to the single path.
  • .gitignore — Correctly repointed to docs/changetracker/api/reference/* while keeping the hand-authored _category_.json and index.md (both confirmed present at the new path).
  • scripts/cleanup-legacy-dirs.mjs — Deletion targets are explicit (docs/changetracker/8.0|8.1|8.2) and do not overlap the new flattened content. Safe.
  • Sidebarssidebars/changetracker.js is the same trivial autogenerated / dirName: '.' stub; the git rename source (8.0.js) is immaterial since all three version stubs were identical.

Non-blocking consideration (routing)

Because Change Tracker is now a single-version current product, both the redirects array and createRedirects() in the client-redirects plugin skip it (they exclude single-current products, and getLatestVersionUrlMap() omits them). This is correct behavior — no build break — but it means previously published URLs under /docs/changetracker/8_0/…, /8_1/…, and /8_2/… will 404 after deploy with no redirect to the new version-less paths. This matches the precedent for other single-version products, so it may be acceptable; if preserving inbound/bookmarked/SEO links for the old versioned pages matters, consider adding explicit plugin-client-redirects entries. No action required for build correctness.

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.

KB review: De-version Change Tracker docs (PR #1291)

3 participants