Skip to content

Port aCT plugins to the SQLAlchemy based aCT (alchemy branch) - #323

Merged
mightqxc merged 1 commit into
HSF:masterfrom
CookieSgot:act-sqlalchemy-pr
Nov 9, 2026
Merged

mightqxc merged 1 commit into
HSF:masterfrom
CookieSgot:act-sqlalchemy-pr

Conversation

@CookieSgot

Copy link
Copy Markdown
Contributor

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.

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>
@mightqxc
mightqxc merged commit 4fc05f1 into HSF:master Nov 9, 2026
1 check 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.

2 participants