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

Automate updating the homebrew (os/x macos darwin) formula #17500

Open
codefromthecrypt opened this issue Jul 27, 2021 · 10 comments
Open

Automate updating the homebrew (os/x macos darwin) formula #17500

codefromthecrypt opened this issue Jul 27, 2021 · 10 comments

Comments

@codefromthecrypt
Copy link
Contributor

Title: Automate updating the homebrew (os/x macos darwin) formula

Description:
Right now, updating the os/x, macos, darwin package is something people have to remember, and sometimes do. It would be better if this was automated.

Ex.

$ brew bump-formula-pr envoy --version 1.19.1
$ brew bump-formula-pr envoy@1.18 --version 1.18.4

Points of note:
This requires permissions, so depending on how it is invoked an appropriate secret store. The permissions required are described in the brew bump-formula-pr

Currently, homebrew supports 2 envoy versions, not the entire release. At the moment, this means updating 1.19 and 1.18, but not 1.17 as it no longer exists cc @carlocab

Sometimes, and not rarely, the build changes in incompatible ways. This means someone should still monitor the PRs and address any drift problems vs assuming they would succeed

In absolute worst case, documentation telling people to update homebrew would be preferred to nothing.

Relevant Links:
https://docs.brew.sh/Formula-Cookbook
https://github.com/mislav/bump-homebrew-formula-action

@codefromthecrypt codefromthecrypt added enhancement Feature requests. Not bugs or questions. triage Issue requires triage labels Jul 27, 2021
@carlocab
Copy link

This might be of interest as well: https://github.com/dawidd6/action-homebrew-bump-formula

@asraa asraa added area/macos and removed triage Issue requires triage labels Jul 27, 2021
codefromthecrypt pushed a commit to tetratelabs/archive-envoy that referenced this issue Aug 25, 2021
This helps us complete patch releases since Envoy aren't actually doing
it, yet.

See envoyproxy/envoy#17500

Signed-off-by: Adrian Cole <adrian@tetrate.io>
codefromthecrypt added a commit to tetratelabs/archive-envoy that referenced this issue Aug 25, 2021
This helps us complete patch releases since Envoy aren't actually doing
it, yet.

See envoyproxy/envoy#17500

Signed-off-by: Adrian Cole <adrian@tetrate.io>
@codefromthecrypt
Copy link
Contributor Author

I started an action to try and do this, but there are problems in the PRs maybe by next time it might work, and in that case I can raise a PR if no one does anything

1.19.1 Homebrew/homebrew-core#83921
1.18.4 Homebrew/homebrew-core#83929

@codefromthecrypt
Copy link
Contributor Author

@carlocab it seems envoy suffers from perpetual build drift with bazel. Do you know an approach to CI so that when projects change things they know if they might break a a formula before the next release?

@codefromthecrypt
Copy link
Contributor Author

It would be helpful if someone intimately familiar with envoy and bazel and the build can audit these also

https://github.com/Homebrew/homebrew-core/blob/master/Formula/envoy.rb
https://github.com/Homebrew/homebrew-core/blob/master/Formula/envoy@1.18.rb

We wasted a lot of people's time and also build server resources as it accidentally had a system dependency on go. It will help the whole ecosystem if this formula had no more deps than necessary and patches could be backported so that there are fewer comments in the file. cc @lizan who noticed the redundant go here

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Sep 26, 2021
@github-actions
Copy link

github-actions bot commented Oct 3, 2021

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

@github-actions github-actions bot closed this as completed Oct 3, 2021
@codefromthecrypt
Copy link
Contributor Author

this should be re-opened as it remains a problem. One note is that order matters, once we implement this.

Upon new minor release (ex 1.21)

  1. run bump PRs for patches (ex 1.20.1, 1.19.3)
  2. after the above merge, change current to latest minor

Since homebrew will maintain only 2 current versions at a time, the above flow will ensure that there is a way to have latest patch of the last 2 minors when a new one comes out. If we skip step one, that won't be possible.

@mattklein123 mattklein123 reopened this Oct 4, 2021
@mattklein123 mattklein123 added area/build help wanted Needs help! and removed enhancement Feature requests. Not bugs or questions. stale stalebot believes this issue/PR has not been touched recently labels Oct 4, 2021
@codefromthecrypt
Copy link
Contributor Author

I've suggested homebrew drops linux support as the continuous problems and lack of ownership here is not acceptable Homebrew/discussions#2271

@codefromthecrypt
Copy link
Contributor Author

PS to help avoid problems in the future, it would be helpful to run CI on brew install --build-from-source envoy --HEAD as this will help identify build failures before a release. For example, if there is drift in bazel or a new build dependency.

Thanks to @keith for adding the syntax to the envoy.rb

@carlocab
Copy link

carlocab commented Dec 7, 2021

You could run a regular CI job that just does brew install --HEAD envoy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants