Merge ~racb/git-ubuntu:lp1699541-queue-local-import into git-ubuntu:master

Proposed by Robie Basak
Status: Merged
Approved by: Nish Aravamudan
Approved revision: 3fb6f7fcff6baf30c9e829108124f02264558bc5
Merged at revision: cb81db1e027e8defd944fefce40d7bf402b337a2
Proposed branch: ~racb/git-ubuntu:lp1699541-queue-local-import
Merge into: git-ubuntu:master
Diff against target: 63 lines (+23/-7)
1 file modified
gitubuntu/queue.py (+23/-7)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Robie Basak Approve
Review via email: mp+332635@code.launchpad.net

This proposal supersedes a proposal from 2017-09-18.

Description of the change

This needs Robie's review to be landable, as he's the only user of `git ubuntu queue`

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:81464a0f73de66d8f96558cfec2173a18ca84b2e
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/101/
Executed test runs:
    SUCCESS: Checkout
    FAILED: Style Check

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/101/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:72ca788b4726257f90838b2e879a7b93570b3698
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/105/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Style Check
    SUCCESS: Unit Tests
    FAILED: Integration Tests

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/105/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:39767d41bac6130a6f226f1f89e6f3440ef63c7e
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/107/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Style Check
    SUCCESS: Unit Tests
    FAILED: Integration Tests

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/107/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2d80e7a56e46dbc666f4a69921e3da059f1a73d1
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/129/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Style Check
    SUCCESS: Unit Tests
    FAILED: Integration Tests

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/129/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:2d80e7a56e46dbc666f4a69921e3da059f1a73d1
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/134/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Style Check
    SUCCESS: Unit Tests
    SUCCESS: Integration Tests
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/134/rebuild

review: Approve (continuous-integration)
Revision history for this message
Robie Basak (racb) wrote :

Looks good, thanks! I had to add this extra commit to make it work. I'm not sure if resubmitting the MP is a good thing to do, but I thought I'd try it as the CI bot should be able to catch up without you having to make one additional context switch.

review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:3fb6f7fcff6baf30c9e829108124f02264558bc5
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/180/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Style Check
    SUCCESS: Unit Tests
    SUCCESS: Integration Tests
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/180/rebuild

review: Approve (continuous-integration)
Revision history for this message
Nish Aravamudan (nacc) wrote :

Oh and as a follow-up to your comment, I was 100% pro you resubmitting with the fixlet, it made it easier for me to see just your change.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/gitubuntu/queue.py b/gitubuntu/queue.py
2index 1ff4d12..8c01b1f 100644
3--- a/gitubuntu/queue.py
4+++ b/gitubuntu/queue.py
5@@ -210,6 +210,20 @@ def _commit_upload(repo, upload, parent_commit):
6
7 return commit_hash
8
9+def get_devel_head_ref(repo, series):
10+ for ref in [
11+ 'refs/heads/importer/ubuntu/%s-devel' % series,
12+ 'refs/remotes/pkg/ubuntu/%s-devel' % series,
13+ ]:
14+ try:
15+ return repo.raw_repo.lookup_reference(ref)
16+ except KeyError:
17+ pass
18+ raise KeyError(
19+ "Unable to find %s-devel branch in either local or remote "
20+ "importer branches."
21+ )
22+
23 def sync(repo, lp, retries, retry_backoffs, source, trim, series_list, parent, statuses):
24 if not series_list:
25 series_list = [
26@@ -224,20 +238,22 @@ def sync(repo, lp, retries, retry_backoffs, source, trim, series_list, parent, s
27 logging.debug('Considering %s', series)
28 series_parent = parent
29 try:
30- devel_head_ref = repo.raw_repo.lookup_reference(
31- 'refs/remotes/pkg/ubuntu/%s-devel' % series
32- )
33- except KeyError:
34+ devel_head_ref = get_devel_head_ref(repo, series)
35+ except KeyError as e:
36 if source:
37 devel_srcpkg_name = source
38 else:
39 logging.warn(
40- 'Series %s has no devel head pointer and no source name specified; skipping', series
41+ "Series %s has no devel head pointer and no source "
42+ "name specified; skipping",
43+ series,
44 )
45 continue
46 if series_parent is True:
47 logging.warn(
48- "Series %s has no devel head pointer and no parent specified; skipping", series
49+ "Series %s has no devel head pointer and no parent "
50+ "specified; skipping",
51+ series,
52 )
53 continue
54 else:
55@@ -247,7 +263,7 @@ def sync(repo, lp, retries, retry_backoffs, source, trim, series_list, parent, s
56 devel_srcpkg_name = source
57 else:
58 devel_srcpkg_name = repo.get_changelog_srcpkg_from_treeish(
59- 'pkg/ubuntu/%s-devel' % series
60+ str(devel_head_ref.peel(pygit2.Tree).id)
61 )
62 assert series_parent is not True
63 lp_queue_items = _fetch_lp_queue_items(

Subscribers

People subscribed via source and target branches