fix DM archive URL resolution#698
Open
qiancai wants to merge 1 commit intopingcap:masterfrom
Open
Conversation
|
@qiancai is attempting to deploy a commit to the test-vi Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Code Review
This pull request introduces URL resolution rules and branch alias mappings for the tidb-data-migration repository, along with unit tests to verify language prefix handling and version aliasing (mapping release-* to v*). A review comment suggests adding a specific rule for _index.md files within subfolders to prevent potential URL collisions, ensuring folder structures are preserved in the generated URLs as seen in other repository configurations.
b4d12d5 to
7baa094
Compare
7baa094 to
c0dfed4
Compare
13 tasks
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.
Summary
Fix the broken URL of archived data migration docs such as https://docs-archive.pingcap.com/tidb-data-migration/v5.3/
release-*branches to versioned archive paths such as/tidb-data-migration/v5.3/,/tidb-data-migration/v2.0/, and/tidb-data-migration/v1.0/._index.mdpages to avoid future URL collisions.Root cause
DM pages were falling through to the generic fallback rule, which drops the branch segment. As a result,
release-5.3,release-2.0, andrelease-1.0pages were generated under/tidb-data-migration/or/zh/tidb-data-migration/instead of their versioned archive paths.Affected archive links
/tidb-data-migration/v5.3//tidb-data-migration/v2.0//tidb-data-migration/v1.0//zh/tidb-data-migration/v5.3//zh/tidb-data-migration/v2.0//zh/tidb-data-migration/v1.0/Tests
NODE_PATH=/Users/grcai/Documents/GitHub/website-docs/node_modules /Users/grcai/Documents/GitHub/website-docs/node_modules/.bin/jest gatsby/url-resolver/__tests__/url-resolver.test.ts --runInBand/Users/grcai/Documents/GitHub/docs-staging/docs.jsonfor all six affected DM archive index paths and a nested DM index path.