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 PRs fail #1428

Closed
JoeCohen opened this issue Mar 16, 2023 · 8 comments
Closed

Dependabot PRs fail #1428

JoeCohen opened this issue Mar 16, 2023 · 8 comments
Assignees
Labels
bug dependencies Pull requests that update a dependency file

Comments

@JoeCohen
Copy link
Member

JoeCohen commented Mar 16, 2023

Automated Dependabot PRs have been failing for a while with encryption errors. Example: #1427.
The same PRs work fine when I replicate them.
It would be nice if we could fix things so that the automated PRs passed.
This would let us simply merge the automated PRs instead of replicating them.

I Googled the problem with no useful results.
ChatGPT says:

The ActiveSupport::MessageEncryptor::InvalidMessage error can occur in a Rails application when the encrypted message that is being decrypted by the MessageEncryptor is invalid or has been tampered with.
This error can occur when upgrading dependencies using Dependabot if the new version of a dependency changes the way data is encrypted or decrypted, or if it introduces new security requirements.
To resolve this error, you may need to update your Rails application's encryption keys and secrets to match the new requirements. You can generate new encryption keys and secrets using the bin/rails secret command, and then update the corresponding configuration files in your application.
....[blah blahblah]

As of 2024-08-19, we get a different failure message:

You have changed in the Gemfile:
* mo_acts_as_versioned from
`https://github.com/MushroomObserver/acts_as_versioned` to
`https://github.com/MushroomObserver/acts_as_versioned/`

I hope I fixed that #2323, but the fix may not take effect until bundle install changes Gemfile.lock:

You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.

See https://github.com/MushroomObserver/mushroom-observer/actions/runs/10458112849/job/28965873623?pr=2321

@JoeCohen JoeCohen added the dependencies Pull requests that update a dependency file label Mar 16, 2023
JoeCohen added a commit that referenced this issue Mar 16, 2023
This is a superset of #1427, a Dependabot PR.
That PR fails because of an encryption issue, #1428.
@nimmolo
Copy link
Contributor

nimmolo commented Mar 16, 2023

Thanks Joe - seems like that fixed it?

@JoeCohen
Copy link
Member Author

JoeCohen commented Mar 16, 2023 via email

@JoeCohen JoeCohen added the bug label Jun 1, 2023
@JoeCohen
Copy link
Member Author

JoeCohen commented Jan 5, 2024

Will adding a .github/dependabot.yml file fix the problem?
See https://github.com/rails/rails/pull/50508/files

@nimmolo
Copy link
Contributor

nimmolo commented Jan 5, 2024 via email

@nimmolo
Copy link
Contributor

nimmolo commented Jan 6, 2024 via email

@nimmolo
Copy link
Contributor

nimmolo commented Jan 6, 2024 via email

@nimmolo
Copy link
Contributor

nimmolo commented Jan 6, 2024 via email

@JoeCohen JoeCohen self-assigned this Aug 19, 2024
JoeCohen added a commit that referenced this issue Aug 23, 2024
Duplicates Dependabot #2321, which fails for reasons set out in #1428
@JoeCohen
Copy link
Member Author

Closing this. Dependabot PR #2330 passed in CI.
It appears that the combination of #2323 + a later Gemfile.lock update enables Dependabot PRs to pass CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants