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

Homebrew autofix #1487

Merged
merged 2 commits into from
Jan 7, 2025
Merged

Homebrew autofix #1487

merged 2 commits into from
Jan 7, 2025

Conversation

filiptronicek
Copy link
Member

Description

A hacky way to rebuild Homebrew when a new one comes out.

@filiptronicek filiptronicek requested review from a team as code owners January 6, 2025 16:11
@kylos101
Copy link
Collaborator

kylos101 commented Jan 7, 2025

Taking a look meow

Copy link
Collaborator

@kylos101 kylos101 left a comment

Choose a reason for hiding this comment

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

const version = data.tag_name;

const patchVersionReplacements = {
'4\\.[0-9][0-9]*\\.[0-9][0-9]*': version,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will help avoid major version updates, nice!

💡 we could reference the desired value in a chunk yaml file (like we do with lang-node and NODE_VERSION), this way we would not hard code "4" here in the regex. However, this is not necessary now, I think. Approving to unblock!

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a nice idea of specifying the version in a chunk, but I am hesitant to do it because of the nondeterministic nature of our upgrades of homebrew (see https://github.com/gitpod-io/workspace-images/pull/1487/files#diff-0c0646c5f75103e0991b9322a68f0f8ad25f71cec07eb1a7b4e8744ad884a6a3R7-R9). We can get rid of the hardcoded major, though.

Copy link
Collaborator

Choose a reason for hiding this comment

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

the version I am referring would only be used here, in the autofix, it wouldn't be used by the dockerfile to install a specific version.

Copy link
Collaborator

Choose a reason for hiding this comment

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

either way, what you have here is nice, and will help autofix minor and patch changes, which is a nice improvement.

does the major version change often, or do we expect it to change soon?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, I see now, let's leave it as-is then. The last major release was in Feb 2023 and the one before that in Feb 2021, so mayyybe a biyearly cadence (or just a coincidence 😄)?

I have GH notifications set up on the releases there so if a major does come out, I'll get to bring it here sooner or later.

@filiptronicek filiptronicek merged commit 2332533 into main Jan 7, 2025
4 checks passed
@filiptronicek filiptronicek deleted the ft/homebrew-autofix branch January 7, 2025 19:59
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