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 publish on release does not work #6613

Closed
sbueringer opened this issue Jun 8, 2022 · 25 comments
Closed

Homebrew publish on release does not work #6613

sbueringer opened this issue Jun 8, 2022 · 25 comments
Labels
area/clusterctl Issues or PRs related to clusterctl area/release Issues or PRs related to releasing help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@sbueringer
Copy link
Member

Looks like our homebrew action does not work / probably never worked before.

It seems to depend on a personal access token which we don't really want to use.

For more context, see: https://kubernetes.slack.com/archives/C8TSNPY4T/p1653909691012589

xref: Action logs: https://github.com/kubernetes-sigs/cluster-api/actions/workflows/update-homebrew-formula-on-release.yml

/kind bug
[One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels]

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 8, 2022
@sbueringer sbueringer added the area/release Issues or PRs related to releasing label Jun 8, 2022
@sbueringer
Copy link
Member Author

I would suggest to drop the current action.

It's not really useful to keep it failing going forward.

@CecileRobertMichon @fabriziopandini @enxebre @vincepri Opinions?

@fabriziopandini
Copy link
Member

+1 to drop current action

We should investigate how this is done in the Kubernetes project, because relying on personal tokens is not sustainable

@sbueringer
Copy link
Member Author

Opened PR #6816 to drop the action. I would keep the issue around to look for a new solution.

@killianmuldoon
Copy link
Contributor

Related to #4370

@fabriziopandini fabriziopandini added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Jul 29, 2022
@fabriziopandini fabriziopandini added the area/clusterctl Issues or PRs related to clusterctl label Aug 5, 2022
@fabriziopandini
Copy link
Member

/triage accepted

@k8s-ci-robot k8s-ci-robot added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Aug 5, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 3, 2022
@fabriziopandini
Copy link
Member

/lifecycle frozen
/help

cc @ykakarap possible improvement to the release automation

@k8s-ci-robot
Copy link
Contributor

@fabriziopandini:
This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/lifecycle frozen
/help

cc @ykakarap possible improvement to the release automation

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Nov 3, 2022
@sbueringer
Copy link
Member Author

sbueringer commented Nov 3, 2022

Disclaimer: Probably hard to automate entirely as we don't want to use personalized GitHub tokens and it's non trivial to push to community owned forks like the cherry pick bot.

But maybe there's prior art or ways to optimize the manual process a bit

@fabriziopandini
Copy link
Member

I was thinking something like kpromo, so we create the PR automatically but using personal github token
but I agree the first step should be checking how this is done in K8s

@sbueringer
Copy link
Member Author

Sounds good as a fallback.

Just remembered that kubectl is available via homebrew, so we can definitely ask the k/k release team how they are doing it.

@ykakarap
Copy link
Contributor

During the v1.3.2/v1.2.9 release we observed that homebrew seems to have introduced some kind of automation to automatically pick up the new version of clusterctl when available.
That automation should take care of doing the homebrew publishing steps for our releases.
Let's keep an eye on that automation to be sure that it continues to do what the bump process.

cc @alexander-demicev

@alexander-demicev
Copy link
Contributor

Seems like the issue is resolved by introduction of a bump bot in homebrew, see this thread for context https://kubernetes.slack.com/archives/C8TSNPY4T/p1673372872896449?thread_ts=1673227707.288409&cid=C8TSNPY4T

@furkatgofurov7
Copy link
Member

@ykakarap @sbueringer looks like we can close this issue as completed, then?

@sbueringer
Copy link
Member Author

Fine for me!

@furkatgofurov7
Copy link
Member

furkatgofurov7 commented Feb 8, 2023

Hey folks, I was checking it a bit, but I could not find a automated bot PR for clusterctl in homebrew repo. I could only find Homebrew/homebrew-core#120231 that we did not open, but this seems to be not from the bot rather a homebrew maintainer?

@sbueringer
Copy link
Member Author

I think the maintainer is running a bot with his account. There are a lot of PRs opened under his name with those PR descriptions:
image

But we can also just ask him if he runs a bot or if he runs a script from time to time.

@furkatgofurov7
Copy link
Member

I think the maintainer is running a bot with his account. There are a lot of PRs opened under his name with those PR descriptions: image

But we can also just ask him if he runs a bot or if he runs a script from time to time.

Sure, waiting for response here: Homebrew/discussions#4260

@furkatgofurov7
Copy link
Member

furkatgofurov7 commented Feb 22, 2023

Based on the conversation with homebrew maintainers, here are my findings:

Side notes:

  • k/k repo also has the same configuration for kubectl but as I noticed, they also tend to open the PR manually most of the time without waiting for the bot to do it.
  • sometimes bot opened PR build can fail for some reasons (i.e kubernetes-cli 1.24.4 Homebrew/homebrew-core#108335 (comment)), so if that is the case, anyways the manual PR needs to be opened. But that is alreaady tracked if we decide to fully rely on bot.

@sbueringer
Copy link
Member Author

Maybe we should just continue checking if the PR is already open and otherwise open it ourselves. Instead of waiting a few days and then potentially still opening the PR ourselves.

@sbueringer
Copy link
Member Author

@furkatgofurov7 WDYT should we do with this issue?

I think basically documenting that we should check if the PR exists and create it otherwise should be fine (which is what we currently have documented) and we can close this issue.

I'm not sure it makes sense to invest in more automation given that we have no good idea on how to do it.

@furkatgofurov7
Copy link
Member

@sbueringer I am fine with closing it. My intention reaching out to maintainers of homebrew was to clarify if we really have an automation in place or not.

I'm not sure it makes sense to invest in more automation given that we have no good idea on how to do it.

well, as I mentioned above:

some kind of automation is there, but it is not quick enough to open a PR right away and takes time (in days 😄), but we usually open a PR right away during releasing process, which makes it useless IMO. So, I do agree on not investing more time on finding/implementing a new automation around it.

@sbueringer
Copy link
Member Author

sbueringer commented Mar 15, 2023

Yup agree the automation on the homebrew side is not very useful to us.

It basically comes down to: are we fine with opening the PR manually or do we want to invest in finding a way to automate it.

I just don't see a way to automate it without someone configuring their personal GitHub token somewhere, which seems like a no-go. The alternative is probably to create a special GitHub user (not sure if possible given GitHub terms and conditions and upcoming enforced 2FA) / GitHub application / .. (like Kubernetes has for Prow (?)). But that seems way too much effort.

@sbueringer
Copy link
Member Author

Just discussed this again. It's simply not worth the effort to implement and maintain the automation.

Let's just open the PRs manually.

/close

@k8s-ci-robot
Copy link
Contributor

@sbueringer: Closing this issue.

In response to this:

Just discussed this again. It's simply not worth the effort to implement and maintain the automation.

Let's just open the PRs manually.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clusterctl Issues or PRs related to clusterctl area/release Issues or PRs related to releasing help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: Cancelled/Won't do
Development

No branches or pull requests

8 participants