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: add the API that rollbacks the application #5273

Merged
merged 3 commits into from
Jan 5, 2023

Conversation

barnettZQG
Copy link
Collaborator

@barnettZQG barnettZQG commented Jan 5, 2023

Signed-off-by: barnettZQG barnett.zqg@gmail.com

Description of your changes

Rollback rules:

  1. If the application revision in the hub cluster exits, rollbacking based on them.
  2. If not exist, rollbacking based on the revision save in the database. It will use the latest definition to render.
  3. Rollbacking will execute the workflow in revision, not the latest workflow.

Fixes: #4222

I have:

  • Read and followed KubeVela's contribution process.
  • Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Special notes for your reviewer

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
@codecov
Copy link

codecov bot commented Jan 5, 2023

Codecov Report

Base: 61.03% // Head: 61.25% // Increases project coverage by +0.21% 🎉

Coverage data is based on head (954c5ed) compared to base (ba0a726).
Patch coverage: 56.54% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5273      +/-   ##
==========================================
+ Coverage   61.03%   61.25%   +0.21%     
==========================================
  Files         307      308       +1     
  Lines       46350    46540     +190     
==========================================
+ Hits        28292    28509     +217     
+ Misses      15128    15084      -44     
- Partials     2930     2947      +17     
Flag Coverage Δ
apiserver-e2etests 32.56% <48.94%> (-2.94%) ⬇️
apiserver-unittests 36.21% <24.22%> (-0.10%) ⬇️
core-unittests 55.10% <0.00%> (-0.05%) ⬇️
e2e-multicluster-test 19.05% <14.08%> (+0.02%) ⬆️
e2e-rollout-tests 20.65% <0.00%> (-0.01%) ⬇️
e2etests 26.16% <0.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/apiserver/domain/service/rbac.go 68.57% <ø> (ø)
pkg/apiserver/interfaces/api/dto/v1/types.go 73.33% <ø> (ø)
pkg/apiserver/domain/service/project.go 58.31% <41.66%> (-0.80%) ⬇️
pkg/utils/app/app.go 46.15% <46.15%> (ø)
pkg/apiserver/domain/service/application.go 58.18% <53.01%> (-0.28%) ⬇️
pkg/apiserver/domain/service/workflow.go 53.94% <60.00%> (+1.78%) ⬆️
pkg/apiserver/interfaces/api/application.go 59.76% <63.63%> (+0.58%) ⬆️
pkg/apiserver/utils/auth.go 68.00% <76.92%> (+4.36%) ⬆️
pkg/apiserver/domain/service/config.go 61.82% <100.00%> (+1.24%) ⬆️
pkg/apiserver/event/sync/convert/convert.go 81.30% <100.00%> (+0.35%) ⬆️
... and 29 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
@FogDong FogDong merged commit 97ce8ba into kubevela:master Jan 5, 2023
callmeoldprince pushed a commit to callmeoldprince/kubevela that referenced this pull request Jan 6, 2023
* Feat: add the API that rollbacks the application

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: enhance the test cases

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: use the klog/v2 package

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
barnettZQG added a commit to barnettZQG/kubevela that referenced this pull request Jan 30, 2023
* Feat: add the API that rollbacks the application

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: enhance the test cases

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: use the klog/v2 package

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
zhaohuiweixiao pushed a commit to zhaohuiweixiao/kubevela that referenced this pull request Mar 7, 2023
* Feat: add the API that rollbacks the application

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: enhance the test cases

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: use the klog/v2 package

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
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.

[Feature] kubevela support to rollback ,use velaux console
3 participants