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

Allow customized location of Go toolset #399

Open
shueybubbles opened this issue Jul 19, 2023 · 4 comments
Open

Allow customized location of Go toolset #399

shueybubbles opened this issue Jul 19, 2023 · 4 comments
Labels
feature request New feature or request to improve the current logic

Comments

@shueybubbles
Copy link

Description:
Please add a parameter to actions/setup-go to enable a customized download location of the Go toolset.

Justification:
Microsoft is directing teams to build Go applications with the new Microsoft build of Go tools. Rewriting action yml to download and extract the Microsoft builds of Go will cost a lot of time across the organization. Centralizing this capability in the existing setup-go action will save time and money. Their base URLs are different from google's but the paths per-version are the same.

@shueybubbles shueybubbles added feature request New feature or request to improve the current logic needs triage labels Jul 19, 2023
@dsame
Copy link
Contributor

dsame commented Jul 20, 2023

Hello @shueybubbles , thanks for the notifying us - we're going to address this issue in the near future.

@dagood
Copy link

dagood commented Jul 20, 2023

I noticed https://go.dev/dl/?mode=json&include=all is being used here, and wanted to give a tip in case this is important: like most forks, we have a small delay between when official Go is available and Microsoft Go has the same version available, so if https://go.dev/dl/?mode=json&include=all is being used to determine which versions are available, it might not be enough to simply swap out the links. We also provide revision releases to fix issues specific to the Microsoft fork (1.20.6-1) that could interfere with caching logic depending on how that's handled.

Just recently we've put together a chain of links that can get to our latest builds:

  • https://github.com/microsoft/go/blob/microsoft/main/eng/doc/release-branch-links.json has a list of aka.ms links that are updated to point at the latest build of each major version of Go we support on the day we release the Microsoft Go build.
  • Downloading the manifest listed inside that file (like https://aka.ms/golang/release/latest/go1.20.assets.json) lists the permanent links for the latest version of 1.20.x as of that moment.
    • If you don't use the manifest and download the archive+checksum+signature aka.ms links directly, you could hit a race condition: grabbing https://aka.ms/golang/release/latest/go1.20.linux-amd64.tar.gz and https://aka.ms/golang/release/latest/go1.20.linux-amd64.tar.gz.sha256 on a release day could mean you end up downloading a tar.gz for 1.20.5 and a checksum for 1.20.6 if the timing's just right--and those wouldn't match up.

We don't have any repository of every version we've ever released, however, other than the Git tags on the microsoft/go repo. A link like go1.20.6.assets.json or go1.20.6-1.assets.json does work, but we don't have a list of all the possible links.

If this isn't enough to support microsoft/go in setup-go and something more directly similar to https://golang.org/dl/?mode=json and https://golang.org/dl/?mode=json&include=all is necessary to make this feasible, let me know. 🙂 It's in the realm of possibility for us to implement, it just doesn't match up with any of the infrastructure we currently have so it will take some time.

@dsame dsame removed the needs eyes label Jul 28, 2023
@dsame dsame self-assigned this Aug 24, 2023
@dsame dsame added investigation The issue is under investigation and removed needs eyes labels Aug 24, 2023
@dsame
Copy link
Contributor

dsame commented Aug 24, 2023

Hello @shueybubbles ,

I do not think it makes sense to provide Microsoft Go Tools as a part of the action because the main purpose of microsoft/go is to build FIPS 140-2 compliant applications, and this assumes the build tools must be managed by a developer and not by a 3rd party.

@dagood
Copy link

dagood commented Aug 24, 2023

the build tools must be managed by a developer and not by a 3rd party.

Assuming this is the case (I haven't heard it before, and it doesn't seem to me like a distinction that can be made easily, if at all), then it would still be useful to run Microsoft Go in GitHub CI to make sure the application functions using OpenSSL/CNG even when external contributors are submitting PRs. Later, the program can be built again in internal systems for FIPS compliance.

@dsame dsame added needs eyes and removed investigation The issue is under investigation needs eyes labels Aug 28, 2023
@dsame dsame removed their assignment Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

4 participants
@dsame @shueybubbles @dagood and others