Publishing packages from CI builds sometimes creates duplication

Bug #1999175 reported by Dan Ryan
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
New
Undecided
Unassigned

Bug Description

I want to preface this with the fact that I'm not entirely sure if this is a real issue yet.

Today I was publishing the python package `editables` in a private distribution targeting artifactory from a CI build available here: https://code.launchpad.net/~ubuntu-security/soss/+source/python-editables/+git/python-editables/+build/16087

I published this using the `lpcraft release` command written some time ago by @cjwatson

The package is not currently present in artifactory and it had been around 20-30 minutes, so I wanted to check whether there was something blocking its publication. I created a launchpad client from a python session and checked the private PPA that targets artifactory:

>>> archive = lp.archives.getByReference(reference="ppa:<name of ppa here>")
>>> binaries = [_ for _ in archive.getPublishedBinaries() if _.status in ("Published", "Pending")]
>>> editable_binaries = [_ for _ in binaries if _.binary_package_name == "editables"]

Typically my first check at this point is to make sure there is only one binary (there should only be one version of the package):

>>> len(editable_binaries)
3

So I looked a bit more carefully:

>>> [_.status for _ in editable_binaries]
['Pending', 'Pending', 'Pending']
>>> [_.date_created for _ in editable_binaries]
[datetime.datetime(2022, 12, 8, 18, 53, 29, 267381, tzinfo=TimeZone(0)), datetime.datetime(2022, 12, 8, 18, 53, 29, 267381, tzinfo=TimeZone(0)), datetime.datetime(2022, 12, 8, 18, 53, 29, 267381, tzinfo=TimeZone(0))]
>>> len({url for _ in editable_binaries for url in _.binaryFileUrls()})
1

As you can see they are all 3 'Pending', all published today at the *exact* same timestamp, and share identical URLs.

I gave this a bit more time and the package did ultimately publish, but interestingly there are still 3 packages that turn up, with all 3 indicating they are published now:

>>> binaries = [_ for _ in archive.getPublishedBinaries() if _.status in ("Published", "Pending")]
>>> editable_binaries = [_ for _ in binaries if _.binary_package_name == "editables"]
>>> [_.status for _ in editable_binaries]
['Published', 'Published', 'Published']

Again I have no idea if this is a serious issue but I am not sure if this is intended and wonder if it is a cause of some other issues I've seen with mysterious duplication of released items.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.