dependabot-core
dependabot-core copied to clipboard
Merge failed: Commit message is too long (maximum is 16383 characters)
Is there an existing issue for this?
- [x] I have searched the existing issues
Package ecosystem
cargo
Package manager version
No response
Language version
No response
Manifest location and content before the Dependabot update
/Cargo.toml
dependabot.yml content
https://github.com/NomicFoundation/slang/blob/main/.github/dependabot.yml
Updated dependency
https://github.com/NomicFoundation/slang/pull/778
What you expected to see, versus what you actually saw
Expected
A valid commit that can be merged.
Actual
Enabling auto-merge failed. Commit message is too long (maximum is 16383 characters).
Maybe for such extreme cases, we can just truncate the message?
Native package manager behavior
No response
Images of the diff or a link to the PR, issue, or logs
https://github.com/NomicFoundation/slang/pull/778/commits/7cf724188dc802db2c1f7d72231c75d9e60a8d9f
Smallest manifest that reproduces the issue
No response
@OmarTawfik
I am unable recreate above problem
Step I followed are below
- git clone the repo to local https://github.com/NomicFoundation/slang.git
git clone https://github.com/NomicFoundation/slang.git
- Ran cargo build against it ensure repo is working as expected
$ cargo install "slang_solidity"
Updating crates.io index
# build ran without any problem.
- Create a new repo with same code to test against dependabot
https://github.com/thavaahariharangit/slang
- Ran dependabot check updates against https://github.com/thavaahariharangit/slang
insight -> dependency graph -> dependabot -> check for updates
# it generated 5 PRs
- merged 4 PR without any error.
Only error I saw while running check for updates is
10:34:17 ERROR <job_826520924> Error processing url (RuntimeError)
updater | 2024/05/10 10:34:17 ERROR <job_826520924> Failed to update url!
updater | 2024/05/10 10:34:17 ERROR <job_826520924> /home/dependabot/cargo/lib/dependabot/cargo/file_updater/lockfile_updater.rb:45:in `block in updated_lockfile_content'
updater | 2024/05/10 10:34:17 ERROR <job_826520924> /home/dependabot/common/lib/dependabot/shared_helpers.rb:81:in `block in in_a_temporary_directory'
But it is not related to this ticket.
Could you please let me know the steps to reproduce and let me know why you think this issue is related to dependabot pls
FYI @abdulapopoola and @jurre @sachin-sandhu
@OmarTawfik
Reg: Analyzing on https://github.com/NomicFoundation/slang/pull/930
And this PR is not generated by dependabot, I couldn't find the job related to this PR
Hi @thavaahariharangit
I see in your fork, you are testing the slang
repo from the latest main
commits, not when this issue was created. The bug happened when dependabot ran on February 3rd. You can see the commit created by dependabot here: https://github.com/NomicFoundation/slang/commit/7cf724188dc802db2c1f7d72231c75d9e60a8d9f
You can possibly try to reproduce the same update commit by running against its parent commit, not the latest main
: https://github.com/NomicFoundation/slang/commit/307c0b8dea14f7674a6d67c6ad600092ffc48180
But I don't think you necessarily need to reproduce it. You can just check the commit message locally if you want. This update commit message has 40841 characters, because there were many dependencies updated. But the maximum allowed by GitHub to merge a PR is 16383 characters, so it can never be merged, resulting the error I posted above. To unblock ourselves, I had to check out the PR locally, edit the commit message to truncate it, then force push and try to merge again.
I believe dependeabot should enforce the same length on the commits it creates, to match GitHub restrictions, truncating the message if it was too long.
As for the other url
error, it is indeed a second unrelated issue, which is still happening today. I filed #8989 for it separately to be fixed.
Hi @OmarTawfik ,
I went through the dependabot generated PR commit message (9feb42d8) and found the length to be 65849 ( git show -s --format=%B 9feb42d8 | wc -c ) . GitHub has a max limit of 65536 chars for a commit message. Hence the PR generated an issue. We are pushing a fix that should fix this issue.
Closing the issue as fix is deployed.
Resolved by https://github.com/github/dependabot-api/pull/5305