Repository navigation
fix(#1675): serve QA tutorial navigator at /tutorial-navigator-qa/ - #1690
Merged
Merged
Conversation
The QA channel had no route for /tutorial-navigator-qa/ (404). Prod serves its navigator from the page-tutorial-navigator HANA BLOB via CAP (#1659 Phase 2); srv-qa already serves /content/pages/* (dark-launched) but nothing reached it. This mirrors prod for the QA channel: - scripts/fetch-tutorials.ts: on the QA channel, also emit content-qa/tutorial-navigator/_index.md (new qaNavigatorPageMarkdown, same navigator layout as the QA root) so build:qa produces public-qa/tutorial-navigator/index.html. publish-content:qa then discovers it via discoverPageFiles and uploads page-tutorial-navigator to tutorials-hana-qa (no publish-path change needed). - approuter/xs-app.json: add ^/tutorial-navigator-qa/ -> srv-qa /content/pages/tutorial-navigator/$1, authenticationType xsuaa, scope Tutorial.Author. Regex requires "-qa" so it never clobbers the public prod /tutorial-navigator/ route. - srv-qa/server.js: un-dark-launch note on the /content/pages/* route. - verify-qa-build.ts: assert public-qa/tutorial-navigator/index.html exists and carries the QA navigator markers (reuses checkQaIndex). - Tests: qaNavigatorPageMarkdown unit test; dedicated approuter route unit test (scope + regex non-clobber guard); QA smoke assertions for /tutorial-navigator-qa/ (authed 200 + markers, unauth 401/302) and a direct srv-qa /content/pages/tutorial-navigator/ scope-bypass guard. Note: the "~638-byte stubs" reported for other /tutorials-qa/* URLs are the XSUAA gate responding to unauthenticated curl, not a serving bug — those serve real content when logged in. The genuine defect was the missing route. Rollout: requires a QA content rebuild (publishes page-tutorial-navigator to tutorials-hana-qa) plus a full MTA deploy (ships the approuter route).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1675.
Diagnosis
/tutorial-navigator-qa/returns 404 because there is no approuter route for it. That's the genuine defect (matches the issue title)./tutorials-qa/*are the XSUAA gate responding to the reporter's unauthenticatedcurl— every/tutorials-qa/*route isTutorial.Author-scoped, so anonymous requests get a tiny stub. They serve real content when logged in. The QA navigator itself already renders at/tutorials-qa/(the QA root uses the navigator layout, served statically).Fix (mirrors prod's #1659 Phase-2 CAP flip, for the QA channel)
Prod serves its navigator from the
page-tutorial-navigatorHANA BLOB via CAP/content/pages/tutorial-navigator/.srv-qaalready serves/content/pages/*(dark-launched in #1659) but nothing reached it. This wires it up:scripts/fetch-tutorials.ts— on the QA channel, also emitcontent-qa/tutorial-navigator/_index.md(newqaNavigatorPageMarkdown(), identical navigator layout to the QA root) sobuild:qaproducespublic-qa/tutorial-navigator/index.html.publish-content:qathen discovers it viadiscoverPageFilesand uploadspage-tutorial-navigatortotutorials-hana-qa— no publish-path code change needed.approuter/xs-app.json— add^/tutorial-navigator-qa/?(\?.*)?$→srv-qa-api/content/pages/tutorial-navigator/$1,authenticationType: xsuaa,scope: $XSAPPNAME.Tutorial.Author. The-qain the regex guarantees it never clobbers the public prod/tutorial-navigator/route.srv-qa/server.js— un-dark-launch note on the/content/pages/*route.scripts/verify-qa-build.ts— assertpublic-qa/tutorial-navigator/index.htmlexists and carries the QA navigator markers (reusescheckQaIndex).Tests
qaNavigatorPageMarkdownunit test (same navigator frontmatter as the root)./tutorial-navigator-qa/but not prod/tutorial-navigator/.GET /tutorial-navigator-qa/→ 200 + navigator markers (quote-agnostic for--minify); unauth → 401/302; directsrv-qa /content/pages/tutorial-navigator/anon → 401.Verified end-to-end locally: ran the QA Hugo build with the generated sources →
public-qa/tutorial-navigator/index.htmlrenders withdata-search-base=/qa-search,data-nav-base=/tutorials-qa,data-href-base=/tutorials-qa, populated#browse-data;checkQaIndexpasses;discoverPageFiles('hugo/public-qa')returnspage-tutorial-navigator. Unit suites: 59 passed.Rollout
Requires both: (a) a QA content rebuild (
rebuild-content-qa.yml, publishespage-tutorial-navigatortotutorials-hana-qa) and (b) a full MTA deploy (ships the new approuter route). Before the QA publish lands, the route fail-opens to the prod page-fallback snapshot under Author scope — transient, not broken.