Debian Bug report logs - #839072
autopkgtest: Allow for GitHub-style PR urls

version graph

Package: autopkgtest; Maintainer for autopkgtest is Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>; Source for autopkgtest is src:autopkgtest (PTS, buildd, popcon).

Reported by: Barry Warsaw <barry@debian.org>

Date: Wed, 28 Sep 2016 14:27:01 UTC

Severity: wishlist

Found in version autopkgtest/4.0.5

Fixed in version autopkgtest/4.1

Done: Martin Pitt <mpitt@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, barry@ubuntu.com, Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>:
Bug#839072; Package autopkgtest. (Wed, 28 Sep 2016 14:27:03 GMT) (full text, mbox, link).


Acknowledgement sent to Barry Warsaw <barry@debian.org>:
New Bug report received and forwarded. Copy sent to barry@ubuntu.com, Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>. (Wed, 28 Sep 2016 14:27:03 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Barry Warsaw <barry@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: autopkgtest: Allow for GitHub-style PR urls
Date: Wed, 28 Sep 2016 10:26:06 -0400
Package: autopkgtest
Version: 4.0.5
Severity: wishlist

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Dear Maintainer,

As we've been discussing, it would be nice if you could run
autopkgtest against GitHub-style pull requests.  There's no direct URL
that would allow you to do this, but you can support this by doing a
git fetch after the initial clone, e.g.:

$ git clone https://github.com/CanonicalLtd/ubuntu-image.git
$ cd ubuntu-image
$ git fetch origin +refs/pull/68/merge
$ git checkout -qf FETCH_HEAD

So the idea then is to allow URLs that can additionally specify that
PR ref.  Then I could run autopkgtest like so:

$ autopkgtest https://github.com/CanonicalLtd/ubuntu-image.git+refs/pull/68/merge -- schroot yakkety-amd64

Notice the '+' separating the .git URL from the PR refspec.

I'm not sure this is the best possible syntax, and I'd like to be able
to support GitLab PRs too, which apparently don't use a + or the same
refspec for their merge requests, although the same general
implementation (clone then fetch) *should* work.  

I thought about maybe using a '@' or some other unexpected delimiter
to separate the .git URL from the PR specification.  I'll play with a
GitLab MR to see what works best, but that would be an easy change.

I have a hack that works for GitHub, which I'll send along shortly.

- -- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.7.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages autopkgtest depends on:
ii  apt-utils       1.3
ii  libdpkg-perl    1.18.10
ii  procps          2:3.3.12-2
ii  python3         3.5.1-4
ii  python3-debian  0.1.29

Versions of packages autopkgtest recommends:
ii  autodep8  0.8

Versions of packages autopkgtest suggests:
pn  lxc          <none>
pn  lxd-client   <none>
pn  qemu-system  <none>
pn  qemu-utils   <none>
ii  schroot      1.6.10-2+b1

- -- no debconf information

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJX69L6AAoJEBJutWOnSwa/YUsQAKHzOSkuu509bpjX7tKJ4M19
4erLTGuF5yoUBgC79yNGEt0x5AvidsCuV/xeSCiyzbDXkU9sO/D48Wyq+CVUdxUr
kzDh4wORDFp0VhDo3maci8JnHu+Ng5nQ37JR+iQTk4Xd/abaiFMpADhU5DHDCO11
naHdOwsms26S+O/83zKujkxUHujOFMrv1Y+cvCc7lfuOgK4plBQh0LIc7bi3vFjn
zjFBtflyVRK1qBMROgQLJgq+Ijz6507Uf5hf317pwt5XjZk+/GBF2sRu0e7LTXxC
6GvpPgCQv4ru70OBrgzw8uj/aClb1IDg20CDEij+dwehGh97WkpqT5200V4V+OX0
4iRiMbOaMPtAzTBN1V3qlOLkIKSP1KlkRT86J6/+jYBReMZeXXDlf10WdaKjkMA/
yIQUfMIQfTPgSNl2NxGvxHF3EED9JXAGJuObHcqPiQTdI9wBkjOIlsSf5nwQkteF
Tp9BpfleTomgPVpwv1yxVDdqvoOT8OPVxVCE9tgOiSpG1Bad8y7CMmW9X4TgHA80
DWglHel6RtS0ihAol1gzeOiB79lQcpSEW3+8ill2b3I4K2s/is3iUlvqX8zRCzKS
Ckw62mCDPLGBZM19NbJxMHrjqmeVIxjlWtWrZoqoP5vqSRagcS/TpxczYJA2p4VS
xqaX2k7Kc7VB2zvnShjS
=p5rd
-----END PGP SIGNATURE-----



Information forwarded to debian-bugs-dist@lists.debian.org, Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>:
Bug#839072; Package autopkgtest. (Wed, 28 Sep 2016 14:57:03 GMT) (full text, mbox, link).


Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. Copy sent to Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>. (Wed, 28 Sep 2016 14:57:03 GMT) (full text, mbox, link).


Message #10 received at 839072@bugs.debian.org (full text, mbox, reply):

From: Martin Pitt <mpitt@debian.org>
To: Barry Warsaw <barry@debian.org>, 839072@bugs.debian.org
Subject: Re: Bug#839072: autopkgtest: Allow for GitHub-style PR urls
Date: Wed, 28 Sep 2016 16:52:08 +0200
Hello Barry,

Barry Warsaw [2016-09-28 10:26 -0400]:
> So the idea then is to allow URLs that can additionally specify that
> PR ref.  Then I could run autopkgtest like so:
> 
> $ autopkgtest https://github.com/CanonicalLtd/ubuntu-image.git+refs/pull/68/merge -- schroot yakkety-amd64
> 
> Notice the '+' separating the .git URL from the PR refspec.
> 
> I'm not sure this is the best possible syntax, and I'd like to be able
> to support GitLab PRs too, which apparently don't use a + or the same
> refspec for their merge requests, although the same general
> implementation (clone then fetch) *should* work.  

First, thanks for working on this! I'd love to make it straightfoward
to test a github branch with a single autopkgtest invocation.

I would actually like to generalize this, and use one and the same
method and syntax for both cases. Right now an url#mybranch argument
just does "git clone --branch mybranch url" which does not work for
these "floating" refs of PRs. But this seems to work:

  git clone url
  git fetch -fu origin $BRANCHNAME:testbranch
  git checkout testbranch

So the existing http://foo.org/proj.git#stable syntax (proper branch)
would continue to work, but you can then use
http://foo.org/proj.git#refs/pull/1234/head
(which is what I use for systemd PRs).

Would that also work for gitlab?

Thanks,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)



Information forwarded to debian-bugs-dist@lists.debian.org, Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>:
Bug#839072; Package autopkgtest. (Wed, 28 Sep 2016 17:36:04 GMT) (full text, mbox, link).


Acknowledgement sent to Barry Warsaw <barry@debian.org>:
Extra info received and forwarded to list. Copy sent to Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>. (Wed, 28 Sep 2016 17:36:04 GMT) (full text, mbox, link).


Message #15 received at 839072@bugs.debian.org (full text, mbox, reply):

From: Barry Warsaw <barry@debian.org>
To: autopkgtest-devel@lists.alioth.debian.org
Cc: Martin Pitt <mpitt@debian.org>, 839072@bugs.debian.org
Subject: Re: Bug#839072: autopkgtest: Allow for GitHub-style PR urls
Date: Wed, 28 Sep 2016 13:24:54 -0400
[Message part 1 (text/plain, inline)]
On Sep 28, 2016, at 04:52 PM, Martin Pitt wrote:

>First, thanks for working on this! I'd love to make it straightfoward
>to test a github branch with a single autopkgtest invocation.

Seems pretty easy!  Attached is the patch.  I tested this with both GitHub and
GitLab branches and pull/merge requests.  E.g. all the following work nicely:

$ autopkgtest https://gitlab.com/user/project.git
$ autopkgtest https://gitlab.com/user/project.git#branchname
$ autopkgtest https://gitlab.com/user/project.git#merge-requests/1/head

$ autopkgtest https://github.com/user/project.git
$ autopkgtest https://github.com/user/project.git#branchname
$ autopkgtest https://github.com/user/project.git#refs/pull/1/merge

Each stanza above describes the master branch, a specific other branch, and
the respective hosting services' names for pull/merge requests.
[0001-Support-url-refspec-format.patch (text/x-patch, attachment)]
[Message part 3 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>:
Bug#839072; Package autopkgtest. (Sat, 01 Oct 2016 08:45:02 GMT) (full text, mbox, link).


Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. Copy sent to Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>. (Sat, 01 Oct 2016 08:45:02 GMT) (full text, mbox, link).


Message #20 received at 839072@bugs.debian.org (full text, mbox, reply):

From: Martin Pitt <mpitt@debian.org>
To: Barry Warsaw <barry@debian.org>
Cc: 839072@bugs.debian.org
Subject: Re: Bug#839072: autopkgtest: Allow for GitHub-style PR urls
Date: Sat, 1 Oct 2016 10:43:39 +0200
[Message part 1 (text/plain, inline)]
Control: tag -1 pending

Hey Barry,

Barry Warsaw [2016-09-28 13:24 -0400]:
> Seems pretty easy!  Attached is the patch.  I tested this with both GitHub and
> GitLab branches and pull/merge requests.  E.g. all the following work nicely:

Awesome! I simplified this a bit, adjusted the two tests which were
affected by the ' ' → '#' change, and mentioned this in the manpage:

  https://anonscm.debian.org/cgit/autopkgtest/autopkgtest.git/commit/?id=c2b8d61c36d8f

It's rolled out to the Ubuntu infra now.

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
[signature.asc (application/pgp-signature, inline)]

Added tag(s) pending. Request was from Martin Pitt <mpitt@debian.org> to 839072-submit@bugs.debian.org. (Sat, 01 Oct 2016 08:45:02 GMT) (full text, mbox, link).


Reply sent to Martin Pitt <mpitt@debian.org>:
You have taken responsibility. (Sat, 01 Oct 2016 10:39:08 GMT) (full text, mbox, link).


Notification sent to Barry Warsaw <barry@debian.org>:
Bug acknowledged by developer. (Sat, 01 Oct 2016 10:39:08 GMT) (full text, mbox, link).


Message #27 received at 839072-close@bugs.debian.org (full text, mbox, reply):

From: Martin Pitt <mpitt@debian.org>
To: 839072-close@bugs.debian.org
Subject: Bug#839072: fixed in autopkgtest 4.1
Date: Sat, 01 Oct 2016 10:34:46 +0000
Source: autopkgtest
Source-Version: 4.1

We believe that the bug you reported is fixed in the latest version of
autopkgtest, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 839072@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Martin Pitt <mpitt@debian.org> (supplier of updated autopkgtest package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 01 Oct 2016 10:55:16 +0200
Source: autopkgtest
Binary: autopkgtest
Architecture: source all
Version: 4.1
Distribution: unstable
Urgency: medium
Maintainer: Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>
Changed-By: Martin Pitt <mpitt@debian.org>
Description:
 autopkgtest - automatic as-installed testing for Debian packages
Closes: 839072
Changes:
 autopkgtest (4.1) unstable; urgency=medium
 .
   [ Martin Pitt ]
   * ssh-setup/nova: Move to python3 and to current -novaclient API
   * schroot: Bump end-session timeout to 5 minutes.
     30 seconds might not be enough when running big schroots on slow disks.
   * ssh-setup/nova: Add --nova-reboot option.
     In some clouds using "nova reboot --poll" waits several minutes until
     after the machine is actually up again. OTOH a simple "reboot" inside some
     other clouds causes network to break after "reboot". As there is no method
     that works everywhere, default to the autopkgtest-virt-ssh behaviour again
     ("reboot" and wait for ssh), and add an option to use "nova reboot"
     instead.
 .
   [ Stéphane Graber ]
   * debian/tests/lxd: Update bridge setup to work with LXD 2.3 and higher.
     This moves from /etc/default/lxd-bridge to lxd-internal configuration.
 .
   [ Barry Warsaw ]
   * Support url#refspec format.
     Fix the bug in the previously supported url#branch syntax, where the code
     expected a space separator but the documentation described the # separator.
     Generalize the approach with an explicit fetch/checkout so that GitHub style PR
     refspecs like "refs/pull/21/head" also work as branch name.
     (Closes: #839072)
Checksums-Sha1:
 a919b22e14c2936be26925f80e5716350d4a6624 1863 autopkgtest_4.1.dsc
 54be903fff9b0511890c5f349ba7441af67f9e3b 168252 autopkgtest_4.1.tar.xz
 ea62f24923886b04a2d7d9c44e6899c682e7f55e 181734 autopkgtest_4.1_all.deb
Checksums-Sha256:
 8d38d7a199686c39067d6a3d206648319f9727bcd5a68e1a42bff63cf0ca6bef 1863 autopkgtest_4.1.dsc
 b401df582122ca4f39a09f302859f6fcb55ce218ed9fc8e82269d6e1f35b2d16 168252 autopkgtest_4.1.tar.xz
 447d6c579b9e327c14e0c6290044c0ab8b7ac5d37c5a4ba3d7b5b34f02e03302 181734 autopkgtest_4.1_all.deb
Files:
 0900f7682452c5947bab8432a5f74291 1863 devel optional autopkgtest_4.1.dsc
 1a29141e8a4d9f5d0e2b50076dda6c0e 168252 devel optional autopkgtest_4.1.tar.xz
 19eaf46d899ed278b4dbbc18b8d88062 181734 devel optional autopkgtest_4.1_all.deb

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJX74Y3AAoJENFO8V2v4RNHlNcP/j7m0nLLTkI0DhluybH1R+Hk
9b+uU9HBjfug0keUyJYqiZJ7ZxRyGTTRnz6XaTb08cLRsaWORkmg7G5TvXH9Pc4i
nzyBs+bCWXuwemilEC4Q8SJO2F77zzBMel5FiWmDgeiNlaneSCJXF9ij71SuoWzm
0w8KwOrltWigmxPaarN6bTC2pPBtqTTS+3MYf/43Qb3sqRDSLTXRBxZRVKD2oW6b
ICBeRKUv7OQ7SzLorCDngmJb5kWdQaNXlpOMhtdzkevhmH7yhYIY3I6GljmOTvTU
n9sTnZc9TTBArVmj8qrL6HN85mk3KzHzPQJIC4/vHN2z+Y+Fs90dtFAtTO/kgB3H
odsmi6WhcaVhQZdFP0SV0lHqOdx3Ze35HUglDLZ0cfy4QC/X1/7uZ5t85aQOgkEl
7oEZ0SEwooWFyBGUaESSTDLBgsDEdP1QSgx3J2f/G+5tZ5/zfMxnK10zRla1x2sh
94L+TLz4QK+FEtTP8zEnuwbjhJQvwA5TWP6vBb1hZ+qY0Y8apSr/KPOu9s35uMhy
BOIBtVtJK6KQSf+8kAxio1JJulFDQeXbYmmJlpCgXFNaIdWtpwgZd519scUOILzI
5q9IdC1IkFUuR7CQzNVXN04iOIe01iYQDK30oBaQ8nmeatsTZLLDWdDyn03tmvZA
7wNS6DKsXVKiiqGixs8g
=CZp0
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 04 Nov 2016 07:30:26 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Jan 6 14:27:30 2018; Machine Name: beach

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.