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: Rollback change on service creation with weightless experiments #2624

Merged
merged 2 commits into from
Feb 24, 2023

Conversation

daniddelrio
Copy link
Contributor

@daniddelrio daniddelrio commented Feb 24, 2023

closes: #2622

possible fix for: #2608

This rolls back the change introduced in #2397 which allows experiments with no weights to still create services. We want it so that services won't be created if there is no weight set for the experiments.

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 with a list of types and scopes found here, (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 Feb 24, 2023

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
1.4% 1.4% Duplication

@@ -64,7 +64,9 @@ func GetExperimentFromTemplate(r *v1alpha1.Rollout, stableRS, newRS *appsv1.Repl
Name: templateStep.Name,
Replicas: templateStep.Replicas,
}
template.Service = &v1alpha1.TemplateService{}
if templateStep.Weight != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if templateStep.Weight != nil {
if (templateStep.Weight != nil || templateStep.Service != nil) {

should we put this already in?

atm the spec doesn't allow templateStep.Service to be anything but:

  • nil
  • empty object

so this shouldn't be a breaking change (famous last words)

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

nevermind, this is not possible without a Rollout spec change.

@codecov
Copy link

codecov bot commented Feb 24, 2023

Codecov Report

Base: 81.52% // Head: 81.52% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (0e8ea9e) compared to base (50c3b88).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2624   +/-   ##
=======================================
  Coverage   81.52%   81.52%           
=======================================
  Files         131      131           
  Lines       19562    19564    +2     
=======================================
+ Hits        15947    15949    +2     
  Misses       2795     2795           
  Partials      820      820           
Impacted Files Coverage Δ
rollout/experiment.go 84.13% <100.00%> (+0.15%) ⬆️

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.

@github-actions
Copy link
Contributor

Go Published Test Results

1 859 tests   1 859 ✔️  2m 30s ⏱️
   113 suites         0 💤
       1 files           0

Results for commit 0e8ea9e.

@github-actions
Copy link
Contributor

E2E Tests Published Test Results

    2 files      2 suites   1h 36m 37s ⏱️
  96 tests   93 ✔️ 3 💤 0
192 runs  186 ✔️ 6 💤 0

Results for commit 0e8ea9e.

@zachaller zachaller merged commit 6e623bc into argoproj:master Feb 24, 2023
@zachaller zachaller added the cherry-pick-completed Used once we have cherry picked the PR to all requested releases label Feb 24, 2023
zachaller pushed a commit that referenced this pull request Feb 24, 2023
…2624)

BREAKING CHANGE There was an unintentional change in behavior related to service creation with experiments introduced in v1.4.0 this has been reverted in v1.4.1 back to the original behavior. In v1.4.0 services where always created with for inline experiments even if there was no weight set. In 1.4.1 we go back to the original behavior of requiring weight to be set in order to create a service.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick/release-1.4 cherry-pick-completed Used once we have cherry picked the PR to all requested releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Breaking change with v1.4: experiment k8s service created even if steps are not weighted
3 participants