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: rollout experiment template changing reference rs template labels. Fixes #1596 #1597

Merged
merged 2 commits into from
Nov 3, 2021

Conversation

flaviolemos78
Copy link
Contributor

@flaviolemos78 flaviolemos78 commented Oct 19, 2021

Fixes #1596

When re-creating an experiment, which has labels defined, from an already on-going canary, the GetExperimentFromTemplate is changing the experiment specRef replica set `template labels leading to errors:

time="2021-10-19T07:49:57Z" level=error msg="roCtx.reconcile err ReplicaSet.apps \"infrastructure-kubernetes-asfvalidator-74f9778454\" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{\"app.kubernetes.io/instance\":\"infrastructure-kubernetes-asfvalidator-zerotraffic\", \"app.kubernetes.io/name\":\"asfvalidator-zerotraffic\", \"rollouts-pod-template-hash\":\"74f9778454\"}: `selector` does not match template `labels`" generation=31 namespace=infrastructure-kubernetes resourceVersion=253727 rollout=infrastructure-kubernetes-asfvalidator

Signed-off-by: Flavio Lemos [email protected]

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I've signed my commits with DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My builds are green. Try syncing with master if they are not.
  • My organization is added to USERS.md.

@sonarcloud
Copy link

sonarcloud bot commented Oct 19, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.5% 0.5% Duplication

@codecov
Copy link

codecov bot commented Oct 20, 2021

Codecov Report

Merging #1597 (8fd3fb2) into master (f07de59) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1597   +/-   ##
=======================================
  Coverage   81.76%   81.76%           
=======================================
  Files         112      112           
  Lines       15117    15120    +3     
=======================================
+ Hits        12360    12363    +3     
  Misses       2110     2110           
  Partials      647      647           
Impacted Files Coverage Δ
pkg/kubectl-argo-rollouts/cmd/get/get_rollout.go 98.49% <100.00%> (+0.01%) ⬆️
pkg/kubectl-argo-rollouts/cmd/status/status.go 93.33% <100.00%> (+0.09%) ⬆️
rollout/experiment.go 83.98% <100.00%> (ø)

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 76c1b3e...8fd3fb2. Read the comment docs.

Copy link
Member

@perenesenko perenesenko left a comment

Choose a reason for hiding this comment

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

LGTM

@khhirani khhirani merged commit 9d2ccb9 into argoproj:master Nov 3, 2021
alexmt pushed a commit that referenced this pull request Nov 29, 2021
Fixes #1596 (#1597)

* fix: rollout experiment template changing reference rs template labels

Signed-off-by: Flavio Lemos <[email protected]>

* docs: Add Farfetch to USERS.md

Signed-off-by: Flavio Lemos <[email protected]>
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.

Canary Rollout with errors when there's an scale event during the experiment
3 participants