Issue #2544
closedcopy always matches every unit in the repo
Description
When doing a copy from one ostree repo to another, all units in the repo get copied, no matter what filters were supplied.
The bug is here: https://github.com/pulp/pulp_ostree/blob/24729931bc5c49578e9a11c883a0e95409b23c96/plugins/pulp_ostree/plugins/importers/web.py#L141
It should use the iterable of "units" if provided.
How to reproduce:
pulp-admin ostree repo create --repo-id=f25 --feed=https://kojipkgs.fedoraproject.org/atomic/25/
pulp-admin ostree repo sync run --repo-id=f25
pulp-admin ostree repo search --repo-id=f25
Note that there are two units. I can do a query that matches just one of them:
pulp-admin ostree repo search --repo-id=f25 --str-eq='branch=fedora-atomic/25/x86_64/testing/docker-host'
Now let's create a new repo, and try to copy that one branch using the same filter.
$ pulp-admin ostree repo create --repo-id=f25-test
Repository [f25-test] successfully created
$ pulp-admin ostree repo copy -f f25 -t f25-test --str-eq='branch=fedora-atomic/25/x86_64/testing/docker-host'
This command may be exited via ctrl+c without affecting the request.
[\]
Running...
Copied:
remote_id:d9680ea424e704ad20d57011c054adb7e3f4ad43f8849c0e1eb9efd4f0ba9bf1
branch:fedora-atomic/25/x86_64/docker-host
commit:27b1ae24686697235c35b793b5c8ab0822b8427e892d3659f0cb300c400979fa
remote_id:d9680ea424e704ad20d57011c054adb7e3f4ad43f8849c0e1eb9efd4f0ba9bf1
branch:fedora-atomic/25/x86_64/testing/docker-host
commit:35c51948ffdc01c7f235796efcd2b34c7d14b3f1feb417a2ce849ecf2ec13bb2
Notice that it copied both branches. It should have only copied the one matching the filter.
Updated by mhrivnak about 7 years ago
- Version - OSTree set to 1.2.0
- OS set to Fedora 25
Updated by mhrivnak about 7 years ago
- Triaged changed from Yes to No
I'm un-triaging so we can have a second look. This is a major flaw that's very easy to fix, so I think we should get it on the sprint.
Updated by bizhang about 7 years ago
- Sprint/Milestone set to 33
- Triaged changed from No to Yes
Updated by jortel@redhat.com about 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to jortel@redhat.com
Updated by jortel@redhat.com about 7 years ago
- Status changed from ASSIGNED to POST
Added by jortel@redhat.com about 7 years ago
Updated by jortel@redhat.com about 7 years ago
- Status changed from POST to MODIFIED
Applied in changeset 8eaf318917c1edb89bb9630dd20dd06f987b78cb.
Updated by Ichimonji10 about 7 years ago
Manually verified on F24, F25 and RHEL 7 with the following script, created from the original report:
pulp-admin login -u admin
pulp-admin ostree repo create --repo-id foo --feed 'https://kojipkgs.fedoraproject.org/atomic/25/'
pulp-admin ostree repo sync run --repo-id foo
pulp-admin ostree repo search --repo-id foo
pulp-admin ostree repo search --repo-id foo --str-eq 'branch=fedora-atomic/25/x86_64/testing/docker-host'
pulp-admin ostree repo create --repo-id bar
pulp-admin ostree repo copy --from-repo-id foo --to-repo-id bar --str-eq 'branch=fedora-atomic/25/x86_64/testing/docker-host'
pulp-admin ostree repo search --repo-id foo
pulp-admin ostree repo search --repo-id bar
Updated by semyers about 7 years ago
We had a good team chat about the "Verification Required" flag on Monday, and decided that the release of 2.12.2 should not be blocked on the verification of this issue.
Updated by bizhang about 7 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Fix unit copy. closes #2544