Skip to content
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

x/website: short links should work on tip.golang.org #58484

Open
rittneje opened this issue Feb 13, 2023 · 9 comments
Open

x/website: short links should work on tip.golang.org #58484

rittneje opened this issue Feb 13, 2023 · 9 comments
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. website

Comments

@rittneje
Copy link

rittneje commented Feb 13, 2023

What is the URL of the page with the issue?

https://tip.golang.org/doc/go1.20#compiler

What did you do?

If you look at the release notes on https://go.dev/doc/go1.20#compiler, the text "rejects anonymous interface cycles" links to https://go.dev/issue/56103, which results in a 302 redirect to https://github.com/golang/go/issues/56103.

However, if you look at the release notes on https://tip.golang.org/doc/go1.20#compiler, the link is for https://tip.golang.org/issue/56103, which results in a 404 and thus renders the to, err := human() page.

What did you expect to see?

Either https://tip.golang.org/issue/56103 should redirect to https://github.com/golang/go/issues/56103, or the release notes should just directly link to GitHub in the first place.

What did you see instead?

image

@gopherbot gopherbot added this to the Unreleased milestone Feb 13, 2023
@rittneje rittneje changed the title x/pkgsite: add supports for redirects from tip.golang.org to github.com x/pkgsite: add support for redirects from tip.golang.org to github.com Feb 13, 2023
@seankhliao seankhliao changed the title x/pkgsite: add support for redirects from tip.golang.org to github.com x/website: short links should work on tip.golang.org Feb 13, 2023
@seankhliao seankhliao added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed pkgsite labels Feb 13, 2023
@v-aryan
Copy link

v-aryan commented Feb 13, 2023

Hey @rittneje , I would like to work on this issue ...

@v-aryan
Copy link

v-aryan commented Feb 13, 2023

I am very new to open source , I tried to search alot for the text "rejects anonymous interface cycles" but couldn't find , @rittneje please help me solve this issue and make me move one step forward in my open source contribution journey
Thank you.

@ianlancetaylor
Copy link
Contributor

The text is at https://go.googlesource.com/website/+/refs/heads/master/_content/doc/go1.20.html#339.

But the fix for this is not to change that file. This fix for this is to change tip.golang.org so that /issue links redirect as they do for go.dev. See references to tip.golang.org and gotip in the Go files in go.googlesource.com/website.

@v-aryan
Copy link

v-aryan commented Feb 14, 2023

@ianlancetaylor Thanks for replying , But I suspect that the file go1.20.html is not present on my localhost but can be seen when inspecting or viewing the source code. In this type of situation , what can i do more ?

@ianlancetaylor
Copy link
Contributor

I'm sorry, I don't understand the question. To be clear, I suspect that fixing this issue is going to require checking out the source code from go.googlesource.com/website and changing it so that the /issue (and /cl) shortlinks from tip.golang.org redirect correctly.

@v-aryan
Copy link

v-aryan commented Feb 14, 2023

@ianlancetaylor

issue

I can find the above code for the site https://go.dev/issue/56103 which redirects to #56103.


First line specifies that its for site https://go.dev/doc/go1.20#compiler
but the changes have to be done in https://tip.golang.org/doc/go1.20#compiler

I understood what changes are to be made ..
But I can't find the text "rejects anonymous interface cycles" which is linked with the url value [https://tip.golang.org/doc/go1.20#compiler]


If I would get the text " rejects anonymous interface cycles" which is linked with https://tip.golang.org/issue/56103 then I will make the appropriate changes which will then be redirected to #56103

Hope you understand
Thanks for helping : )

@rittneje
Copy link
Author

@aryanvarma7272 I think you have misunderstood what is to be done. The link I mentioned in the original issue is just one example of the problem. The fix is NOT to fix the link itself. Rather, it is add/fix the redirection logic in the tip.golang.org server.

Here is where the redirection logic is set up:
https://github.com/golang/website/blob/a69753836928bab0cc4c3a2e6fc127572c1787bf/internal/redirect/redirect.go#L31-L34

For some reason, it seems that code is not running on tip.golang.org (or it isn't working correctly).

@jamalc jamalc modified the milestones: Unreleased, website/later Feb 16, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/475555 mentions this issue: cmd/golangorg: register redirects for tip.golang.org

@David-Mao
Copy link

Any progress on this issue? The problem exists for newer release notes too. For example, in https://tip.golang.org/doc/go1.22 and https://tip.golang.org/doc/go1.23 , the links of issues and go playground pages don't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. website
Projects
None yet
Development

No branches or pull requests

7 participants