Merge ~nacc/git-ubuntu:lint-deconstruct-tag-fix-lp1775041 into git-ubuntu:master

Proposed by Nish Aravamudan
Status: Needs review
Proposed branch: ~nacc/git-ubuntu:lint-deconstruct-tag-fix-lp1775041
Merge into: git-ubuntu:master
Diff against target: 48 lines (+18/-19)
1 file modified
gitubuntu/lint.py (+18/-19)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Needs Fixing
git-ubuntu developers Pending
Review via email: mp+347459@code.launchpad.net

Description of the change

Make jenkins happy

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

FAILED: Continuous integration, rev:b96567d07e0f22dac0c1f3506f1b7234384bc1ef
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/11/
Executed test runs:
    SUCCESS: VM Setup
    SUCCESS: Build
    FAILED: Unit Tests

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

FAILED: Continuous integration, rev:b96567d07e0f22dac0c1f3506f1b7234384bc1ef
https://jenkins.ubuntu.com/server/job/git-ubuntu-ci/12/
Executed test runs:
    SUCCESS: VM Setup
    FAILED: Build

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

review: Needs Fixing (continuous-integration)

Unmerged commits

b96567d... by Nish Aravamudan

lint: separate check for reconstruct and deconstruct tag

I'm not sure why I wrote the code like this originally, but the intent
was to run every check (even if it doesn't necessarily make any sense to
have a deconstruct tag if there is no a reconstruct tag, in this case).
We will emit all failures as we go through the checks. Currently, we
only check deconstruct if reconstruct exists -- but then we use the
deconstruct tag variable to check against the logical tag. This will
obviously error if the reconstruct tag didn't exist originally.

Also fix a bit of mis-indentation in the code.

LP: #1775041

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/gitubuntu/lint.py b/gitubuntu/lint.py
2index d41045c..b58e46d 100644
3--- a/gitubuntu/lint.py
4+++ b/gitubuntu/lint.py
5@@ -541,25 +541,24 @@ def do_merge_lint(repo, namespace, commitish_string, old, new_base):
6 # 2) does reconstruct tag exist?
7 # 2a) does import tag treeish match reconstruct tag treeish?
8 reconstruct_tag = "%sreconstruct/%s" % (namespace, old_ubuntu_tag_version)
9- if _check_commitish_exists_and_same(
10- repo,
11- import_tag,
12- reconstruct_tag,
13- import_tag,
14- ):
15- # 2b) does deconstruct tag exist?
16- # 2b1) does import tag treeish match deconstruct tag treeish?
17- deconstruct_tag = "%sdeconstruct/%s" % (
18- namespace, old_ubuntu_tag_version
19- )
20- ret = _check_commitish_exists_and_same(
21- repo,
22- import_tag,
23- deconstruct_tag,
24- import_tag,
25- ) and ret
26- else:
27- ret = False
28+ ret = _check_commitish_exists_and_same(
29+ repo,
30+ import_tag,
31+ reconstruct_tag,
32+ import_tag,
33+ ) and ret
34+
35+ # 2b) does deconstruct tag exist?
36+ # 2b1) does import tag treeish match deconstruct tag treeish?
37+ deconstruct_tag = "%sdeconstruct/%s" % (
38+ namespace, old_ubuntu_tag_version
39+ )
40+ ret = _check_commitish_exists_and_same(
41+ repo,
42+ import_tag,
43+ deconstruct_tag,
44+ import_tag,
45+ ) and ret
46
47 # 3) does logical tag exist?
48 logical_tag = "%slogical/%s" % (

Subscribers

People subscribed via source and target branches