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(analysis): add ttlStrategy on AnalysisRun for garbage collecting stale AnalysisRun automatically #3324

Merged
merged 6 commits into from Jan 30, 2024

Conversation

kevinqian-db
Copy link
Contributor

@kevinqian-db kevinqian-db commented Jan 23, 2024

This PR adds the following according to discussions in Enhancement Proposal. This is a first-stage PR that only contains change to AnalysisRun, but will have a second PR in the future for AnalysisTemplate. See more reasoning in the proposal above.

  • Add ttlStrategy to AnalysisRun spec. It looks like
spec:
  ttlStrategy:
    secondsAfterCompletion: <number-of-seconds>
    secondsAfterFailure: <number-of-seconds>
    secondsAfterSuccess: <number-of-seconds>

Note that secondsAfterSuccess and secondsAfterFailure will override secondsAfterCompletion if specified, and the corresponding AnalysisRun is of the corresponding state.

  • Add completedAt (next to startedAt) in AnalysisRun status.

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. Enhancement Proposal
  • 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.

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5e5314b) 81.77% compared to head (c20482c) 81.83%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3324      +/-   ##
==========================================
+ Coverage   81.77%   81.83%   +0.06%     
==========================================
  Files         135      135              
  Lines       20649    20688      +39     
==========================================
+ Hits        16886    16931      +45     
+ Misses       2888     2883       -5     
+ Partials      875      874       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Jan 23, 2024

Go Published Test Results

2 106 tests   2 106 ✅  2m 49s ⏱️
  118 suites      0 💤
    1 files        0 ❌

Results for commit c20482c.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jan 23, 2024

E2E Tests Published Test Results

  4 files    4 suites   3h 27m 56s ⏱️
106 tests  95 ✅  6 💤  5 ❌
438 runs  400 ✅ 24 💤 14 ❌

For more details on these failures, see this check.

Results for commit c20482c.

♻️ This comment has been updated with latest results.

@kevinqian-db kevinqian-db force-pushed the ar-ttlstrategy branch 3 times, most recently from 724b384 to 6612838 Compare January 24, 2024 00:43
@kevinqian-db
Copy link
Contributor Author

@jessesuen @zachaller PTAL, thanks!

@zachaller zachaller added this to the v1.7 milestone Jan 25, 2024
Copy link
Collaborator

@zachaller zachaller left a comment

Choose a reason for hiding this comment

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

can we re-run codegen to fix conflicts

Signed-off-by: Kevin Qian <kevin.qian@databricks.com>
Signed-off-by: Kevin Qian <kevin.qian@databricks.com>
Signed-off-by: Kevin Qian <kevin.qian@databricks.com>
Signed-off-by: Kevin Qian <kevin.qian@databricks.com>
@kevinqian-db
Copy link
Contributor Author

Rebased on master and reran codegen.

Signed-off-by: Kevin Qian <kevin.qian@databricks.com>
Signed-off-by: Kevin Qian <kevin.qian@databricks.com>
Copy link

sonarcloud bot commented Jan 29, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

2 New issues
0 Security Hotspots
No data about Coverage
4.9% Duplication on New Code

See analysis details on SonarCloud

@zachaller zachaller merged commit c492b06 into argoproj:master Jan 30, 2024
23 checks passed
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.

None yet

3 participants