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

Make the node database operate on jobs instead of pods #2612

Merged
merged 7 commits into from
Jun 28, 2023

Conversation

zuqq
Copy link
Collaborator

@zuqq zuqq commented Jun 27, 2023

It secretly always operated on jobs, because PodRequirementsFromLegacySchedulerJobs was adding annotations containing job IDs and queue names to pods. This PR makes this behavior explicit: methods like ScheduleMany now operate on JobSchedulingContext (which holds the cached PodRequirements value) instead of plain PodRequirements.

@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Patch coverage: 70.21% and no project coverage change.

Comparison is base (d6aef28) 58.78% compared to head (0d82d1f) 58.79%.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #2612    +/-   ##
========================================
  Coverage   58.78%   58.79%            
========================================
  Files         238      238            
  Lines       30541    30397   -144     
========================================
- Hits        17954    17872    -82     
+ Misses      11219    11177    -42     
+ Partials     1368     1348    -20     
Flag Coverage Δ
armada-server 58.79% <70.21%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
internal/armada/server/lease.go 7.53% <0.00%> (+0.02%) ⬆️
internal/scheduler/common.go 85.71% <ø> (+0.21%) ⬆️
...ernal/scheduler/schedulerobjects/schedulinginfo.go 0.00% <0.00%> (ø)
internal/scheduler/context/context.go 33.00% <26.08%> (-0.51%) ⬇️
internal/scheduler/jobdb/job.go 78.63% <33.33%> (+0.22%) ⬆️
internal/scheduler/pool_assigner.go 72.41% <76.19%> (-3.05%) ⬇️
internal/scheduler/nodedb/nodedb.go 61.15% <78.87%> (+2.73%) ⬆️
internal/scheduler/scheduler.go 78.12% <87.50%> (+0.33%) ⬆️
internal/scheduler/submitcheck.go 73.22% <91.66%> (-1.78%) ⬇️
internal/scheduler/gang_scheduler.go 82.55% <100.00%> (+4.43%) ⬆️
... and 4 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

severinson
severinson previously approved these changes Jun 27, 2023
@zuqq zuqq merged commit dac1cf3 into master Jun 28, 2023
@zuqq zuqq deleted the zuqq/operate-on-jobs branch June 28, 2023 09:45
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.

2 participants