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

CI: go install action #3760

Closed
wants to merge 2 commits into from
Closed

Conversation

apostasie
Copy link
Contributor

@apostasie apostasie commented Dec 13, 2024

Currently, we carry GO_VERSION around in a bunch of files, along with calls to actions/setup-go, which also comes with it pinned version.

This here suggests we centralize all of that inside a new, in-tree github action that also bundles in the logic for canary and simplify pulling go for the consumer:

  • default strategy is to get the explicitly pinned go version (currently 1.23.4)
  • strategy latest-stable will retrieve the latest patch for the main go version (eg: 1.23.x)
  • strategy old-stable will retrieve the latest patch for the previous go version (eg: 1.22.x)
  • strategy canary will retrieve the latest RC

That should clean-up our CI files a tad, and allow for much simpler / centralized maintenance, and also better control over usage of cache.

@apostasie apostasie force-pushed the ci-go-setup-action branch 11 times, most recently from f709131 to cb49ffc Compare December 13, 2024 22:15
@apostasie
Copy link
Contributor Author

Failures are #3761 and some random network fluke.

@apostasie apostasie changed the title [WIP] Ci go setup action Ci go setup action Dec 13, 2024
@apostasie apostasie marked this pull request as ready for review December 13, 2024 23:01
@apostasie
Copy link
Contributor Author

@AkihiroSuda ready to go, though this is based on top of #3739 which needs to go first.

@apostasie apostasie changed the title Ci go setup action Ci: go setup action Dec 13, 2024
@apostasie
Copy link
Contributor Author

Note that this (temporarily?) disable cache for setup-go, in light of ongoing issues (429) with github provided caching mechanism.

@apostasie apostasie changed the title Ci: go setup action CI: go install action Dec 14, 2024
@apostasie apostasie mentioned this pull request Dec 14, 2024
done < \
<(sed -E 's/^go([0-9]+)[.]([0-9]+)([.]([0-9]+))?(([a-z]+)([0-9]+))?/\1.\2\n\4\n\6\n\7/i' \
<(curl -fsSL "https://go.dev/dl/?mode=json&include=all" | jq -rc .[0].version) \
)
Copy link
Member

Choose a reason for hiding this comment

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

That should clean-up our CI files a tad, and allow for much simpler / centralized maintenance, and also better control over usage of cache.

Sorry, I feel that the maintenance cost is rather increasing with this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rebased to remove the noise.

This particular code has just been moved out of a helper script, so, I am not completely sure what is perceived as adding complexity.

Anyhow, it is fine - these type of feelings are not something we can really argue about. I'll close.

The new action will centralize go version so we stop having them peppered accross different files.
It also provides simple "strategies" that cover all our cases (canary, latest-stable, old-stable).

Signed-off-by: apostasie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants