Fix blank Status on Inventory Source table - #781
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 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(andlast_job_host_summary) toSUMMARIZABLE_FK_FIELDSso related summary data is emitted where needed (e.g., Inventory Source listing). - Prevent Host objects from using stale
last_job/last_job_host_summaryFK-based summaries, preserving HostSerializer’s JobHostSummary-derived behavior. - Add a functional API test asserting Inventory Source list results include
summary_fields.last_jobwithid,status, andfinished.
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.
TheWitness
approved these changes
Sep 1, 2026
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.
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.