-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add rollback command to deployer #1614
Conversation
ad079bd
to
61b5f20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested on AWS, looks good, but found a few edge cases which I think should not be present.
- I can rollback even to current version
- As a user I'd (or better said I could) expect the rollback to move the string "(current)" in the info output to the rollbacked version. However, what we do is we create a new version with config+secrets from the version to rollback to. I think this could be clarified in the output. E.g.
Creating a new version <version_id> with configuration files from version <version_to_rollback>
@@ -1,25 +1,34 @@ | |||
import { join } from 'path'; | |||
import fs from 'fs'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Can we enforce it with eslint? I prefer the member import syntax, but I am OK with this if it's for the consistency sake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to mock the functions from the fs
module without it.
The thing is that if you don't change your config or secrets and deploy you're doing that anyway. So, it's a bit weird preventing it in one place but allowing it in another. But I get that rollback evocates something in the past. Ok, I'll add a check to prevent rollbacking into a current version.
I agree, I'll do that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
020049e
to
affe752
Compare
Close #1406
At this point
src/infrastructure/index.ts
should be refactored a bit, some common code can be extracted into functions and the whole thing should be divided into separate files. I'm leaving that for a separate issue.