Repository navigation
job-manager: avoid posting redundant and failing dependency events - #7885
Merged
mergify[bot] merged 8 commits intoNov 2, 2026
Merged
Conversation
grondo
force-pushed
the
job-manager-dependency-fixes
branch
from
November 1, 2026 23:03
b360a5d to
b55d5b0
Compare
Problem: The job manager cannot check whether a dependency event for a description is queued. Add a function that checks the job event queue. Assisted-by: Claude:opus-5.5
Problem: Adding a dependency that was removed posts a dependency-add event that has no effect. Plugins do this on restart and plugin reload. Adding a dependency twice in one callback also posts two events. Post no event if the description is used or queued for add. Assisted-by: Claude:opus-5.5
Problem: Removing a dependency that was already removed posts a dependency-remove event that fails to apply. Post no event if the dependency is removed or queued for removal. Assisted-by: Claude:opus-5.5
Problem: In a callback, removing a description that was never added returns success. The event fails to apply later, so the plugin does not get the error. Fail with ENOENT before posting the event, unless an add for the description is queued. Assisted-by: Claude:opus-5.5
Problem: The flux-jobtap-plugins(7) man page says that a repeated dependency add returns EEXIST. It does not describe a repeated remove or a remove of a dependency that was never added. Correct the description of add and describe both remove cases. Assisted-by: Claude:opus-5.5
Problem: The dependency-test plugin cannot remove a dependency more than once in a callback. Treat the remove option as a count. Assisted-by: Claude:opus-5.5
Problem: The dependency-test plugin cannot remove a dependency that was never added. Add the system.dependency-test-absent attribute. In job.state.depend, remove the named dependency and raise an exception if the remove does not fail with ENOENT. Assisted-by: Claude:opus-5.5
Problem: No test covers a repeated dependency add or remove, or the removal of a dependency that was never added. Add tests to t2270-job-dependencies.t. Assisted-by: Claude:opus-5.5
grondo
force-pushed
the
job-manager-dependency-fixes
branch
from
November 2, 2026 00:43
b55d5b0 to
f22abb1
Compare
Contributor
✅ Merged into
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7885 +/- ##
==========================================
- Coverage 84.08% 84.07% -0.02%
==========================================
Files 607 607
Lines 104396 104416 +20
==========================================
+ Hits 87782 87787 +5
- Misses 16614 16629 +15
🚀 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.
Problem:
flux_jobtap_dependency_add()andflux_jobtap_dependency_remove()can post events that have no effect or fail to apply. This happens when a plugin re-adds or removes dependencies on restart or plugin reload, or adds and removes a dependency in the same callback. In a callback, a remove of a dependency that was never added returns success, so the plugin does not get the error.This PR makes repeated add and remove calls post no event, and makes a remove of a dependency that was never added fail with ENOENT. It also corrects flux-jobtap-plugins(7), which says a repeated add returns EEXIST.
This came out of the review of #7877. The related job manager fix for events that fail to apply is in #7881. This addresses the comment at the end of #7868.