Project

Profile

Help

Issue #2544

closed

copy always matches every unit in the repo

Added by mhrivnak about 7 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - OSTree:
1.2.0
Platform Release:
2.12.2
Target Release - OSTree:
OS:
Fedora 25
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix, Pulp 2
Sprint:
Sprint 15
Quarter:

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.

Actions #1

Updated by mhrivnak about 7 years ago

  • Version - OSTree set to 1.2.0
  • OS set to Fedora 25
Actions #2

Updated by mhrivnak about 7 years ago

  • Tags Easy Fix added
Actions #3

Updated by bizhang about 7 years ago

  • Triaged changed from No to Yes
Actions #5

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.

Actions #6

Updated by bizhang about 7 years ago

  • Sprint/Milestone set to 33
  • Triaged changed from No to Yes
Actions #7

Updated by jortel@redhat.com about 7 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to jortel@redhat.com
Actions #8

Updated by jortel@redhat.com about 7 years ago

  • Status changed from ASSIGNED to POST
Actions #9

Updated by jortel@redhat.com about 7 years ago

  • Status changed from POST to MODIFIED
Actions #10

Updated by semyers about 7 years ago

  • Platform Release set to 2.12.2
Actions #12

Updated by semyers about 7 years ago

  • Status changed from MODIFIED to 5
Actions #13

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
Actions #14

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.

Actions #15

Updated by bizhang about 7 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #16

Updated by bmbouter about 6 years ago

  • Sprint set to Sprint 15
Actions #17

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (33)
Actions #18

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF