-
Bug
-
Resolution: Done
-
Major
-
2.2
-
False
-
-
False
-
Description
- In the PAH > Repo Management > Remote > rh-certified > edit form, when you change the url in the remote, and then click sync, if the timestamp of the published repo https://console.redhat.com/api/automation-hub/content/published/v3/plugin/ansible/content/published/collections/ has not changed since the last sync, the client will not attempt to sync
- This is because galaxy_ng always sends optimize=true
- https://github.com/pulp/pulp_ansible/blob/595f19b9751ee2ba5a432ddd71aae534b8633887/pulp_ansible/app/tasks/collections.py#L486
- https://github.com/ansible/galaxy_ng/blob/d22c177881d0a2de6ba4f2e18ae9ea0d17f3162b/galaxy_ng/app/api/v3/views/sync.py#L55
Proposed Solution
- Add option in galaxy_ng api and UI to force sync, and make use of the `optimize` parameter in the backend
Key Dependency Versions
Tested in 4.5.0, but this would occur in all PAH versions
Steps to Reproduce
- Confirm your PAH > Repo Management > Remote > rh-certified > edit > URL contains a synclist URL i.e. https://console.redhat.com/api/automation-hub/content/540155-synclist/ which excludes collections i.e. https://console.redhat.com/api/automation-hub/content/540155-synclist/v3/excludes/ and your PAH rh-certified repo contains a subset of published repo
- Click Sync and wait until it completes
- PAH > Repo Management > Remote > rh-certified > edit: change URL to https://console.redhat.com/api/automation-hub/content/published/
- Check https://console.redhat.com/api/automation-hub/content/published/v3/plugin/ansible/content/published/collections/ that the timestamp did not just change during this time you are testing this
- Click Sync
- Sync completes very fast, and it does not download any additional collections
Actual Behavior
Sync does not download any additional collections
Expected Behavior
It is reasonably expected by a user that sync should download additional collections
Workaround
- Go to Ansible Repository List http://localhost:5001/pulp/api/v3/repositories/ansible/ansible/ and go to the url for the Ansible Repository Instance for the `rh-certified` repo
- Note the remote
- Click Extra Actions > Sync
- Provide the remote into this payload for this endpoint, keep the optimize value at false (this is what forces sync), and send the POST request
- is related to
-
AAH-2039 After CRC sync toggle, PAH sync will not bring down new changes right away
- Closed