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

rollout controller find sourceRevision #1989

Merged
merged 8 commits into from Aug 3, 2021
Merged

rollout controller find sourceRevision #1989

merged 8 commits into from Aug 3, 2021

Conversation

wangyikewxgm
Copy link
Collaborator

@wangyikewxgm wangyikewxgm commented Jul 30, 2021

What this PR does / why we need it:

application use rollout as a trait, user shouldn't care sourceRevision.
when a new rollout restart, rollout controller use status.LastTtargetRevision as sourceRevision
application using rollout trait example is:

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: rollout-trait-test
  namespace: rollout-trait-test
spec:
  components:
    - name: express-server
      type: webservice
      properties:
        image: stefanprodan/podinfo:4.0.3
      traits:
        - type: rollout
          properties:
            targetSize: 5

Which issue(s) this PR fixes:

related issue: #1605

Special notes for your reviewer:

@codecov
Copy link

codecov bot commented Jul 30, 2021

Codecov Report

Merging #1989 (9c554b4) into master (7161959) will increase coverage by 4.95%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1989      +/-   ##
==========================================
+ Coverage   59.09%   64.04%   +4.95%     
==========================================
  Files         111      159      +48     
  Lines       10998    14973    +3975     
==========================================
+ Hits         6499     9590    +3091     
- Misses       3804     4419     +615     
- Partials      695      964     +269     
Flag Coverage Δ
e2e-rollout-tests 30.32% <80.00%> (?)
e2etests 38.12% <0.00%> (?)
unittests 59.26% <60.00%> (+0.17%) ⬆️

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

Impacted Files Coverage Δ
...ard.oam.dev/v1alpha1/rollout/rollout_controller.go 80.58% <50.00%> (+71.67%) ⬆️
...oller/standard.oam.dev/v1alpha1/rollout/handler.go 67.74% <100.00%> (+12.63%) ⬆️
pkg/workflow/tasks/custom/task.go 74.63% <0.00%> (-2.29%) ⬇️
pkg/utils/apply/apply.go 92.18% <0.00%> (-0.35%) ⬇️
...dev/v1alpha2/applicationconfiguration/component.go 59.05% <0.00%> (-0.30%) ⬇️
...rollout/workloads/deployment_rollout_controller.go 88.18% <0.00%> (ø)
...is/standard.oam.dev/v1alpha1/rollouttrait_types.go 20.00% <0.00%> (ø)
apis/core.oam.dev/v1alpha2/application_types.go 0.00% <0.00%> (ø)
apis/core.oam.dev/v1alpha1/envbinding_types.go 100.00% <0.00%> (ø)
pkg/appfile/config/configmap.go 0.00% <0.00%> (ø)
... and 110 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7161959...9c554b4. Read the comment docs.

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

@wonderflow wonderflow merged commit 13fc4e2 into kubevela:master Aug 3, 2021
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.

None yet

2 participants