orphan tag creation hides commit from future changelog parent search

Bug #1772462 reported by Scott Moser on 2018-05-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
usd-importer
High
Unassigned

Bug Description

Look good? ctrl-c to abort

$ snap info git-ubuntu
name: git-ubuntu
summary: Ubuntu development git tooling
publisher: canonical
license: unknown
description: |
  Imports, clones, etc. a source package in a git tree
commands:
  - git-ubuntu
  - git-ubuntu.import-source-packages
  - git-ubuntu.man
  - git-ubuntu.merge-changelogs
  - git-ubuntu.reconstruct-changelog
  - git-ubuntu.self-test
  - git-ubuntu.source-package-walker
  - git-ubuntu.update-repository-alias
snap-id: VAGSRAriUyDDlqsLunShJTe7503Uw4GF
tracking: beta
refreshed: 2018-03-02T16:47:36-05:00
installed: 0.7.4 (392) 105MB classic
channels:
  stable: 0.7.4+git16.0a79cbc (391) 104MB classic
  candidate: 0.7.4 (392) 105MB classic
  beta: ↑
  edge: 0.7.4+git81.edb18ab (428) 114MB classic

$ /snap/bin/git-ubuntu import -v --directory=subiquity --lp-user=smoser subiquity
Mon, 21 May 2018 13:35:29 -0400: subiquity: start
05/21/2018 13:35:30 - DEBUG:Executing: git config gitubuntu.lpuser
05/21/2018 13:35:30 - INFO:Ubuntu Server Team importer v0.7.4
05/21/2018 13:35:30 - DEBUG:Adding https://git.launchpad.net/~usd-import-team/ubuntu/+source/subiquity as remote pkg
05/21/2018 13:35:30 - DEBUG:Executing: git config remote.pkg.tagOpt --no-tags
05/21/2018 13:35:30 - DEBUG:Fetching remote pkg
05/21/2018 13:35:30 - DEBUG:Executing: git fetch pkg
05/21/2018 13:35:30 - ERROR:Command exited 128: git fetch pkg
05/21/2018 13:35:30 - ERROR:stdout:
05/21/2018 13:35:31 - ERROR:stderr: fatal: could not read Username for 'https://git.launchpad.net': terminal prompts disabled

05/21/2018 13:35:31 - DEBUG:Fetching refspec refs/tags/*:refs/tags/importer/* from remote pkg
05/21/2018 13:35:31 - DEBUG:Executing: git fetch pkg "refs/tags/*:refs/tags/importer/*"
05/21/2018 13:35:31 - ERROR:Command exited 128: git fetch pkg "refs/tags/*:refs/tags/importer/*"
05/21/2018 13:35:31 - ERROR:stdout:
05/21/2018 13:35:31 - ERROR:stderr: fatal: could not read Username for 'https://git.launchpad.net': terminal prompts disabled

05/21/2018 13:35:31 - DEBUG:Executing: git checkout --orphan do-not-push
05/21/2018 13:35:31 - DEBUG:Executing: git commit --allow-empty -m "Initial upstream branch."
05/21/2018 13:35:31 - DEBUG:Executing: git checkout --orphan master
05/21/2018 13:35:31 - DEBUG:Executing: git checkout --orphan importer/importer/ubuntu/pristine-tar
05/21/2018 13:35:31 - DEBUG:Executing: git commit --allow-empty -m "Initial Ubuntu pristine-tar branch."
05/21/2018 13:35:31 - DEBUG:Executing: git checkout --orphan master
05/21/2018 13:35:31 - DEBUG:Executing: git checkout --orphan importer/importer/debian/pristine-tar
05/21/2018 13:35:31 - DEBUG:Executing: git commit --allow-empty -m "Initial Debian pristine-tar branch."
05/21/2018 13:35:31 - DEBUG:Executing: git checkout --orphan master
05/21/2018 13:35:33 - WARNING:No publication history found for subiquity in debian.
05/21/2018 13:35:34 - INFO:Importing patches-unapplied 0.0.15 to ubuntu/yakkety-proposed
05/21/2018 13:35:38 - DEBUG:Executing: git checkout --orphan master
05/21/2018 13:35:38 - DEBUG:Executing: git reset --hard
05/21/2018 13:35:38 - DEBUG:Executing: git clean -f -d
05/21/2018 13:35:38 - DEBUG:Executing: git checkout --orphan importer/importer/ubuntu/dsc
05/21/2018 13:35:38 - DEBUG:Executing: git reset --hard
05/21/2018 13:35:38 - DEBUG:Executing: git add /tmp/subiquity
05/21/2018 13:35:38 - DEBUG:Executing: git diff --exit-code HEAD
05/21/2018 13:35:38 - DEBUG:Executing: git commit -m "DSC file for 0.0.15"
05/21/2018 13:35:38 - DEBUG:Executing: git checkout --orphan master
05/21/2018 13:35:38 - DEBUG:Executing: git reset --hard
05/21/2018 13:35:38 - DEBUG:Executing: git clean -f -d
05/21/2018 13:35:39 - DEBUG:Executing: dpkg-source -x --skip-patches /tmp/subiquity/.git/git-ubuntu-cache/subiquity_0.0.15.dsc /tmp/tmp5vartmih/x
05/21/2018 13:35:39 - DEBUG:Executing: git add -f -A
05/21/2018 13:35:39 - DEBUG:Executing: git reset HEAD -- .git
05/21/2018 13:35:39 - DEBUG:Executing: git reset HEAD -- .pc
05/21/2018 13:35:39 - DEBUG:Executing: git write-tree
05/21/2018 13:35:39 - DEBUG:Executing: git checkout --orphan master
05/21/2018 13:35:39 - DEBUG:Executing: git reset --hard
05/21/2018 13:35:39 - DEBUG:Executing: git clean -f -d
05/21/2018 13:35:39 - DEBUG:Imported patches-unapplied version 0.0.15 as tree a597ec73fdf32c803c5e9d17b37fb0fdd74d84fa
05/21/2018 13:35:39 - DEBUG:Executing: sh -c "dpkg-parsechangelog -l- --format rfc822 -SVersion --all"
05/21/2018 13:35:39 - DEBUG:Found changelog version 0.0.15 in newly imported tree
05/21/2018 13:35:39 - DEBUG:Tip version is None
05/21/2018 13:35:40 - DEBUG:Executing: sh -c "dpkg-parsechangelog -l- -SMaintainer"
05/21/2018 13:35:40 - DEBUG:Executing: sh -c "dpkg-parsechangelog -l- -SDate"
05/21/2018 13:35:40 - DEBUG:Executing: git commit-tree --no-gpg-sign a597ec73fdf32c803c5e9d17b37fb0fdd74d84fa -F /tmp/tmpbyjjdjya
05/21/2018 13:35:40 - DEBUG:Committed patches-unapplied import of 0.0.15 as 3fea2a5728ff8b6d637664a087bfd893860c0477 in ubuntu/yakkety-proposed
05/21/2018 13:35:40 - DEBUG:Creating tag importer/import/0.0.15 pointing to 3fea2a5728ff8b6d637664a087bfd893860c0477
05/21/2018 13:35:40 - DEBUG:Executing: git tag -a -m "git-ubuntu import v0.7.4" importer/import/0.0.15 3fea2a5728ff8b6d637664a087bfd893860c0477
05/21/2018 13:35:42 - INFO:Importing patches-unapplied 0.0.15 to ubuntu/yakkety
05/21/2018 13:35:44 - DEBUG:Executing: git checkout --orphan master
05/21/2018 13:35:44 - DEBUG:Executing: git reset --hard
05/21/2018 13:35:44 - DEBUG:Executing: git clean -f -d
05/21/2018 13:35:44 - DEBUG:Executing: git checkout importer/importer/ubuntu/dsc
05/21/2018 13:35:44 - DEBUG:Executing: git add /tmp/subiquity
05/21/2018 13:35:44 - DEBUG:Executing: git diff --exit-code HEAD
05/21/2018 13:35:44 - DEBUG:Executing: git checkout --orphan master
05/21/2018 13:35:44 - DEBUG:Executing: git reset --hard
05/21/2018 13:35:44 - DEBUG:Executing: git clean -f -d
05/21/2018 13:35:45 - DEBUG:Executing: dpkg-source -x --skip-patches /tmp/subiquity/.git/git-ubuntu-cache/subiquity_0.0.15.dsc /tmp/tmps632e1e8/x
05/21/2018 13:35:45 - DEBUG:Executing: git add -f -A
05/21/2018 13:35:45 - DEBUG:Executing: git reset HEAD -- .git
05/21/2018 13:35:45 - DEBUG:Executing: git reset HEAD -- .pc
05/21/2018 13:35:45 - DEBUG:Executing: git write-tree
05/21/2018 13:35:45 - DEBUG:Executing: git checkout --orphan master
05/21/2018 13:35:45 - DEBUG:Executing: git reset --hard
05/21/2018 13:35:45 - DEBUG:Executing: git clean -f -d
05/21/2018 13:35:45 - DEBUG:Imported patches-unapplied version 0.0.15 as tree a597ec73fdf32c803c5e9d17b37fb0fdd74d84fa
05/21/2018 13:35:45 - DEBUG:Found changelog version 0.0.15 in newly imported tree
05/21/2018 13:35:45 - DEBUG:Tip version is None
05/21/2018 13:35:45 - DEBUG:Executing: sh -c "dpkg-parsechangelog -l- -n1 -SVersion"
05/21/2018 13:35:45 - DEBUG:Executing: sh -c "dpkg-parsechangelog -l- -n1 -o1 -SVersion"
05/21/2018 13:35:45 - DEBUG:Changelog parent (tag) is importer/import/0.0.15
05/21/2018 13:35:47 - INFO:Importing patches-unapplied 0.0.18 to ubuntu/yakkety-proposed
05/21/2018 13:35:51 - DEBUG:Executing: git checkout --orphan master
05/21/2018 13:35:51 - DEBUG:Executing: git reset --hard
05/21/2018 13:35:51 - DEBUG:Executing: git clean -f -d
05/21/2018 13:35:51 - DEBUG:Executing: git checkout importer/importer/ubuntu/dsc
05/21/2018 13:35:51 - DEBUG:Executing: git add /tmp/subiquity
05/21/2018 13:35:51 - DEBUG:Executing: git diff --exit-code HEAD
05/21/2018 13:35:51 - DEBUG:Executing: git commit -m "DSC file for 0.0.18"
05/21/2018 13:35:51 - DEBUG:Executing: git checkout --orphan master
05/21/2018 13:35:51 - DEBUG:Executing: git reset --hard
05/21/2018 13:35:51 - DEBUG:Executing: git clean -f -d
05/21/2018 13:35:51 - DEBUG:Executing: dpkg-source -x --skip-patches /tmp/subiquity/.git/git-ubuntu-cache/subiquity_0.0.18.dsc /tmp/tmptzbq52o5/x
05/21/2018 13:35:52 - DEBUG:Executing: git add -f -A
05/21/2018 13:35:52 - DEBUG:Executing: git reset HEAD -- .git
05/21/2018 13:35:52 - DEBUG:Executing: git reset HEAD -- .pc
05/21/2018 13:35:52 - DEBUG:Executing: git write-tree
05/21/2018 13:35:52 - DEBUG:Executing: git checkout --orphan master
05/21/2018 13:35:52 - DEBUG:Executing: git reset --hard
05/21/2018 13:35:52 - DEBUG:Executing: git clean -f -d
05/21/2018 13:35:52 - DEBUG:Imported patches-unapplied version 0.0.18 as tree 0a8b786b67b471309177628c1e7b41ae88e45aaa
05/21/2018 13:35:52 - DEBUG:Executing: sh -c "dpkg-parsechangelog -l- --format rfc822 -SVersion --all"
05/21/2018 13:35:52 - DEBUG:Found changelog version 0.0.18 in newly imported tree
05/21/2018 13:35:52 - DEBUG:Executing: sh -c "dpkg-parsechangelog -l- -n1 -SVersion"
05/21/2018 13:35:52 - DEBUG:Executing: sh -c "dpkg-parsechangelog -l- -n1 -o1 -SVersion"
05/21/2018 13:35:52 - DEBUG:Tip version is 0.0.15
05/21/2018 13:35:53 - DEBUG:Executing: sh -c "dpkg-parsechangelog -l- -SMaintainer"
05/21/2018 13:35:53 - DEBUG:Executing: sh -c "dpkg-parsechangelog -l- -SDate"
05/21/2018 13:35:53 - DEBUG:Executing: git commit-tree --no-gpg-sign 0a8b786b67b471309177628c1e7b41ae88e45aaa -F /tmp/tmpyss15iq3
05/21/2018 13:35:53 - DEBUG:Committed patches-unapplied import of 0.0.18 as 480d243efb7a9c35597790c12eecf80c739b3cd1 in ubuntu/yakkety-proposed
05/21/2018 13:35:53 - DEBUG:Creating tag importer/orphan/0.0.18 pointing to 480d243efb7a9c35597790c12eecf80c739b3cd1
05/21/2018 13:35:53 - DEBUG:Executing: git tag -a -m "git-ubuntu import v0.7.4" importer/orphan/0.0.18 480d243efb7a9c35597790c12eecf80c739b3cd1
05/21/2018 13:35:55 - INFO:Importing patches-unapplied 0.0.18 to ubuntu/yakkety
05/21/2018 13:35:58 - DEBUG:Executing: git checkout --orphan master
05/21/2018 13:35:58 - DEBUG:Executing: git reset --hard
05/21/2018 13:35:58 - DEBUG:Executing: git clean -f -d
05/21/2018 13:35:58 - DEBUG:Executing: git checkout importer/importer/ubuntu/dsc
05/21/2018 13:35:58 - DEBUG:Executing: git add /tmp/subiquity
05/21/2018 13:35:58 - DEBUG:Executing: git diff --exit-code HEAD
05/21/2018 13:35:58 - DEBUG:Executing: git checkout --orphan master
05/21/2018 13:35:58 - DEBUG:Executing: git reset --hard
05/21/2018 13:35:58 - DEBUG:Executing: git clean -f -d
05/21/2018 13:35:59 - DEBUG:Executing: dpkg-source -x --skip-patches /tmp/subiquity/.git/git-ubuntu-cache/subiquity_0.0.18.dsc /tmp/tmp63varkod/x
05/21/2018 13:35:59 - DEBUG:Executing: git add -f -A
05/21/2018 13:35:59 - DEBUG:Executing: git reset HEAD -- .git
05/21/2018 13:35:59 - DEBUG:Executing: git reset HEAD -- .pc
05/21/2018 13:35:59 - DEBUG:Executing: git write-tree
05/21/2018 13:35:59 - DEBUG:Executing: git checkout --orphan master
05/21/2018 13:35:59 - DEBUG:Executing: git reset --hard
05/21/2018 13:35:59 - DEBUG:Executing: git clean -f -d
05/21/2018 13:35:59 - DEBUG:Imported patches-unapplied version 0.0.18 as tree 0a8b786b67b471309177628c1e7b41ae88e45aaa
05/21/2018 13:35:59 - DEBUG:Found changelog version 0.0.18 in newly imported tree
05/21/2018 13:35:59 - DEBUG:Tip version is 0.0.15
05/21/2018 13:36:00 - DEBUG:Executing: git commit-tree --no-gpg-sign 0a8b786b67b471309177628c1e7b41ae88e45aaa -F /tmp/tmpe6a28yx4
05/21/2018 13:36:00 - DEBUG:Committed patches-unapplied import of 0.0.18 as ebb8c8e1b27296a7a53db55b5972ae1398eaa605 in ubuntu/yakkety
05/21/2018 13:36:00 - DEBUG:Creating tag importer/orphan/0.0.18 pointing to ebb8c8e1b27296a7a53db55b5972ae1398eaa605
05/21/2018 13:36:00 - DEBUG:Executing: git tag -a -m "git-ubuntu import v0.7.4" importer/orphan/0.0.18 ebb8c8e1b27296a7a53db55b5972ae1398eaa605
05/21/2018 13:36:00 - ERROR:Command exited 128: git tag -a -m "git-ubuntu import v0.7.4" importer/orphan/0.0.18 ebb8c8e1b27296a7a53db55b5972ae1398eaa605
05/21/2018 13:36:00 - ERROR:stdout:
05/21/2018 13:36:00 - ERROR:stderr: fatal: tag 'importer/orphan/0.0.18' already exists

Traceback (most recent call last):
  File "/snap/git-ubuntu/392/lib/python3.6/site-packages/gitubuntu/importer.py", line 1510, in import_publishes
    parent_overrides=parent_overrides,
  File "/snap/git-ubuntu/392/lib/python3.6/site-packages/gitubuntu/importer.py", line 1286, in import_unapplied_spi
    upload_parent_commit,
  File "/snap/git-ubuntu/392/lib/python3.6/site-packages/gitubuntu/importer.py", line 584, in commit_unapplied_patches_import
    None,
  File "/snap/git-ubuntu/392/lib/python3.6/site-packages/gitubuntu/importer.py", line 564, in _commit_import
    tag, commit_hash
  File "/snap/git-ubuntu/392/lib/python3.6/site-packages/gitubuntu/git_repository.py", line 1461, in git_run
    **kwargs,
  File "/snap/git-ubuntu/392/lib/python3.6/site-packages/gitubuntu/git_repository.py", line 203, in git_run
    return run(['git'] + list(args), env=env, **kwargs)
  File "/snap/git-ubuntu/392/lib/python3.6/site-packages/gitubuntu/run.py", line 88, in run
    raise e
  File "/snap/git-ubuntu/392/lib/python3.6/site-packages/gitubuntu/run.py", line 67, in run
    stdout=stdout, stderr=stderr, stdin=stdin)
  File "/snap/git-ubuntu/392/usr/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'tag', '-a', '-m', 'git-ubuntu import v0.7.4', 'importer/orphan/0.0.18', 'ebb8c8e1b27296a7a53db55b5972ae1398eaa605']' returned non-zero exit status 128.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/snap/git-ubuntu/392/bin/git-ubuntu", line 11, in <module>
    load_entry_point('gitubuntu==0.7.4', 'console_scripts', 'git-ubuntu')()
  File "/snap/git-ubuntu/392/lib/python3.6/site-packages/gitubuntu/__main__.py", line 243, in main
    sys.exit(args.func(args))
  File "/snap/git-ubuntu/392/lib/python3.6/site-packages/gitubuntu/importer.py", line 1634, in cli_main
    retry_backoffs=args.retry_backoffs,
  File "/snap/git-ubuntu/392/lib/python3.6/site-packages/gitubuntu/importer.py", line 345, in main
    parent_overrides=parent_overrides,
  File "/snap/git-ubuntu/392/lib/python3.6/site-packages/gitubuntu/importer.py", line 1525, in import_publishes
    raise GitUbuntuImportError(msg) from e
gitubuntu.importer.GitUbuntuImportError: Unable to import patches-unapplied 0.0.18 to ubuntu
05/21/2018 13:36:00 - INFO:Leaving /tmp/subiquity as directed

Nish Aravamudan (nacc) wrote :

Might be a duplicate of 1753800 or the other importer bugs related to the importer branch Robie has to review.

Robie Basak (racb) wrote :

Publishing events:

A: 0.0.15 published
B: 0.0.18 published with no changelog parent matching a previous publication
C: 0.0.18 pocket copied (same tree as previous 0.0.18 publication)

What's happening is that event B causes an orphan tag to be created instead of an import tag. When C (I think) is seen, no import tag is found, so it's processed the same as B was, which results in an attempt to create a duplicate orphan tag.

Nish's SPECIFICATION.importer should fix this.

tags: added: import import-edge-case
summary: - git-ubuntu import subiquity stacktraces tag importer/orphan/0.0.18
- already exists
+ orphan tag creation hides commit from future changelog parent search
Changed in usd-importer:
status: New → Triaged
importance: Undecided → High
Robie Basak (racb) on 2018-05-24
tags: added: spec
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers