-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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/tools/godoc/redirect: offer Gerrit/Rietveld CL disambiguation when needed #28836
Comments
Change https://golang.org/cl/150057 mentions this issue: |
Go's CL numbers as assigned by Gerrit have started to collide with the lower numbers in the sparse set of CL numbers as returned by our old code review system (Rietveld). The old heuristic no longer works now that Gerrit CL numbers have reached 150000. Instead, include a map of the low Rietveld CL numbers where we might overlap and bump the threshold heuristic up. Updates golang/go#28836 Change-Id: Ice719ab807ce3922b885a800ac873cdbf165a8f7 Reviewed-on: https://go-review.googlesource.com/c/150057 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
Is there any way we could knock out the Rietveld CL numbers from Gerrit's numbering space? |
@aclements, yeah, I had also mused about that this morning with Bryan. @andybons, could you talk to the Gerrit team about that? The initial numbers of concern are listed here: To get numbers higher than 300,000, run:
|
Will do. |
They can change the number to whatever we want in the future. Where do we want to start at now? |
The problem is the Rietveld numbers were sparse and got very large. We don't want a dozen digits in our CL numbers. That's more painful than the annoyance cost or occasional collisions. I suppose we could look for the largest early gap. |
Change https://golang.org/cl/150577 mentions this issue: |
Go's CL numbers as assigned by Gerrit have started to collide with the lower numbers in the sparse set of CL numbers as returned by our old code review system (Rietveld). The old heuristic no longer works now that Gerrit CL numbers have reached 150000. Instead, include a map of the low Rietveld CL numbers where we might overlap and bump the threshold heuristic up. Updates golang/go#28836 Change-Id: Ice719ab807ce3922b885a800ac873cdbf165a8f7 Reviewed-on: https://go-review.googlesource.com/c/150057 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> (cherry picked from commit e77c068) Reviewed-on: https://go-review.googlesource.com/c/150577
golang.org has been redeployed with the CL 150057 change applied, so short links like https://golang.org/cl/150057 are correctly pointing to Gerrit CLs now. |
I believe this issue is now fully resolved by CL 150057, redeploying golang.org, and @andybons taking measures to prevent future Gerrit CL numbers from overlapping with existing Rietveld CLs. We won't need a CL disambiguation page. Closing to reflect reality (but feel free to re-open if I'm missing something, or there is more follow-up work to be done). |
I'm on that email thread and I haven't gotten any update from the Gerrit team. Duplicates are still possible. They'll be rare, but possible. I'd like Gerrit to mark all our old Rietveld numbers in https://go-review.googlesource.com/c/tools/+/150057/5/godoc/redirect/rietveld.go#36 as reserved so they'd never be handed out to us again. Reopening until we do one of these: a disambiguation page, or modifying Gerrit. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Looks like we already missed the window on avoiding collisions: |
@bcmills, we can still minimize them going forward if Gerrit folk can reserve those IDs for us. |
We just hit this again in #29633 for CL 157099, which exists both in Gerrit and Rietveld. There are 837 more numbers that follow, so we're going to continue hit the issue for a while. There haven't been any new updates on the Gerrit email thread.
We can query the Gerrit API to figure out if a Rietveld CL is also a Gerrit CL (and cache results). I'll implement this and send a CL. |
Change https://golang.org/cl/157197 mentions this issue: |
@gopherbot Please backport to Go 1.11, so this change can be deployed to golang.org. |
Backport issue(s) opened: #29645 (for 1.11). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Reopening for deploy of golang.org with the fix applied. |
golang.org has been redeployed with the fix. For example, https://golang.org/cl/157099 now displays a disambiguation page rather than immediately redirecting to Rietveld CL 157099, since a CL with that number exists in both systems. |
Nicely done. |
…eeded For CL numbers that are determined to be Rietveld CLs, instead of immediately redirecting, check whether a Gerrit CL with the same number also exists. Do so by querying the Gerrit API and caching the existing CLs. If both exist, display a very simple disambiguation HTML page. Cache Gerrit CLs that exist, to avoid querying the remote API server more than once per CL. We can't cache Gerrit CLs that don't exist, since they might get created in the future. Fixes golang/go#28836 Change-Id: I08c32dc82a0136788337c5c32028e87428e8d81e Reviewed-on: https://go-review.googlesource.com/c/157197 Reviewed-by: Brad Fitzpatrick <[email protected]>
Go's CL numbers as assigned by Gerrit have started to collide with the lower numbers in the sparse set returned by the old Rietveld code review system we used to use.
Our
https://golang.org/cl/NNNN
handler should render a disambiguation page when the CL exists in both./cc @bcmills @dmitshur @andybons @adg
The text was updated successfully, but these errors were encountered: