Repository navigation
Stop linking released API pages to the unreleased /next tree #5017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Severity: P3 (Low)
If
/nextis the only tree that renders in a build, omitting its card also suppresses the entire/apihub. The preview pages still link to/apiin their breadcrumbs, so those links now lead to a missing page. Keep the hub available without the card, or omit its links when there is no hub.Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No change here. The hub goes missing only when every API in the build lost all of its released versions and
mainalone loaded. The build reports that state for each API, and the search export stops on it. A hub page with no cards gives the reader nothing to open, and a card for the preview is the link this PR removes. If a degraded build should still write an empty hub, that is a separate change toGenerate, which skips the catalog page when it has no entries.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One distinction: the search-export failure does not itself prevent the preview pages from being generated.
Generaterenders products and then skips the catalog only when there are no entries;GenerateProductrenders each resolved tree before returning its (possibly null) catalog entry (OpenApiGenerator.cs#L135-L140,OpenApiGenerator.cs#L368-L420). The separate search-export path reports the unresolved versions and stops the export (OpenApiGenerator.cs#L226-L248); that diagnostic does not address the/apilink still emitted on non-catalog pages (ApiBreadcrumbs.cs#L14-L24). So the concern still applies to the generated/nextpages in this degraded case. If an empty hub is intentionally out of scope, omitting that breadcrumb when there is no hub remains the alternative in the finding.Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right about the export: it stops the search index and does not stop the
/nextpages from rendering. I withdraw that part of my reply. The deadAPIscrumb is real in that build.I still leave it out of this PR, for two reasons.
The state needs every API in the build to declare a numeric major and to lose all of them while
mainloads. An API with no numeric major keepsmainas its default tree, soIsNextis false and it keeps its card. The assembled site has several such APIs, so its hub cannot go missing this way. That leaves an isolated build of one versioned API whose index resolves and whose released specs all fail to fetch, and that build already reports each missing version.Neither fix is local.
ApiBreadcrumbs.Builddoes not know whether a hub exists, and the render context's catalog entries are empty in contexts that do have a hub, such asPageContentsAsync, so that list cannot stand in for it. Writing an empty hub means thatGenerateandGenerateCatalogstop skipping on zero entries, which also changes what a build with no loadable spec writes.The right shape is one fact, whether the build writes a hub, that the catalog step and the breadcrumb both read. That is a change of its own.