Fix issue with federated inventories when relaunch a single child job#373
Merged
Conversation
TheWitness
approved these changes
Jun 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a relaunch regression for workflow child jobs created from federated inventories, where relaunching a single child job could incorrectly re-enter federated workflow creation and/or re-inherit the parent (federated) inventory instead of keeping the child’s effective inventory.
Changes:
- Ensure
Job.copy_unified_job()bypasses federated job-template handling on relaunch and preserves the job’sinventory_id. - Add a functional model test covering relaunch of a federated-workflow child job to ensure it remains a
Joband retains inventory/IG routing cache. - Add a functional API regression test ensuring relaunch works for a job that was spawned as part of a sliced workflow job.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
awx/main/tests/functional/models/test_job.py |
Adds a regression test ensuring relaunching a federated workflow child job does not recreate a workflow and preserves inventory/instance group routing cache. |
awx/main/tests/functional/api/test_job.py |
Adds an API-level relaunch regression test for a job spawned from a sliced workflow job. |
awx/main/models/jobs.py |
Updates Job.copy_unified_job() to prevent federation logic on relaunch and to eagerly preserve inventory_id (plus existing slice fields). |
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.
Fixes an issue where the child job was re-inheriting the parent inventory when relaunching.