Skip to content

Fix blank Status on Inventory Source table - #781

Merged
cigamit merged 3 commits into
mainfrom
missing_inv_status
Sep 1, 2026
Merged

Fix blank Status on Inventory Source table#781
cigamit merged 3 commits into
mainfrom
missing_inv_status

Conversation

@cigamit

@cigamit cigamit commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

We ported in Upstream #16332 but it came with a bug, when you click on an Inventory and go to the Sources tab, any Sources in there will show a blank Status column. Upstream has a follow up PR #16529 that we had not yet ported in, but it only does a bit more cleanup in this area, the bug itself remains.

This PR gives us the fix while also still keeping the original intent of #16332 and keeps the performance win.
I have also ported in the #16529 PR also.

@cigamit
cigamit requested a review from TheWitness September 1, 2026 03:23
@cigamit cigamit self-assigned this Sep 1, 2026
@cigamit cigamit added the bug Something isn't working label Sep 1, 2026
Copilot AI lite review requested due to automatic review settings September 1, 2026 03:24

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.

🟢 Approval recommended

Pull request overview

Fixes a regression where the Inventory → Sources tab shows a blank Status column by ensuring summary_fields.last_job is again included (with required fields) in API responses, while preserving the Host-related performance behavior introduced by the upstream port.

Changes:

  • Re-add last_job (and last_job_host_summary) to SUMMARIZABLE_FK_FIELDS so related summary data is emitted where needed (e.g., Inventory Source listing).
  • Prevent Host objects from using stale last_job / last_job_host_summary FK-based summaries, preserving HostSerializer’s JobHostSummary-derived behavior.
  • Add a functional API test asserting Inventory Source list results include summary_fields.last_job with id, status, and finished.
File summaries
File Description
awx/main/tests/functional/api/test_inventory.py Adds regression coverage for summary_fields.last_job on inventory source list responses (UI Status column dependency).
awx/api/serializers.py Restores summarization for last_job and guards Host serialization to keep JobHostSummary-derived behavior.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings September 1, 2026 03:51

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.

🔵 Needs a closer look

Review details
  • Files reviewed: 13/13 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 1, 2026 03: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.

🔵 Needs a closer look

Review details
  • Files reviewed: 13/13 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@cigamit
cigamit merged commit 7aaf815 into main Sep 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

3 participants