-
Notifications
You must be signed in to change notification settings - Fork 125
Include version in state and plan #4126
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
Conversation
|
Commit: e4b79e5
10 interesting tests: 7 KNOWN, 2 flaky, 1 SKIP
Top 24 slowest tests (at least 2 minutes):
|
8818ecc to
e7c18da
Compare
shreyas-goenka
left a comment
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.
Test review from reviewbot - testing API
shreyas-goenka
left a comment
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.
Test review with inline comment
bundle/deployplan/plan.go
Outdated
| return &Plan{ | ||
| Plan: make(map[string]*PlanEntry), | ||
| lockmap: newLockmap(), | ||
| PlanVersion: 1, |
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.
Test inline comment
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 was developing a bot to do reviews, these comments are a result of that...
shreyas-goenka
left a comment
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.
Good progress on adding version information for debugging and future compatibility. However, there is a critical bug in the migrate command that needs to be addressed.
Additional comments (on lines not in diff):
cmd/bundle/deployment/migrate.go:193
Critical Bug: The migrate command creates a state without setting StateVersion and CLIVersion fields. This means migrated states will have state_version: 0 and cli_version: "", which is inconsistent with newly created states.
bundle/direct/dstate/state.go:106
Suggestion: Consider adding validation after unmarshaling to handle version mismatches.
Review generated by reviewbot
bundle/deployplan/plan.go
Outdated
| return &Plan{ | ||
| Plan: make(map[string]*PlanEntry), | ||
| lockmap: newLockmap(), | ||
| PlanVersion: 1, |
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.
Suggestion: Consider adding a constant for the version number to make it easier to increment in the future.
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.
done
|
good review by bot @shreyas-goenka , please take another look |
|
Commit: 9e3c449
16 interesting tests: 8 flaky, 7 KNOWN, 1 SKIP
Top 50 slowest tests (at least 2 minutes):
|
Changes
Why
Good for debugging. In the future we might want to introduce version 2, this would help.
We'll have to support reading state without the version info though. We don't yet read plans, so once we start doing it (#4094), we can limit ourselves to plan_version==1.