argo-rollouts icon indicating copy to clipboard operation
argo-rollouts copied to clipboard

fix: allow namespace default using valueFrom as arg for AnalysisTempl…

Open newtondev opened this issue 11 months ago • 6 comments

…ate (#3361)

Checklist:

  • [x] 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.
  • [x] 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".
  • [x] I've signed my commits with DCO
  • [x] I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • [x] My builds are green. Try syncing with master if they are not.
  • [ ] My organization is added to USERS.md.

newtondev avatar Mar 10 '24 11:03 newtondev

Codecov Report

Attention: Patch coverage is 97.36842% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 82.88%. Comparing base (8405f2e) to head (758eada). Report is 74 commits behind head on master.

Files Patch % Lines
analysis/analysis.go 97.36% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3436      +/-   ##
==========================================
+ Coverage   81.83%   82.88%   +1.04%     
==========================================
  Files         135      135              
  Lines       20688    17158    -3530     
==========================================
- Hits        16931    14221    -2710     
+ Misses       2883     2044     -839     
- Partials      874      893      +19     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 10 '24 11:03 codecov[bot]

Go Published Test Results

2 161 tests   2 161 :white_check_mark:  2m 53s :stopwatch:   119 suites      0 :zzz:     1 files        0 :x:

Results for commit 758eada6.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Mar 10 '24 11:03 github-actions[bot]

E2E Tests Published Test Results

  6 files    6 suites   5h 21m 4s :stopwatch: 110 tests  96 :white_check_mark:  6 :zzz:  8 :x: 688 runs  625 :white_check_mark: 36 :zzz: 27 :x:

For more details on these failures, see this check.

Results for commit 758eada6.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Mar 10 '24 12:03 github-actions[bot]

How are you creating the AnalysisRun, is the argo rollouts controller creating it or are you creating it say via kubectl or something similar outside of rollouts controller?

zachaller avatar Mar 12 '24 17:03 zachaller

So it seems like the problem here is mainly that when wanting to not have to pass in the namespace from the Rollout to the AnalysisTemplate. If the arg is not specified but is referenced in the AnalysisTemplate like namespace, it should default to the namespace from the Rolllout to be used in metrics provider like Prometheus.

Thanks @zachaller , I will take a deeper look into the ExtractFieldPathAsString to see if there is a good way to handle this kind of default.

newtondev avatar Mar 13 '24 19:03 newtondev