Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch all fields when initializing a serializer #228

Merged
merged 1 commit into from
Jul 23, 2019

Conversation

lubosmj
Copy link
Member

@lubosmj lubosmj commented Jul 23, 2019

When a user used _href within the fields selection,
the serializer could fetch a correct value from
_href. This commit removes a need to specify _href
while filtering fields from the response.

When the data model will change, this may cause
performance drawbacks due to serializing all fields
of Task objects.

closes #4722
https://pulp.plan.io/issues/4722

When a user used _href within the fields selection,
the serializer could fetch a correct value from
_href. This commit removes a need to specify _href
while filtering fields from the response.

When the data model will change, this may cause
performance drawbacks due to serializing all fields
of Task objects.

closes pulp#4722
https://pulp.plan.io/issues/4722
@lubosmj lubosmj force-pushed the field-create-resources-4722 branch from 5cfb0e7 to ac75012 Compare July 23, 2019 15:46
@codecov
Copy link

codecov bot commented Jul 23, 2019

Codecov Report

Merging #228 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #228      +/-   ##
==========================================
- Coverage   68.13%   68.09%   -0.05%     
==========================================
  Files          68       68              
  Lines        3220     3219       -1     
==========================================
- Hits         2194     2192       -2     
- Misses       1026     1027       +1
Impacted Files Coverage Δ
pulpcore/app/serializers/task.py 98.38% <100%> (-0.03%) ⬇️
pulpcore/app/viewsets/task.py 93.42% <0%> (-1.32%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0f0797...ac75012. Read the comment docs.

Copy link
Member

@dkliban dkliban left a comment

Choose a reason for hiding this comment

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

Thanks for the patch!

It would be nice to have a pulp-smash test that asserts that this filter works correctly.

@dkliban dkliban merged commit ff4b276 into pulp:master Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants