Repository navigation
fix: honor RQJob dependencies - #3
Merged
paulmueller merged 1 commit intoNov 5, 2026
Merged
Conversation
The job IDs in `depends_on` contained a superfluous underscore and jobs were enqueued in registration order, so RQ ignored all dependencies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
paulmueller-agent
force-pushed
the
fix-rqjob-depends-on
branch
2 times, most recently
from
November 5, 2026 10:34
b109a7e to
e50f0e6
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3 +/- ##
==========================================
- Coverage 97.00% 96.99% -0.01%
==========================================
Files 12 12
Lines 567 566 -1
==========================================
- Hits 550 549 -1
Misses 17 17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
RQJobdependencies (depends_on) have never had an effect:f"{jid}_{dep}", butjidalready ends with_, so they pointed to<pkg>_<pos>__<job>instead of<pkg>_<pos>_<job>.enqueue_all_jobsenqueued jobs in registration order. ckanext-dcor_schemas registersjob_set_s3_resource_metadataafter the jobs that depend on it, so the dependency did not exist yet.RQ silently drops dependencies it cannot find (
Job.fetch_dependenciesfilters out missing jobs), so all jobs were started right away. This PR fixes the IDs and enqueues jobs viaget_all_job_methods_in_order.The new test enqueues three jobs through CKAN's Redis connection and checks that RQ registers the dependencies and defers the dependent jobs.
Behavior change on deployment: dcor_schemas jobs will actually wait for their dependencies, e.g.
job_set_sha256(queuedcor-long) waits forjob_set_s3_resource_metadata. If a dependency fails, RQ does not run the jobs that depend on it (they stay deferred), whereas until now they ran anyway.🤖 Generated with Claude Code