Bug 1425567

Summary: As a User I want Pulp OSTree to create a new unit for each commit version on a branch
Product: Red Hat Satellite Reporter: Tom McKay <tomckay>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: NightlyCC: jalberts, mhrivnak
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-22 23:47:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tom McKay 2017-02-21 18:25:03 UTC
https://pulp.plan.io/issues/2594

With the "depth" option pulp today can sync an ostree repo "completely" as opposed to "only the latest". However pulp only a creates a unit per branch head. For example try the following

1) edit /etc/pulp/server/plugins.conf.d/ostree_importer.json {
"depth": -1
}
restart workers ..

2) pulp-admin ostree repo create --repo-id=synthesize --feed=https://partha.fedorapeople.org/test-repos/ostree-zoo/ 
3) pulp-admin ostree repo sync run --repo-id=synthesize

4) pulp-admin ostree repo list --repo-id=synthesize --detail

notice that the content units show quantity of 2

However in reality each branch in that repo has many versions. You can notice this by try something like this

cd /var/lib/pulp/content/shared/ostree
ls -lt  # find the topmost  recent dir which is likely to be of the repo you just synced
$ ostree log --repo=<top-dir>/content fedora-atomic/f21/x86_64/updates-testing/docker-host
commit b954defc0c21b23705bf5776a78ca434b2569260e64e19fb61bdbd5526b3bf0f
Date:  2016-03-03 15:42:30 +0000
Version: 23.3

    testing

commit b5478067c6ed79acde91d09cd3effcd12885a3cc749c390735de18a91ee75c9c
Date:  2016-03-03 15:42:30 +0000
Version: 23.2

    testing

commit 0dfe48948b5ecaf74f1864b4cb43a991ac7ab7e4ca5bbab36ac30b6596d81799
Date:  2016-03-03 15:42:30 +0000
Version: 23.1

    testing
Notice there are 3 versions on just one branch.

In an ideal world pulp ostree would create a new unit per branch + commit version using history from ostree log on the branch.

Comment 2 Jennifer Albertson 2017-02-22 23:47:58 UTC

*** This bug has been marked as a duplicate of bug 1425605 ***