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

Fix: prevent rerun app while upgrade due to old apprev lack app workflow #4852

Conversation

Somefive
Copy link
Collaborator

@Somefive Somefive commented Oct 11, 2022

Signed-off-by: Somefive yd219913@alibaba-inc.com

Description of your changes

In version before v1.6.0-alpha.4, applications with revision under v1.5.7 (not released yet) and revision under v1.6.0-alpha.4 (released), application revision (without PublishVersion) does not record workflow in Application Spec inside, which will lead to inequality with revisions created by latest KubeVela.

This PR adds additional rules for bypassing the comparing application workflow when

  1. PublishVersion is not used
  2. Application is created under KubeVela version v1.5.7.

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.

How has this code been tested

Special notes for your reviewer

@Somefive Somefive changed the title Fix: prevent rerun application while upgrading due to old apprev lack… Fix: prevent rerun app while upgrade due to old apprev lack app workflow Oct 11, 2022
@Somefive Somefive force-pushed the fix/rerun-app-when-upgrade-due-to-lack-of-workflow-recording branch from 76b7803 to 3e26ad6 Compare October 11, 2022 12:13
@codecov
Copy link

codecov bot commented Oct 11, 2022

Codecov Report

Base: 60.76% // Head: 60.82% // Increases project coverage by +0.05% 🎉

Coverage data is based on head (40af370) compared to base (913c740).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4852      +/-   ##
==========================================
+ Coverage   60.76%   60.82%   +0.05%     
==========================================
  Files         300      300              
  Lines       31051    31060       +9     
==========================================
+ Hits        18869    18893      +24     
+ Misses       9687     9674      -13     
+ Partials     2495     2493       -2     
Flag Coverage Δ
apiserver-e2etests 30.18% <ø> (ø)
apiserver-unittests 40.62% <ø> (-0.05%) ⬇️
core-unittests 54.96% <100.00%> (+0.01%) ⬆️
e2e-multicluster-test 19.40% <70.00%> (-0.02%) ⬇️
e2e-rollout-tests 21.61% <70.00%> (+0.13%) ⬆️
e2etests 27.47% <70.00%> (+0.14%) ⬆️

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

Impacted Files Coverage Δ
...ller/core.oam.dev/v1alpha2/application/revision.go 73.02% <100.00%> (+1.38%) ⬆️
...kg/apiserver/infrastructure/datastore/datastore.go 66.66% <0.00%> (-11.12%) ⬇️
pkg/apiserver/event/sync/cr2ux.go 40.32% <0.00%> (-9.68%) ⬇️
pkg/resourcekeeper/dispatch.go 76.27% <0.00%> (-6.78%) ⬇️
pkg/apiserver/event/sync/worker.go 72.22% <0.00%> (-3.71%) ⬇️
pkg/apiserver/event/sync/store.go 70.00% <0.00%> (-3.34%) ⬇️
pkg/multicluster/cluster_management.go 35.66% <0.00%> (-2.95%) ⬇️
pkg/addon/push.go 75.20% <0.00%> (-1.60%) ⬇️
...er/core.oam.dev/v1alpha2/application/dispatcher.go 78.57% <0.00%> (-1.20%) ⬇️
pkg/auth/kubeconfig.go 49.55% <0.00%> (-0.89%) ⬇️
... and 16 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.

@Somefive Somefive marked this pull request as draft October 11, 2022 12:24
@Somefive Somefive added the backport release-1.5 add this label will automatically backport this PR to release-1.5 branch label Oct 11, 2022
… app workflow

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
@Somefive Somefive force-pushed the fix/rerun-app-when-upgrade-due-to-lack-of-workflow-recording branch from 3e26ad6 to 40af370 Compare October 13, 2022 10:05
Copy link
Collaborator

@wonderflow wonderflow left a comment

Choose a reason for hiding this comment

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

LGTM

@Somefive Somefive marked this pull request as ready for review October 14, 2022 14:01
@Somefive Somefive merged commit 4fba13c into kubevela:master Oct 14, 2022
@github-actions
Copy link

Backport failed for release-1.5, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin release-1.5
git worktree add -d .worktree/backport-4852-to-release-1.5 origin/release-1.5
cd .worktree/backport-4852-to-release-1.5
git checkout -b backport-4852-to-release-1.5
ancref=$(git merge-base 913c740a87508d72eedd1b097c71dba6b26da54c 40af3704cc97e72eaf22dde2c58e6769db853001)
git cherry-pick -x $ancref..40af3704cc97e72eaf22dde2c58e6769db853001

@Somefive Somefive deleted the fix/rerun-app-when-upgrade-due-to-lack-of-workflow-recording branch June 20, 2023 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-1.5 add this label will automatically backport this PR to release-1.5 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants