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

fix: wrap schedule/exec/task creation as orm tx #18458

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

chlins
Copy link
Member

@chlins chlins commented Mar 31, 2023

Wrap orm tx when the scheduler try to create the task because submit job maybe failure depends on the jobservice.

Fixes: #18452

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Issue being fixed

Fixes #18452

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

@codecov
Copy link

codecov bot commented Mar 31, 2023

Codecov Report

Merging #18458 (cc50dde) into main (02c51c6) will increase coverage by 0.00%.
The diff coverage is 66.66%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #18458   +/-   ##
=======================================
  Coverage   67.36%   67.37%           
=======================================
  Files         982      982           
  Lines      106848   106856    +8     
  Branches     2670     2670           
=======================================
+ Hits        71979    71995   +16     
+ Misses      31000    30990   -10     
- Partials     3869     3871    +2     
Flag Coverage Δ
unittests 67.37% <66.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pkg/scheduler/scheduler.go 66.84% <62.96%> (-0.38%) ⬇️
src/controller/systemartifact/execution.go 72.82% <73.33%> (+0.29%) ⬆️

... and 5 files with indirect coverage changes

@chlins chlins force-pushed the fix/schedule-job-task-not-found branch 2 times, most recently from cc33a29 to 71d222b Compare April 3, 2023 02:32
@chlins chlins changed the title fix: retry to create task in scheduler fix: wrap schedule/exec/task creation as orm tx Apr 3, 2023
Copy link
Contributor

@wy65701436 wy65701436 left a comment

Choose a reason for hiding this comment

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

lgtm

Wrap orm tx when the scheduler try to create the task because submit job
maybe failure depends on the jobservice.

Fixes: goharbor#18452

Signed-off-by: chlins <[email protected]>
@chlins chlins force-pushed the fix/schedule-job-task-not-found branch from 71d222b to cc50dde Compare April 3, 2023 09:51
@chlins chlins merged commit a7cef5e into goharbor:main Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Harbor helm upgrade to OSS v2.8.0 EXECUTION_SWEEP not working
7 participants