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

Remove livecheck failures from autobump list #183126

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carlocab
Copy link
Member

@carlocab carlocab commented Sep 1, 2024

The livecheck blocks for autobumped formulae can silently fail. Let's
handle that by automatically removing them from the autobump list when
that happens.

@carlocab carlocab requested review from MikeMcQuaid and a team as code owners September 1, 2024 12:23
@github-actions github-actions bot added workflows PR modifies GitHub Actions workflow files automerge-skip `brew pr-automerge` will skip this pull request labels Sep 1, 2024
@carlocab carlocab force-pushed the autobump-remove-failures branch 4 times, most recently from d1426d5 to a83e75c Compare September 1, 2024 14:00
Comment on lines +182 to +193
if ! jq --exit-status '.state == "OPEN"'
then
gh pr create --fill
fi < <(gh pr view --json=state)
Copy link
Member

@ZhongRuoyu ZhongRuoyu Sep 1, 2024

Choose a reason for hiding this comment

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

gh pr view does not work well when there are multiple PRs with the same branch name. (Try to checkout a new branch named sponsors-maintainers-man-completions in brew --repo and see.) The sync-shared-config workflow relies on the API for this reason.

The livecheck blocks for autobumped formulae can silently fail. Let's
handle that by automatically removing them from the autobump list when
that happens.
if: fromJSON(steps.commit.outputs.push)
env:
GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }}
run: |
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
run: |
working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}
run: |

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Looks good so far! Could this be part of the existing autobump workflow instead? Feels like having another workflow essentially doing autobump but not using the results is going to burn through our rate limits.

@carlocab
Copy link
Member Author

carlocab commented Sep 2, 2024

Looks good so far! Could this be part of the existing autobump workflow instead?

It could, but,

Feels like having another workflow essentially doing autobump but not using the results is going to burn through our rate limits.

I don't think it will help with this, since it'll likely have to do brew livecheck separately and then throw away the result by doing brew bump anyway regardless. Which will be worse for rate limits, since autobump happens every 3 hours instead of once a day. Will have a look.

@MikeMcQuaid
Copy link
Member

I don't think it will help with this, since it'll likely have to do brew livecheck separately and then throw away the result by doing brew bump anyway regardless.

I'm thinking that we could have something in e.g. brew bump itself to manage the autobump list and create PRs directly from that?

Would also be nice to have more logic in Homebrew/brew and less in (more) workflows if possible.

carlocab added a commit to Homebrew/brew that referenced this pull request Sep 2, 2024
This will read from the tap's `.github/autobump.txt` when provided.

See discussion at Homebrew/homebrew-core#183126.
@carlocab
Copy link
Member Author

carlocab commented Sep 2, 2024

I'm thinking that we could have something in e.g. brew bump itself to manage the autobump list and create PRs directly from that?

Yea, maybe. brew bump would need to know about the autobump list, though.

Here's a start: Homebrew/brew#18227

It then needs to handle removal from the autobump list when a step fails, but bump.rb isn't really very transparent about where stuff fails.

carlocab added a commit to Homebrew/brew that referenced this pull request Sep 2, 2024
This will read from the tap's `.github/autobump.txt` when provided.

See discussion at Homebrew/homebrew-core#183126.
carlocab added a commit to Homebrew/brew that referenced this pull request Sep 2, 2024
This will read from the tap's `.github/autobump.txt` when provided.

See discussion at Homebrew/homebrew-core#183126.
carlocab added a commit to Homebrew/brew that referenced this pull request Sep 2, 2024
This will read from the tap's `.github/autobump.txt` when provided.

See discussion at Homebrew/homebrew-core#183126.
dduugg pushed a commit to Homebrew/brew that referenced this pull request Sep 11, 2024
This will read from the tap's `.github/autobump.txt` when provided.

See discussion at Homebrew/homebrew-core#183126.
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge-skip `brew pr-automerge` will skip this pull request stale No recent activity workflows PR modifies GitHub Actions workflow files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants