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

Use distpack to create archives #990

Merged
merged 5 commits into from
Aug 9, 2023
Merged

Conversation

dagood
Copy link
Member

@dagood dagood commented Jul 26, 2023

Remove our own code to create build/source archives and use upstream's distpack tool instead.

distpack only works when a VERSION file is present (release branches), but we build microsoft/main tracking upstream master, which doesn't have a VERSION. In this case, I generate a temp VERSION file. This results in local outputs like:

  • go1.22-82d80f8baa-dev.linux-amd64.tar.gz
  • go1.22-82d80f8baa-dev.src.tar.gz

I tested a build with the submodule set to 1.21rc3 without any patches, and the local build produced:

  • go1.21rc3-dev.linux-amd64.tar.gz
  • go1.21rc3-dev.src.tar.gz

There was no file diff vs. upstream's build on go.dev/dl. After adding patches, only the source files we added showed up in the file diff.

This change adds the AzDO build number (locally, dev) so we don't end up with the same tar.gz name for multiple builds that use the same submodule commit. This isn't important for our own infra to work properly, but other infra might cache our artifacts based on filename and it's worth adding uniqueness to keep that working. Also, for devs downloading multiple builds to the same download folder over time, it helps differentiate the files without dealing with (1), (2), etc.

Latest test build here: https://dev.azure.com/dnceng/internal/_build/results?buildId=2230229&view=results

@dagood dagood requested a review from a team as a code owner July 26, 2023 23:31
Copy link
Contributor

@qmuntal qmuntal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Contributor

@chsienki chsienki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

eng/_core/cmd/build/build.go Outdated Show resolved Hide resolved
Co-authored-by: Chris Sienkiewicz <[email protected]>
@dagood dagood enabled auto-merge (squash) August 9, 2023 18:45
@dagood dagood merged commit f887d1f into microsoft/main Aug 9, 2023
19 checks passed
@dagood dagood deleted the dev/dagood/distpack branch September 27, 2023 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants