Conversation
… include query parameter.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR adds an ChangesOptional field inclusion feature
Sequence Diagram(s)No sequence diagram generated: the changes do not involve multi-component interactions or altered control flow significant enough to require visualization. The feature is contained within the serializer's field filtering logic and direct view mixin application. 🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
||
| @pytest.mark.django_db | ||
| def test_jobs_list_strips_heavy_fields_by_default(get, admin, job_with_heavy_fields): | ||
| response = get(reverse('api:job_list') + '?id={}'.format(job_with_heavy_fields.id), admin, expect=200) |
There was a problem hiding this comment.
Good, you tested that this change extends to job listing. Trying to think if there are other unified jobs to check. I'd like a test for Ad-hoc jobs.
SUMMARY
Removes an additional field (extra_vars) from the unified_jobs and jobs GET endpoints. Also adds a new query parameter (include) to those endpoints which allows to explicitly include those fields (and only those fields) in the response.
Reason: this field can hold large amounts of data that is not needed in the list view. The fields are still returned in the details for a specific job.
Verification steps:
Make sure that the fields are included in the response when explicitly requested.
ISSUE TYPE
COMPONENT NAME
STEPS TO REPRODUCE AND EXTRA INFO
Summary by CodeRabbit
New Features
includequery parameter to unified job list endpoints, allowing selective inclusion ofartifactsand/orextra_varsfields. By default, these heavy fields are omitted from responses.Tests