chore(deps): update dependency guardian_db to v3#1326
Conversation
|
| @@ -71,7 +71,7 @@ defmodule Cadet.Mixfile do | |||
| {:ex_machina, "~> 2.3"}, | |||
| {:ex_rated, "~> 2.0"}, | |||
| {:guardian, "~> 2.0"}, | |||
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
f28d26a to
7ef55be
Compare
7ef55be to
5234d5a
Compare
| @@ -71,7 +71,7 @@ defmodule Cadet.Mixfile do | |||
| {:ex_machina, "~> 2.3"}, | |||
| {:ex_rated, "~> 2.0"}, | |||
| {:guardian, "~> 2.0"}, | |||
There was a problem hiding this comment.
Bug: The application references Guardian.DB.Token.SweeperServer, which was renamed to Guardian.DB.Sweeper in Guardian.DB v3.0, causing a startup failure.
Severity: CRITICAL
Suggested Fix
In lib/cadet/application.ex, update the worker from Guardian.DB.Token.SweeperServer to Guardian.DB.Sweeper to use the correct module name for the new version.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: mix.exs#L73
Potential issue: The application's worker list references
`Guardian.DB.Token.SweeperServer`. Following the upgrade to Guardian.DB v3.0, this
module has been renamed to `Guardian.DB.Sweeper`. This incorrect module reference will
cause the application to fail during initialization because the specified module no
longer exists, preventing the application from starting.
5234d5a to
a6bbee3
Compare
| {:ex_rated, "~> 2.0"}, | ||
| {:guardian, "~> 2.0"}, | ||
| {:guardian_db, "~> 2.0"}, | ||
| {:guardian_db, "~> 3.0"}, |
There was a problem hiding this comment.
Bug: The upgrade to Guardian.DB v3 is incomplete. It's missing required configuration changes for the adapter and sweeper, which will cause authentication flows to fail at runtime.
Severity: CRITICAL
Suggested Fix
In config/config.exs, add adapter: Guardian.DB.EctoAdapter to the :guardian, Guardian.DB configuration. In lib/cadet/application.ex, update the worker from Guardian.DB.Token.SweeperServer to Guardian.DB.Sweeper. Also, remove the now-obsolete sweep_interval configuration key.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: mix.exs#L74
Potential issue: Upgrading `guardian_db` to version 3.0 introduces several breaking
changes that are not addressed in this PR. The application configuration is missing the
mandatory `adapter` key, which is required for `Guardian.DB` functions to operate.
Additionally, the token sweeper worker has been renamed from
`Guardian.DB.Token.SweeperServer` to `Guardian.DB.Sweeper`, and the `sweep_interval`
configuration option is obsolete. These omissions will cause runtime failures during
critical authentication operations like token creation, verification, and revocation.
9edd0ef to
07dc095
Compare
| {:ex_rated, "~> 2.0"}, | ||
| {:guardian, "~> 2.0"}, | ||
| {:guardian_db, "~> 2.0"}, | ||
| {:guardian_db, "~> 3.0"}, |
There was a problem hiding this comment.
Bug: The guardian_db v3.0.0 upgrade requires an explicit adapter configuration, which is missing. This will cause authentication flows to fail at runtime.
Severity: HIGH
Suggested Fix
In config/config.exs, add adapter: Guardian.DB.EctoAdapter to the :guardian, Guardian.DB configuration block to explicitly use the default Ecto adapter.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: mix.exs#L74
Potential issue: The upgrade to `guardian_db` v3.0.0 introduces a breaking change where
the adapter must be explicitly configured. The application's configuration in
`config/config.exs` is missing the required `adapter` key. This will cause Guardian.DB
functions, which are used for authentication flows like login and token verification, to
fail at runtime.
07dc095 to
1f00e9f
Compare
1f00e9f to
1218227
Compare
5af1392 to
f8ef0d0
Compare
f8ef0d0 to
79d6716
Compare
This PR contains the following updates:
~> 2.0→~> 3.0Release Notes
ueberauth/guardian_db (guardian_db)
v3.0.0Guardian.DB.Adapterbehaviour to allow for custom database adapters to be used with Guardian DB.config :guardian, Guardian.DB, adapter: Guardian.DB.EctoAdapterto fall back to the default Ecto adapter.Guardian.DB.ETSAdapter.Guardian.DB.EctoAdapter.jtiandaudrequired fields, since they are primary keys.Breaking changes
Guardian.DB.Token.SweeperServerbecomesGuardian.DB.Sweepersweep_intervaloption is no longer supported. Specify interval directly instead.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.