Skip to content

fix: Rollback change on service creation with weightless experiments - #2624

Merged
zachaller merged 2 commits into
argoproj:masterfrom
daniddelrio:rollback-if-block
Feb 24, 2023
Merged

fix: Rollback change on service creation with weightless experiments#2624
zachaller merged 2 commits into
argoproj:masterfrom
daniddelrio:rollback-if-block

Conversation

@daniddelrio

@daniddelrio daniddelrio commented Feb 24, 2023

Copy link
Copy Markdown
Contributor

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.

Signed-off-by: Daniel Del Rio <daniel.delrio@getyourguide.com>
Signed-off-by: Daniel Del Rio <daniel.delrio@getyourguide.com>
@sonarqubecloud

Copy link
Copy Markdown

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

Comment thread rollout/experiment.go
Replicas: templateStep.Replicas,
}
template.Service = &v1alpha1.TemplateService{}
if templateStep.Weight != nil {

Copy link
Copy Markdown
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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

codecov Bot commented Feb 24, 2023

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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