Task #7938: [EPIC] As a user, I have improved Galaxy V3 sync performance
As a sync user, I get no-op when possible
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.
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
AnsibleRepositoryso that the next time sync occurs we can determine if the server side has changed.
Updated by Anonymous over 1 year ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp_ansible|e09fee302577c91613e73f5ab9e19b435730ccfc.