Skip to content

Upstream 16230 - remove artifacts from list endpoint#248

Merged
cigamit merged 1 commit intomainfrom
upstream16230
Feb 28, 2026
Merged

Upstream 16230 - remove artifacts from list endpoint#248
cigamit merged 1 commit intomainfrom
upstream16230

Conversation

@cigamit
Copy link
Copy Markdown
Contributor

@cigamit cigamit commented Feb 28, 2026

Removes the artifacts field from the unifiedjob list endpoint because this field can contain a large amount of data which is not needed in the jobs list.

@cigamit cigamit requested a review from TheWitness February 28, 2026 05:19
@cigamit cigamit self-assigned this Feb 28, 2026
@cigamit cigamit added the enhancement New feature or request label Feb 28, 2026
Copilot AI review requested due to automatic review settings February 28, 2026 05:19
@cigamit cigamit added the python Pull requests that update python code label Feb 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 removes the artifacts field from the UnifiedJobListSerializer (and all its subclasses via inheritance) to avoid serving potentially large payload data that is unnecessary at the jobs list endpoint. The artifacts field remains available in the detail view serializers (e.g., JobSerializer/JobDetailSerializer).

Changes:

  • artifacts is excluded from the list serializer's Meta.fields and the get_field_names filter tuple.
  • The unit test for detail-only fields is updated to include artifacts in the set of fields allowed to be exclusive to the detail view.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
awx/api/serializers.py Adds '-artifacts' to UnifiedJobListSerializer.Meta.fields and 'artifacts' to the exclusion tuple in get_field_names, removing the field from all list endpoints.
awx/main/tests/unit/api/serializers/test_unified_serializers.py Adds 'artifacts' to allowed_detail_fields so the test correctly permits the field being in detail serializers but not list serializers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cigamit cigamit merged commit 4bbd879 into main Feb 28, 2026
4 checks passed
@cigamit cigamit deleted the upstream16230 branch February 28, 2026 16:37
@Klaas-
Copy link
Copy Markdown
Contributor

Klaas- commented Mar 26, 2026

Just for the next person looking at this, if you used awx.awx.job_list to receive artifacts for jobs; it no longer works after this change. I am guessing the proper way to do it now is "{{ lookup('awx.awx.controller_api', 'jobs/' + job_id|string ).artifacts }}"

@cigamit
Copy link
Copy Markdown
Contributor Author

cigamit commented Mar 26, 2026

We can add it back in if you think its useful. It is kinda a pain that there is no job_info module.

@Klaas-
Copy link
Copy Markdown
Contributor

Klaas- commented Mar 26, 2026 via email

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

Labels

enhancement New feature or request python Pull requests that update python code

Development

Successfully merging this pull request may close these issues.

4 participants