Skip to content

rollback using helm ends with an error if "last" is used #96

@chaporgin

Description

@chaporgin

Hi! Thanks for the great tool. We're started using tern with a k8s job that is recreated with each new helm release. That also means that a previous version of the job is created with each helm rollback.
For simplicity we run tern with "last" destination. That greatly simplifies experience.

This piece of code is causing problems with rollback.

tern/migrate/migrate.go

Lines 303 to 306 in 22a33fd

if currentVersion < 0 || int32(len(m.Migrations)) < currentVersion {
errMsg := fmt.Sprintf("current version %d is outside the valid versions of 0 to %d", currentVersion, len(m.Migrations))
return BadVersionError(errMsg)
}

I suggest having a CLI argument to turn this control off if flag is set. WDYT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions