Issue #1965
closedforce_full is not supported by yum_distributor
Description
Let's say one does the following:
1. Create and sync an RPM repository.
2. Publish the repo.
3. Publish the repo again.
The first publish should be a full publish, and the second should be a fast-forward publish. Pulp does this. Now, let's say one does the following:
1. Create and sync an RPM repository.
2. Publish the repo.
3. Publish the repo again, with the force_full
flag set to true.
In this case, both publishes should be full. One can verify this is so by finding the last task spawned by the publish operation, and verifying its ['results']['details']
attribute. It should look something like this:
[{'...': '...'},
{u'description': u'Publishing RPMs',
u'details': u'',
u'error_details': [],
u'items_total': 32,
u'num_failures': 0,
u'num_processed': 32, # NOTE: num_processed > 0
u'num_success': 32,
u'state': u'FINISHED',
u'step_id': u'8cb2aba3-e372-4f33-b300-50d0faee8f6f',
u'step_type': u'rpms'},
{'...': '...'}]
The "force_full" feature is not present on Pulp 2.8. As a result, the num_processed
attribute has a value of 0
. This is as expected.
The "force_full" feature is present on Pulp 2.9. As a result, the num_processed
attribute should have a value of 32
. That's not currently the case. Instead, the last task's ['results']['details']
attribute has the following value: 'Skipped. Nothing changed since last publish'
. This indicates that a full publish did not occur, and that a fast-forward publish occurred instead.
Updated by Ichimonji10 almost 8 years ago
A possibly-related issue is https://pulp.plan.io/issues/1938, "force_full is not supported by export_distributor."
Again, this issue does not affect Pulp 2.8. It cannot, as the force_full feature is new in Pulp 2.9
Updated by Ichimonji10 almost 8 years ago
An automated test for this issue is in place: http://pulp-smash.readthedocs.io/en/latest/api/pulp_smash.tests.rpm.api_v2.test_force_full.html
Updated by Ichimonji10 almost 8 years ago
- Status changed from NEW to CLOSED - NOTABUG
The API test code used to produce this bug was wrong. The following was passed as the body of the HTTP POST call to repo_href/actions/publish/
:
{'id': repo_distributor_id, 'force_full': True}
However, the following should have been passed:
{'id': repo_distributor_id, 'override_config': {'force_full': True}}
Fixing this issue shows that the force_full
flag functions as expected.