go-review.git.corp.google.com URLs

212 views
Skip to first unread message

Daniel Martí

unread,
Sep 8, 2022, 3:57:44 PM9/8/22
to golang-dev
Hi all,

Recently, Gerrit CL links have been popping up in the form of

https://go-review.git.corp.google.com/c/go/+/341936

rather than the usual

https://go-review.googlesource.com/c/go/+/341936

Note that the former takes everyone else to a confusing login page,
when in fact go-review is public.
It's not a huge inconvenience to manually fix up the URL when trying to
follow the link, but it's still a mundane step to have to do repeatedly.

Something must have changed internally at Google recently,
like googlesource.com in Google's corp network redirecting users to
git.corp.google.com, because this has started happening in the last
couple of weeks, for example:

https://github.com/golang/go/issues/54657#issuecomment-1226046596
https://github.com/golang/go/issues/26849#issuecomment-1241156896
https://github.com/golang/go/issues/54655#issuecomment-1226398293

Can something be done to alleviate this at Google?
Ideally we would all use short links like https://go.dev/cl/341936,
but I think many developers like me often copy-paste whatever URL their
browser is on, which is the quickest way :)

Bryan C. Mills

unread,
Sep 8, 2022, 4:41:13 PM9/8/22
to Daniel Martí, golang-dev
There is a Google-internal Chrome extension that produces links in the shortened, public form. I'm happy to help any Googlers install and configure it (just send me a message out-of-band).

Russ Cox

unread,
Sep 9, 2022, 1:35:30 PM9/9/22
to Daniel Martí, golang-dev
On Thu, Sep 8, 2022 at 3:57 PM 'Daniel Martí' via golang-dev <golan...@googlegroups.com> wrote:
Something must have changed internally at Google recently,
like googlesource.com in Google's corp network redirecting users to
git.corp.google.com, because this has started happening in the last
couple of weeks, for example:

        https://github.com/golang/go/issues/54657#issuecomment-1226046596
        https://github.com/golang/go/issues/26849#issuecomment-1241156896
        https://github.com/golang/go/issues/54655#issuecomment-1226398293

Can something be done to alleviate this at Google?

I apologize. Your inference is correct, and it has something to do with checking that Googler reviewers are on Google-secured machines. (I don't understand all the details.) I warned people when the change happened to be careful about fixing links before pasting them, and even I've forgotten and made that mistake, as you documented. 

I have been meaning for years to write a bot that goes around cleaning up GitHub comments on the Go repo, doing things like automatically linking "CL 12345". Maybe I will finally do that, and it could fix these URLs too. Unless anyone knows of such a thing that already exists?

Best,
Russ




Zik Aeroh (Zikaeroh)

unread,
Sep 9, 2022, 6:51:47 PM9/9/22
to golang-dev
I don't know if the Go GitHub organization is on the right plan, but GitHub has the ability to do something like this automatically: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources

(I don't know if it supports a trailing space in the prefix; most examples I see are written like "JIRA-<number", so it might have to be "CL-<number>" rather than the current "CL <number>" people commonly write and link themselves, or autolink in gerrit.)

Sean Liao

unread,
Sep 9, 2022, 6:58:23 PM9/9/22
to golang-dev
GitHub autolinks can't handle trailing spaces.

- sean

--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-dev/05c2e658-4558-49f1-9001-a9b30ed5f1e3n%40googlegroups.com.

Filippo Valsorda

unread,
Sep 13, 2022, 1:09:37 PM9/13/22
to golang-dev
I missed that tool, so I made a mini version of it as a bookmarklet.


The idea is that you click it while on https://go-review.googlesource.com/c/go/+/420454 and you get https://go.dev/cl/420454 copied to your clipboard (or the original URL if there is no shortening match).
Reply all
Reply to author
Forward
0 new messages