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

feat: support for rollback in case of error in intermediate steps #1379

Merged
merged 5 commits into from
Jan 17, 2023

Conversation

0zyt
Copy link
Contributor

@0zyt 0zyt commented Dec 24, 2022

Signed-off-by: 0zyt zyt0@duck.com

Pre-Checklist

Note: please complete ALL items in the following checklist.

  • I have read through the CONTRIBUTING.md documentation.
  • My code has the necessary comments and documentation (if needed).
  • I have added relevant tests

Description

When an error occurs while updating, roll back

Related Issues

#1173

New Behavior (screenshots if needed)

@0zyt 0zyt requested a review from a team as a code owner December 24, 2022 14:30
Copy link
Contributor

@steinliber steinliber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you use number to represent different stages, I think you can use golang's iota to do this kind of job, which will make the code become more clear

@daniel-hutao
Copy link
Member

@KeHaohaoke Please help to fix the ci error here. It seems like a configuration issue with build machine.

internal/pkg/upgrade/upgrade.go Outdated Show resolved Hide resolved
Copy link
Contributor Author

@0zyt 0zyt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow the steps to roll back

internal/pkg/upgrade/upgrade.go Outdated Show resolved Hide resolved
Signed-off-by: 0zyt <zyt0@duck.com>
@0zyt
Copy link
Contributor Author

0zyt commented Dec 27, 2022

you use number to represent different stages, I think you can use golang's iota to do this kind of job, which will make the code become more clear

modified

Signed-off-by: 0zyt <zyt0@duck.com>
Copy link
Member

@aFlyBird0 aFlyBird0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like your code has been off the main branch for two months.

Please run git fetch upstream && git rebase upstream/main on the current branch first to update the code.
(If you are not particularly proficient with git, it is recommended that you back up your current code changes first)

@0zyt

@0zyt
Copy link
Contributor Author

0zyt commented Dec 28, 2022

It looks like your code has been off the main branch for two months.

Please run git fetch upstream && git rebase upstream/main on the current branch first to update the code. (If you are not particularly proficient with git, it is recommended that you back up your current code changes first)

@0zyt

I have merged the main branch

@0zyt 0zyt requested a review from daniel-hutao December 29, 2022 14:14
Copy link
Member

@daniel-hutao daniel-hutao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@aFlyBird0 aFlyBird0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

@aFlyBird0 aFlyBird0 merged commit e95ebc7 into devstream-io:main Jan 17, 2023
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

Successfully merging this pull request may close these issues.

4 participants