-
Notifications
You must be signed in to change notification settings - Fork 18k
api: API check test should disallow API additions after an api/go1.N.txt is created (currently it does this only after a VERSION file is added) #43956
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
Comments
The cause appears to be that as long as the runtime.Version() contains "devel" (which it does until a VERSION file is added on a release branch, something that happens during the rc1 release and its tests), API additions are considered okay, but API removals are not. The fix here may to be change it so that both API additions and removals are not okay after the go1.N.txt file is made for a given release in development. |
I have a counter-proposal: remove next.txt entirely, and make API skew fail TryBots at all times. The current lifecycle of an API change is:
This has two major shortcomings: it lets API changes happen inadvertently in the original CL, and lets skew happen after the review. The latter would be addressed by the current proposal, the former wouldn't. The current process also involves manual steps that serve no purpose AFAICT. If we eliminate next.txt and block any skew, then the lifecycle becomes:
If people would prefer not getting heckled by all.bash while experimenting, we can make all.bash just output the diff with no error, and only error out on the builders, so the go1.X.txt file can be changed only once before mailing the CL. |
Copying @rsc's comment from #43407 (comment) here:
|
Right, I disagree that forcing something as important as adding an API to explicitly opt-in is bad. The merge (or revert) conflicts came up before about release notes, but we switched anyway to release notes in CLs, and I didn't hear about much annoyance from it. I don't think anyone looks at the all.bash output, since we went whole cycles with an empty next.txt. |
Change https://golang.org/cl/315350 mentions this issue: |
Change https://golang.org/cl/315349 mentions this issue: |
@FiloSottile After taking some time to think about it carefully, I'm in agreement with the suggestion you made. I, too, now believe there is a good chance that removing our use of next.txt and requiring an api/go1.txt to exist and be complete during the entire development cycle has favorable trade-offs. The attention paid to API review would be be spread more evenly during the entire cycle, rather than more towards the end, which feels like an improvement. However it will affect all Go developers during the development cycle, and probably needs a little more discussion/feedback than what's happened in this issue so far (and we'd want to communicate it more widely to golang-dev@ to give people a heads up). I think rather than describing it as a "counter-proposal" (which I interpret to mean we should do something incompatible/in a different direction), it's a suggestion to take two compatible steps in the same direction instead of one smaller step. Where we currently are, API additions are reported quietly (no loud test failure):
If we make the change originally suggested in #43956 (comment), it becomes:
If we make the change later suggested in #43956 (comment), then:
For now, I want to ensure we don't get a repeat of the situation that happened during the Go 1.16 cycle (what this issue was filed about), and it seems everyone's in agreement to disallow silent API additions after Beta 1. Let's do that first, since it's seemingly quick and non-controversial, and consider your suggestion afterwards. It can only apply to a future cycle anyway (too late for 1.17), so we can still consider it before the tree opens for Go 1.18 development. I mailed CL 315350 which will fix this issue and I think we can get it in before Go 1.17 Beta 1. If that happens, let's follow up with your suggestion in a separate issue (or proposal). One more thing: if CL 315350 is submitted, implementing your suggestion will become a matter of adding a "api/go1.n.txt" file earlier in the release cycle than Beta 1 (perhaps after all "early in cycle" CLs have landed). If we find it's too disruptive and not helping as expect, we can simply remove that file, and re-add it at Beta 1 again. So it's a small diff to try it and adjust based on findings. |
There's no reason not to, and it'll help me test an upcoming fix for #43956. The API additions look reasonable to me, and they'll go through a more comprehensive API audit during the freeze. Change-Id: I0daa6e978b199d69568f5100fdfc1b4bcfaeaef2 Reviewed-on: https://go-review.googlesource.com/c/go/+/315349 Trust: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
I found/realized another benefit of this change is that it reduces friction during early pre-release testing. Previously, the API check would always fail since the VERSION file is written by the time release tests run, and it required either manually skipping over the false-positive, or testing on top of a "DO NOT SUBMIT because it's too early for it" CL that preemptively creates api/go1.n.txt file. Now that test no longer runs before the api/go1.n.txt file is created, behavior during release tests is the same as during normal tests. |
CL 276454 promoted api/next.txt to api/go1.16.txt, and all API additions in that file were reviewed in #43407.
When we started cutting Go 1.16 RC 1, we found out (via release testing) that there was a skew between api/go1.16.txt and the actual API.
This issue is about improving the process so we notice this sooner, to avoid the possibility of incurring a delay in the RC release process.
CC @golang/release, @ianlancetaylor.
The text was updated successfully, but these errors were encountered: