Skip to content

v3.20.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 22 Apr 13:18
· 6 commits to master since this release
v3.20.0
31de74d

What's Changed

  • Expand the Store interface by adding a GetLatestVersion 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 from goose.Provider will invoke .HasPending before
    acquiring a lock with SessionLocker (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.