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

feat(controller): allow setting the Experiment's service name; don't hardcode ports #2357

Closed
wants to merge 26 commits into from

Conversation

alexef
Copy link
Member

@alexef alexef commented Oct 21, 2022

Fixes: #2233

Stop hardcoding service port.
Allow user to set the experiment service name.
Create a service even though a weight is not set (when the name is provided)

Example:

...
steps:
- experiment:
     templates: 
     - name: experiment-baseline
       specRef: stable
       service: 
          name: my-experiment # optional
          ports:
          - port: 80
            targetPort: 8080
            protocol: TCP

This is a follow up of #2356, see also this comment for context.

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.

Create a service even though a weight is not set (when the name is provided)

Signed-off-by: Alex Eftimie <[email protected]>
@alexef alexef changed the title feat(controller) Allow setting the Experiment's service name feat(controller): allow setting the Experiment's service name Oct 21, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 21, 2022

Go Published Test Results

1 642 tests   1 641 ✔️  2m 11s ⏱️
   101 suites         0 💤
       1 files           1

For more details on these failures, see this check.

Results for commit 95b48ca.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Oct 21, 2022

Codecov Report

Base: 82.76% // Head: 82.77% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (8f46d8c) compared to base (381feea).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 8f46d8c differs from pull request most recent head 95b48ca. Consider uploading reports for the commit 95b48ca to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2357      +/-   ##
==========================================
+ Coverage   82.76%   82.77%   +0.01%     
==========================================
  Files         121      121              
  Lines       18536    18551      +15     
==========================================
+ Hits        15341    15356      +15     
  Misses       2410     2410              
  Partials      785      785              
Impacted Files Coverage Δ
experiments/experiment.go 90.07% <100.00%> (+0.38%) ⬆️
experiments/service.go 67.08% <100.00%> (-2.68%) ⬇️
rollout/experiment.go 84.36% <100.00%> (+0.22%) ⬆️

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.

Signed-off-by: Alex Eftimie <[email protected]>
Signed-off-by: Alex Eftimie <[email protected]>
Signed-off-by: Alex Eftimie <[email protected]>
Signed-off-by: Alex Eftimie <[email protected]>
Signed-off-by: Alex Eftimie <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Oct 21, 2022

E2E Tests Published Test Results

    2 files      2 suites   1h 29m 2s ⏱️
  89 tests   84 ✔️ 3 💤 2
180 runs  172 ✔️ 6 💤 2

For more details on these failures, see this check.

Results for commit 95b48ca.

♻️ This comment has been updated with latest results.

@alexef alexef changed the title feat(controller): allow setting the Experiment's service name feat(controller): allow setting the Experiment's service name; don't hardcode ports Oct 23, 2022
disable service where service is not needed or expected
set ports where service must be created

Signed-off-by: Alex Eftimie <[email protected]>
@alexef
Copy link
Member Author

alexef commented Oct 24, 2022

@zachaller can you have a look at this?

experiments/service.go Outdated Show resolved Hide resolved
@zachaller zachaller added this to the v1.4 milestone Nov 1, 2022
@zachaller zachaller added the ready-for-review Ready for final review label Nov 1, 2022
@zachaller zachaller removed the ready-for-review Ready for final review label Nov 1, 2022
@zachaller zachaller self-requested a review November 1, 2022 19:47
@zachaller
Copy link
Collaborator

zachaller commented Nov 1, 2022

One last thing then I think this is good, could you add some documentation and update docs about when a service is generated etc I think mainly around this page https://argoproj.github.io/argo-rollouts/features/experiment/ and maybe on the spec https://argoproj.github.io/argo-rollouts/features/specification/

@alexef
Copy link
Member Author

alexef commented Nov 1, 2022

Updated the docs, not sure if it's okay: 0f5ed7a

Regarding service spec, we should probably also mark this in the docs as available from next release?

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 3, 2022

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 1 Code Smell

No Coverage information No Coverage information
1.8% 1.8% Duplication

@alexef
Copy link
Member Author

alexef commented Nov 4, 2022

superseeded by: #2397

@alexef alexef closed this Nov 4, 2022
@alexef alexef deleted the experiment-service-name branch November 4, 2022 16:07
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.

Experiment create service with hardcoded port.
2 participants