Actions
Story #7942
closedTask #7938: [EPIC] As a user, I have improved Galaxy V3 sync performance
As a sync user, I get no-op when possible
Start date:
Due date:
% Done:
100%
Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
No
Tags:
Sprint:
Sprint 90
Quarter:
Description
The first stage needs to keep all the existing code and fall back to it if the "new metadata endpoints are not available". They are only available on the Galaxy V3 API and if the server side implements them.
Model Changes¶
Add to the AnsibleRemote
a new attribute named last_synced_metadata_time
. Allow it to be None since in many cases, e.g. V2 sync and V3 sync's that don't yet support the new "metadata optimizations" won't be saving data into this attribute.
No migration is needed, since a None value will cause a sync to occur, and only subsequent sync's will be no-operation optimized.
Sync Workflow Changes¶
- Check at the
/pulp_ansible/galaxy/<path:path>/api/v3/
endpoint and check the build time. If 404, fall back to the existing sync implementation. - If the build time is the same as the one stored on the Repository object, exit the sync doing nothing (no-operation)
- Save the
last_synced_metadata_time
to theAnsibleRepository
so that the next time sync occurs we can determine if the server side has changed.
Related issues
Actions
Improve sync performance with no-op when possible
https://pulp.plan.io/issues/7942 closes #7942