What's Changed
- Expand the
Store
interface by adding aGetLatestVersion
method and make the interface public. - Add a (non-blocking) method to check if there are pending migrations to the
goose.Provider
(#751):
func (p *Provider) HasPending(context.Context) (bool, error) {}
Note
The underlying implementation does not respect the SessionLocker
(if one is enabled) and can
be used to check for pending migrations without blocking or being blocked by other operations.
- The methods
.Up
,.UpByOne
, and.UpTo
fromgoose.Provider
will invoke.HasPending
before
acquiring a lock withSessionLocker
(if enabled). This addresses an edge case in
Kubernetes-style deployments where newer pods with long-running migrations prevent older pods -
which have all known migrations applied - from starting up due to an advisory lock. For more
details, refer to #507 (comment) and #751. - Move integration tests to
./internal/testing
and make it a separate Go module. This will allow
us to have a cleaner top-level go.mod file and avoid imports unrelated to the goose project. See
integration/README.md
for more details. This shouldn't affect users of the goose library.