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

Dependabot failed to create a pull request: 422 - Must supply a valid tree.mode #11715

Open
1 task done
NGMarmaduke opened this issue Mar 3, 2025 · 3 comments
Open
1 task done
Labels
L: ruby:bundler RubyGems via bundler T: bug 🐞 Something isn't working

Comments

@NGMarmaduke
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Package ecosystem

Bundler

Package manager version

No response

Language version

Ruby 3.4.1

Manifest location and content before the Dependabot update

/Gemfile

source "https://rubygems.org"

ruby file: ".ruby-version"

gem "bootsnap", require: false
gem "cssbundling-rails"
gem "google_sign_in"
gem "haml"
gem "jsbundling-rails"
gem "pg"
gem "propshaft"
gem "puma"
gem "rails", "~> 8.0"
gem "sentry-raven"
gem "slack-ruby-block-kit"
gem "slack-ruby-client"
gem "turbo-rails"

group :development, :test do
  gem "dotenv"
  gem "pry-byebug"
  gem "standard"
  gem "standard-rails"
end

group :test do
  gem "capybara"
  gem "factory_bot"
  gem "rspec-rails"
  gem "selenium-webdriver"
  gem "sinatra"
  gem "webmock"
end

dependabot.yml content

version: 2
updates:
- package-ecosystem: "bundler"
  directory: "/"
  schedule:
    interval: "weekly"
    day: "monday"
    time: "06:00"
  open-pull-requests-limit: 7
  versioning-strategy: lockfile-only
  allow:
  - dependency-type: direct
  groups:
    rails:
      patterns:
      - "rails"
      update-types:
      - "minor"
    minor-and-patch:
      update-types:
      - "patch"
      - "minor"
- package-ecosystem: "npm"
  directory: "/"
  schedule:
    interval: "weekly"
    day: "monday"
    time: "06:00"
  open-pull-requests-limit: 7
  groups:
    minor-and-patch:
      update-types:
      - "patch"
      - "minor"

Updated dependency

No response

What you expected to see, versus what you actually saw

I expected a PR to be raised for the 'minor' group however no pull request was created, output from depenabot logs:

+------------------------------------------------------------------------------------------------------------------------------------+
|                                                Changes to Dependabot Pull Requests                                                 |
+---------+--------------------------------------------------------------------------------------------------------------------------+
| created | cssbundling-rails ( from 1.4.1 to 1.4.2 ), slack-ruby-block-kit ( from 0.25.0 to 0.26.0 ), turbo-rails ( from 2.0.11 ... |
+---------+--------------------------------------------------------------------------------------------------------------------------+

Error message on the dependabot update detail screen:

Dependabot failed to create a pull request
Dependabot ran into an issue when attempting to create the pull request

Dependabot encountered the following error:

POST https://api.github.com/repos/korukids/response/git/trees: 422 - Must supply a valid tree.mode // See: https://docs.github.com/rest/git/trees#create-a-tree
[Troubleshoot Dependabot errors](https://docs.github.com/github/managing-security-vulnerabilities/troubleshooting-dependabot-errors)

Native package manager behavior

No response

Images of the diff or a link to the PR, issue, or logs

No response

Smallest manifest that reproduces the issue

No response

@NGMarmaduke NGMarmaduke added the T: bug 🐞 Something isn't working label Mar 3, 2025
@github-actions github-actions bot added L: go:modules Golang modules L: javascript L: ruby:bundler RubyGems via bundler labels Mar 3, 2025
@gs-karolbajko
Copy link

I'm facing a similar issue on my end.

@NGMarmaduke
Copy link
Author

Worth mentioning this is happening on two of our Bundler repos, both are grouping by minor and or patch updates

@robaiken
Copy link
Contributor

robaiken commented Mar 3, 2025

Hey @NGMarmaduke @gs-karolbajko, I'm currently investigating this issue. It appears to only be affecting the bundler, and I'm still working to identify the root cause. The problem seems to have emerged when we released gem version 0.299.0 for dependabot. I'll keep you updated on any findings.

Thank you for your report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: ruby:bundler RubyGems via bundler T: bug 🐞 Something isn't working
Projects
Status: No status
Development

No branches or pull requests

3 participants