Skip to content

Fix issue with federated inventories when relaunch a single child job#373

Merged
cigamit merged 1 commit into
mainfrom
federated_relaunch
Jun 10, 2026
Merged

Fix issue with federated inventories when relaunch a single child job#373
cigamit merged 1 commit into
mainfrom
federated_relaunch

Conversation

@cigamit

@cigamit cigamit commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Fixes an issue where the child job was re-inheriting the parent inventory when relaunching.

@cigamit cigamit requested a review from TheWitness June 10, 2026 19:53
@cigamit cigamit self-assigned this Jun 10, 2026
Copilot AI review requested due to automatic review settings June 10, 2026 19:53
@cigamit cigamit added bug Something isn't working python Pull requests that update python code labels Jun 10, 2026
@cigamit cigamit merged commit cda0899 into main Jun 10, 2026
1 check passed
@cigamit cigamit deleted the federated_relaunch branch June 10, 2026 19:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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’s inventory_id.
  • Add a functional model test covering relaunch of a federated-workflow child job to ensure it remains a Job and 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working python Pull requests that update python code

Development

Successfully merging this pull request may close these issues.

3 participants