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

Refactor Job manager routes #296

Merged
merged 37 commits into from
Dec 18, 2024
Merged

Refactor Job manager routes #296

merged 37 commits into from
Dec 18, 2024

Conversation

ryuwd
Copy link
Contributor

@ryuwd ryuwd commented Sep 16, 2024

  • Renamed from job_manager to jobs
  • Split into multiple modules
  • Removed some endpoints in favour of expressing the desired operation(s) as bulk job status changes
  • Major refactor of reschedule_job to respect the job state machine
  • significantly reduce the number of statements/queries generated in bulk operations

For #22
Needs DIRACGrid/DIRAC#7794

closes #22, #341
TODO:

  • Tests passing
  • Check rescheduling and resetJob
  • fix bug in job state machine when rescheduling in JobDB
  • make rescheduling and reset job tests a bit more rigorous to check I did not break anything
  • regenerate client methods with autorest
  • use config object to pull out MaxRescheduling from the CS instead of making a property in JobDB

@fstagni fstagni linked an issue Sep 17, 2024 that may be closed by this pull request
8 tasks
@ryuwd ryuwd mentioned this pull request Sep 18, 2024
@ryuwd
Copy link
Contributor Author

ryuwd commented Sep 23, 2024

65da423 is the start of using bulk insert/update statements in the job manager, and are supposed to be significantly faster than lots of single insert/update statements. I started with rescheduling and job status updates.

@ryuwd
Copy link
Contributor Author

ryuwd commented Sep 23, 2024

@fstagni do you have any view on things to watch out for with bulk inserts and updates, based on previous experience in DIRAC? I can foresee some risks of things becoming inconsistent, which could be mitigated by reducing the batch sizes or carefully checking the input and results of each statement execution.

diracx-core/src/diracx/core/config/schema.py Outdated Show resolved Hide resolved
diracx-core/src/diracx/core/config/schema.py Outdated Show resolved Hide resolved
diracx-core/src/diracx/core/exceptions.py Outdated Show resolved Hide resolved
diracx-testing/src/diracx/testing/__init__.py Show resolved Hide resolved
diracx-routers/src/diracx/routers/jobs/submission.py Outdated Show resolved Hide resolved
diracx-routers/src/diracx/routers/jobs/submission.py Outdated Show resolved Hide resolved
@ryuwd ryuwd marked this pull request as ready for review December 15, 2024 13:19
@ryuwd
Copy link
Contributor Author

ryuwd commented Dec 16, 2024

@chrisburr @aldbr once the tests fully pass I think this is ready to merge

@aldbr aldbr merged commit 3dd59d5 into DIRACGrid:main Dec 18, 2024
24 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.

JobManagerHandler conversion
3 participants