Repository navigation
Port aCT plugins to the SQLAlchemy based aCT (alchemy branch) - #323
Merged
Merged
Conversation
The aCT plugins (submitter, monitor, messenger, stager, sweeper) now use aCT's SQLAlchemy models (act.atlas.dbModels.PandaJob, act.arc.dbModels) and sessions instead of the removed raw-SQL DB classes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
aCT (ARC Control Tower) has replaced its raw-SQL database layer with SQLAlchemy 2.0 (alchemy branch). The old DB methods the aCT plugins called (getJobs, insertJob, updateJob(s), aCTProxy) are gone, so the current plugins fail with the new aCT. This PR ports the five aCT plugins to aCT's SQLAlchemy models and sessions. The plugins' behaviour is unchanged.
Changes:
act_submitter: looks up the proxy ID with a select on act.arc.dbModels.Proxy (replaces aCTProxy), and inserts the job with insert(PandaJob), taking the new row ID from inserted_primary_key.
act_monitor: reads job state (actpandastatus, computingElement, node, error) with a select on PandaJob. The workers are queried in batches with id IN (...) instead of one query per worker.
act_stager: reads actpandastatus and error with a select.
act_messenger: updates jobs with update(PandaJob).
act_sweeper: marks jobs tobekilled with update(PandaJob).
Requirements and compatibility:
Requires aCT with the SQLAlchemy DB layer (currently the alchemy branch). It is not compatible with older aCT releases.
Testing:
Running in production at CERN (Harvester CERN_central_ACTA, aCT on aipanda404/405): on Harvester 0.7.2 since Nov 4, and on 0.7.6 with Python 3.12 since Nov 9. Submission, monitoring, staging, messaging and killing work, with no plugin errors.
Formatted with the repo's black/isort/flynt settings. py_compile passes.