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

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

Open
chaporgin opened this issue Apr 16, 2024 · 1 comment
Open

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

chaporgin opened this issue Apr 16, 2024 · 1 comment

Comments

@chaporgin
Copy link

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?

@jackc
Copy link
Owner

jackc commented May 9, 2024

Sorry, I'm not sure I understand. The problem is last as a destination doesn't work under what conditions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants