-
Notifications
You must be signed in to change notification settings - Fork 29
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
Include Go version in name of artifact (tar.gz, zip) #140
Comments
We should do something like this either way, to make it easy to see which Microsoft build you have even if the tar.gz is already extracted. (E.g. in a Docker image.) |
This makes the most sense to me. It aligns with our goal of making the process of moving from the official binaries / images to the ones that we produce as simple as changing the URL they're grabbing from.
I think we should consider adding the Microsoft name + build number into commands like |
👍 I poked around, and found a few places to start figuring out the next steps: Lines 246 to 261 in 1e06f77
go/src/cmd/link/internal/ld/data.go Lines 2185 to 2204 in 1e06f77
go/src/cmd/go/internal/version/version.go Lines 161 to 208 in 1e06f77
|
I tried something super simple here: go/src/cmd/link/internal/ld/main.go Lines 125 to 129 in 3632084
}
+ buildVersion += " Hello from dagood"
addstrdata1(ctxt, "runtime.buildVersion="+buildVersion) But, that gives me a bunch of "stale dependency" errors: https://gist.github.com/dagood/c6a870e9eb8859469076aa0babc90781
Adding our extra string this way is modifying the linker (and anything built by "our" linker), and the build version seems to be included in content hash checks. I'm not quite sure where exactly the checks are taking place. The build has already gone through a few rounds of bootstrapping at this point, so I wouldn't have thought it would be an issue. I found golang/go#46377 about the same error messages, but different scenario. It has some context around what's being built/checked here. I haven't quite processed what it means for us yet. For now I think we should drop |
Wow, that's quite surprising. I would not have expected it to have semantic meaning for the build. Assuming it was just for developer benefit. Yes I agree for now we need to go with the simpler |
Seeing this again later... an ergonomic reason to do this would be to make our aka.ms link If we do this, we should include the revision ( |
We should consider including the Go version in these names (when we are building a versioned branch):
The official tar.gz/zip files look like this:
Upstream checks in a
VERSION
file when they fork a branch, then update it with every patch release:go/VERSION
Line 1 in bc51e93
We could use that file to include both the Go version and Microsoft build number:
go1.16.6.20210716.4.linux-amd64.tar.gz
.Or we could remove the build number to match upstream perfectly, however we should be sure that you can trace a given Go build back to the AzDO build that produced it. (We could simply put our own new file with this info into
GOROOT
, as a sibling of the existingVERSION
file inGOROOT
.)I don't know of any particularly strong reasons to do this, though:
tar.gz
is which if you've downloaded a few of them over time. (Build number is not mappable back to a branch name without looking for the build on AzDO and seeing which branch it used.)The text was updated successfully, but these errors were encountered: