-
Notifications
You must be signed in to change notification settings - Fork 18
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
Support for redirects other than the old site ones. #156
Open
benjyw
wants to merge
2
commits into
pantsbuild:main
Choose a base branch
from
benjyw:moar_redirects
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default [ | ||
{ | ||
from: "/2.19/docs/java-and-scala", | ||
to: "/2.19/docs/jvm/java-and-scala", | ||
}, | ||
{ | ||
from: "/2.19/docs/java-and-scala/kotlin", | ||
to: "/2.19/docs/jvm/kotlin", | ||
}, | ||
]; |
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.
Can we rename this to make it more obvious what kinds of redirects these are? Something like
renamed_path_redirects
?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.
Sure, but I'm also concerned about the larger question of the fact that CI can't pass on this until the new pages exist in the repo, which requires publishing, and then re-publishing so the redirects go live.
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.
I think that's a good thing. It's catching bad redirects and won't publish.
I think the correct thing to do is to add the infra in this PR, and then update it in the docs sync PR when we sync renamed paths
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.
How would that work? Isn't that an automatic PR during release?
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.
It is a good thing, but it means that there is an impedance mismatch between how docs publishing works and implementing redirects.
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.
Yeah, whoever would've been reviewing that PR would have to do it.
We could move that file into the pants repo and special-case "sync"-ing it.
But then, we might wanna invest in automation on making sure the pants repo "builds" the docs healthily
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.
I think having this file in the main repo and syncing it naively/wholesale would be hard to manage due to cherry-picks. For instance, we're adding a redirect here for 2.19 only:
main
PR, then a release/doc sync from main won't work if that happens before the2.19.x
changes are in(I imagine we can make the automation more intelligent to solve this, but that means more complexity too.)
I wonder if we should have live chat about our approach to documentation and releases so we can get to shared direction more quickly rather than trying to hash it out over text.
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.
Yeah I was pondering this, and I think redirects are fundamentally not a versioned thing.