feat: Support migration guides for enterprise connectors #67615
Merged
+10
−4
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.
What
This PR adds support for migration guides on enterprise connectors.
How
Updated filtering logic to support top-level
id
as well as nestedlink.id
.The existing filtering logic for enterprise connectors in the sidebar did not expect nested migration guides. The reason is because the getFilenamesInDir() function returns two different object structures.
Simple doc (no migration file): { type: "doc", id: "...", label: "..." } - has id at top level
Category with migration doc: { type: "category", label: "...", link: { id: "..." }, items: [...] } - has id nested in link.id
@darynaishchenko discovered during work on #67214 that all builds failed when a migration guide was added to an enterprise connector.
Review guide
<connector_filename>-migrations.md
doc for an enterprise connector. At build time it should nest appropriately under its parent object.User Impact
Enterprise customers can have migration guides too.
Can this PR be safely reverted and rolled back?