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

Scheduler shutdown gracefully #1951

Conversation

eusebiu-constantin-petu-dbk
Copy link
Collaborator

What type of PR is this?

Which issue does this PR fix:

What does this PR do / Why do we need it:

If an issue # is not available please add repro steps and logs showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@eusebiu-constantin-petu-dbk eusebiu-constantin-petu-dbk force-pushed the scheduler_shutdown_gracefully branch 3 times, most recently from c951284 to 22be2ef Compare October 23, 2023 11:32
@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Attention: 31 lines in your changes are missing coverage. Please review.

Comparison is base (83f287d) 91.87% compared to head (c6eaabf) 91.88%.

Files Patch % Lines
pkg/cli/client/service.go 0.00% 8 Missing and 5 partials ⚠️
pkg/cli/client/client.go 27.27% 1 Missing and 7 partials ⚠️
pkg/scheduler/scheduler.go 88.57% 4 Missing ⚠️
pkg/meta/dynamodb/dynamodb.go 57.14% 2 Missing and 1 partial ⚠️
pkg/storage/imagestore/imagestore.go 72.72% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1951      +/-   ##
==========================================
+ Coverage   91.87%   91.88%   +0.01%     
==========================================
  Files         165      165              
  Lines       28125    28168      +43     
==========================================
+ Hits        25840    25883      +43     
- Misses       1687     1688       +1     
+ Partials      598      597       -1     

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

@eusebiu-constantin-petu-dbk
Copy link
Collaborator Author

this will wait on all scheduler goroutines to finish when server is shutting down.

it will fix these types of test racing errors:

2023-10-20T08:06:10.2729247Z testing.go:1206: TempDir RemoveAll cleanup: unlinkat /tmp/TestPeriodicallySignaturesErr2733177038: directory not empty

@rchincha rchincha added this to the v2.0.1 milestone Nov 1, 2023
@rchincha rchincha modified the milestones: v2.0.1, v2.0.0 Nov 15, 2023
@rchincha
Copy link
Contributor

Conflicts and rebase?

@eusebiu-constantin-petu-dbk eusebiu-constantin-petu-dbk force-pushed the scheduler_shutdown_gracefully branch 3 times, most recently from ea3cc32 to 5ad1c4f Compare November 17, 2023 13:04
@eusebiu-constantin-petu-dbk eusebiu-constantin-petu-dbk force-pushed the scheduler_shutdown_gracefully branch 5 times, most recently from 37f4d99 to 2a9453d Compare November 17, 2023 15:55
@eusebiu-constantin-petu-dbk eusebiu-constantin-petu-dbk force-pushed the scheduler_shutdown_gracefully branch 4 times, most recently from 966ca4d to 2537af6 Compare November 23, 2023 14:51
wait for workers to finish before exiting

should fix tests reporting they couldn't remove rootDir because it's being
written by tasks

Signed-off-by: Petu Eusebiu <[email protected]>
Copy link
Contributor

@andaaron andaaron left a comment

Choose a reason for hiding this comment

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

lgtm

@rchincha rchincha merged commit 6222dae into project-zot:main Nov 24, 2023
32 of 33 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.

3 participants