Skip to content

brew bump-formula-pr should truncate long PR bodies #19837

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

Closed
3 tasks done
Moglum opened this issue Apr 28, 2025 · 1 comment · Fixed by #19989
Closed
3 tasks done

brew bump-formula-pr should truncate long PR bodies #19837

Moglum opened this issue Apr 28, 2025 · 1 comment · Fixed by #19989
Assignees
Labels
help wanted We want help addressing this

Comments

@Moglum
Copy link

Moglum commented Apr 28, 2025

brew doctor output

> brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  icu4c@76

Warning: The following formulae have the same name as core formulae:
  alexnabokikh/tfsort/tfsort
  aws/tap/eksctl
  azure/kubelogin/kubelogin
  busser/tap/tfautomv
  derailed/popeye/popeye
  goreleaser/tap/goreleaser
  goreleaser/tap/nfpm
  kubeshark/kubeshark/kubeshark
  minamijoyo/hcledit/hcledit
  minamijoyo/tfupdate/tfupdate
  vmware-tanzu/carvel/kapp
  vmware-tanzu/carvel/kbld
  vmware-tanzu/carvel/ytt
Their taps are in use, so you must use these full names throughout Homebrew.

Verification

  • My "brew doctor output" above says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update twice and am still able to reproduce my issue.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

brew config output

❯ brew config
HOMEBREW_VERSION: 4.4.32-75-g50b70e3
ORIGIN: https://github.com/Homebrew/brew
HEAD: 50b70e3cb72e994cd7f530960dfb47255fdf2a34
Last commit: 3 hours ago
Branch: master
Core tap HEAD: a5729e56492cde8ade31f0ab9bd522c76231cdf0
Core tap last commit: 10 minutes ago
Core tap JSON: 28 Apr 10:26 UTC
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_BROWSER: wslview
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: :0
HOMEBREW_EDITOR: code -w
HOMEBREW_MAKE_JOBS: 20
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.4.3 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.4.3/bin/ruby
CPU: 20-core 64-bit alderlake
Clang: 20.1.3
Git: 2.49.0 => /home/linuxbrew/.linuxbrew/bin/git
Curl: 8.5.0 => /bin/curl
Kernel: Linux 5.15.167.4-microsoft-standard-WSL2 x86_64 GNU/Linux
OS: Ubuntu 24.04.2 LTS (noble)
WSL: 2 (Microsoft Store)
Host glibc: 2.39
/usr/bin/gcc: 13.3.0
/usr/bin/ruby: N/A
glibc: N/A
gcc@11: N/A
gcc: 14.2.0_1
xorg: N/A

What were you trying to do (and why)?

I wasn't sure if this fits more here or in Homebrew/core, but I believe it's a bug in brew. I'd be happy to open a separate issue if needed.

I wanted to upgrade Kyverno CLI to the latest released version 1.14.0 https://github.com/kyverno/kyverno/releases/tag/v1.14.0, but it wasn't available.
I tried looking for an existing open PR for https://github.com/Homebrew/homebrew-core/blob/a5729e56492cde8ade31f0ab9bd522c76231cdf0/Formula/k/kyverno.rb
Eventually, I learned about brew bump and tried

❯ brew bump kyverno
==> kyverno
Formula is autobumped so will have bump PRs opened by BrewTestBot every ~3 hours.

What happened (include all command output)?

The cause seems to be that the autobump CI Action is failing with:

Failure while executing; `/usr/bin/env git push --set-upstream ***github.com/Homebrew/homebrew-core bump-kyverno-1.14.0:bump-kyverno-1.14.0` exited with 1. Here's the output:
To https://github.com/Homebrew/homebrew-core
 ! [rejected]                bump-kyverno-1.14.0 -> bump-kyverno-1.14.0 (non-fast-forward)
error: failed to push some refs to 'https://github.com/Homebrew/homebrew-core'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. If you want to integrate the remote changes,
hint: use 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

https://github.com/Homebrew/homebrew-core/actions/runs/14703087451/job/41256558075#step:6:7819

The errors started , just after the new version got released with:

Error: Unable to open pull request: Validation Failed: [{"resource" => "Issue", "code" => "custom", "field" => "body", "message" => "body is too long (maximum is 65536 characters)"}]!

https://github.com/Homebrew/homebrew-core/actions/runs/14655527237/job/41129811771#step:6:7657

Maybe it's caused by the very long release notes in https://github.com/kyverno/kyverno/releases/tag/v1.14.0 which brew bump is not able to handle?

What did you expect to happen?

The Kyverno formula should have been autobumped by the normal CI process.

Step-by-step reproduction instructions (by running brew commands)

Run the `Bump formulae on schedule or request` CI Workflow 
https://github.com/Homebrew/homebrew-core/actions/workflows/autobump.yml

Kyverno fails with
@carlocab carlocab transferred this issue from Homebrew/brew Apr 28, 2025
@carlocab
Copy link
Member

Deleting the existing branch and attempting another autobump results in

Error: Unable to open pull request: Validation Failed: [{"resource" => "Issue", "code" => "custom", "field" => "body", "message" => "body is too long (maximum is 65536 characters)"}]!

https://github.com/Homebrew/homebrew-core/actions/runs/14707432565/job/41271030429#step:6:51

We probably need to truncate the auto-generated PR body.

@carlocab carlocab changed the title brew bump in homebrew-core CI is failing brew bump-formula-pr should truncate long PR bodies Apr 28, 2025
@carlocab carlocab transferred this issue from Homebrew/homebrew-core Apr 28, 2025
@carlocab carlocab added the help wanted We want help addressing this label Apr 28, 2025
@MikeMcQuaid MikeMcQuaid self-assigned this May 21, 2025
@MikeMcQuaid MikeMcQuaid assigned issyl0 and unassigned MikeMcQuaid May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We want help addressing this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants