Merge ~brad-figg/+git/kteam-tools:cranky-config-variable into ~canonical-kernel/+git/kteam-tools:master

Proposed by Brad Figg
Status: Needs review
Proposed branch: ~brad-figg/+git/kteam-tools:cranky-config-variable
Merge into: ~canonical-kernel/+git/kteam-tools:master
Diff against target: 81 lines (+14/-12)
3 files modified
cranky/crl/config.py (+9/-6)
ktl/tracking_bug2.py (+1/-2)
stable/create-kernel-tasks (+4/-4)
Reviewer Review Type Date Requested Status
Cory Todd (community) Needs Fixing
Brad Figg Pending
Review via email: mp+433810@code.launchpad.net

This proposal supersedes a proposal from 2022-11-24.

Description of the change

The commit message says it all.

To post a comment you must log in.
Revision history for this message
Cory Todd (corytodd) wrote :

Looks like this absorbed #433807 regarding the SRU board. Comments left inline for those proposed changes.

Other commentary inline.

review: Needs Fixing
Revision history for this message
Brad Figg (brad-figg) wrote :

I'll resubmit this MP. Yes, it looks like I combined it with another MP.

Revision history for this message
Cory Todd (corytodd) wrote :

Okay, I'll check back on the resubmit.

Side note on creating Launchpad merge proposals, I think this (and the other two) have you listed as a reviewer for some reason. This means that once we apply and push these patches, this UI won't show a "merged" status. You will need to either leave a comment with "Approve" selected from the review dropdown box or you could remove yourself from the reviewers list. Either option should work.

Revision history for this message
Brad Figg (brad-figg) wrote :

Another option would be to fix launchpad so that it helped with merge proposals instead of making the process cumbersome. The fact that I have to remove myself from review is silly, it shouldn’t put me there by default. It should also default to the repo from which the branch was created rather than make me add that information. It should also start defaulting to showing git repositories when I go to the “code” section of a project.

But, it is what it is and I’ll try to remember to remove myself as a reviewer.

Brad

From: <email address hidden> <email address hidden> on behalf of Cory Todd <email address hidden>
Date: Wednesday, December 14, 2022 at 6:47 AM
To: Brad Figg <email address hidden>
Subject: Re: [Merge] ~brad-figg/+git/kteam-tools:cranky-config-variable into ~canonical-kernel/+git/kteam-tools:master
External email: Use caution opening links or attachments

Okay, I'll check back on the resubmit.

Side note on creating Launchpad merge proposals, I think this (and the other two) have you listed as a reviewer for some reason. This means that once we apply and push these patches, this UI won't show a "merged" status. You will need to either leave a comment with "Approve" selected from the review dropdown box or you could remove yourself from the reviewers list. Either option should work.
--
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcode.launchpad.net%2F~brad-figg%2F%2Bgit%2Fkteam-tools%2F%2Bmerge%2F433810&amp;data=05%7C01%7Cbfigg%40nvidia.com%7C2d0035cccef5497ab36b08dadde22c2a%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638066260725442087%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=WE9UAAHLRrSavH6gvJjXJ9CR2EeDzIod1d1se10E7mg%3D&amp;reserved=0
You are the owner of ~brad-figg/+git/kteam-tools:cranky-config-variable.

Launchpad-Message-Rationale: Owner
Launchpad-Message-For: brad-figg
Launchpad-Notification-Type: code-review
Launchpad-Branch: ~brad-figg/+git/kteam-tools:cranky-config-variable

Revision history for this message
Jose Ogando Justo (joseogando) :

Unmerged commits

c7fc0b8... by Brad Figg

crl/config.py: allow an environment variable to specify the location of the cranky config file

Signed-off-by: Brad Figg <email address hidden>

3dec060... by Brad Figg

ktl/tracking_bug2.py: change warning to a more concise, but better to understand message

Signed-off-by: Brad Figg <email address hidden>

8d806fa... by Brad Figg

create-kernel-tasks: Made a couple of the error messages a little easier to understand.

Signed-off-by: Brad Figg <email address hidden>

e2af0b2... by Brad Figg

create-kernel-tasks: document what the variables 'cn' and 'sn' stand for

Signed-off-by: Brad Figg <email address hidden>

bc796a3... by Brad Figg

Create-kernel-tasks: if --nocards is specified then don't import the
SRUBoard class.

The SRUBoard class imports the jira module and not all users of
create-kernel-tasks has that module. If no jira cards are to be created
there is no need to import SRUBoard.

Signed-off-by: Brad Figg <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/cranky/crl/config.py b/cranky/crl/config.py
index c927f31..caea37b 100755
--- a/cranky/crl/config.py
+++ b/cranky/crl/config.py
@@ -12,12 +12,15 @@ class Config:
12 if filename is not None and data is not None:12 if filename is not None and data is not None:
13 raise ValueError("supply only one of filename and data")13 raise ValueError("supply only one of filename and data")
1414
15 if data is None and filename is None:15 if 'CRANKY_CONFIG_FILE' in os.environ:
16 for path in (os.path.join(os.environ['HOME'], '.cranky.yaml'),16 filename = os.environ['CRANKY_CONFIG_FILE']
17 os.path.join(os.environ['HOME'], '.cranky')):17 else:
18 if os.path.exists(path):18 if data is None and filename is None:
19 filename = path19 for path in (os.path.join(os.environ['HOME'], '.cranky.yaml'),
20 break20 os.path.join(os.environ['HOME'], '.cranky')):
21 if os.path.exists(path):
22 filename = path
23 break
2124
22 if data is None and filename is not None and os.path.exists(filename):25 if data is None and filename is not None and os.path.exists(filename):
23 with open(filename) as yfd:26 with open(filename) as yfd:
diff --git a/ktl/tracking_bug2.py b/ktl/tracking_bug2.py
index 3dd00d2..9b92115 100755
--- a/ktl/tracking_bug2.py
+++ b/ktl/tracking_bug2.py
@@ -192,8 +192,7 @@ class TrackingBug(object):
192 # the bug linking completely. So this would be "normal".192 # the bug linking completely. So this would be "normal".
193 s._master_bug_id = p_master193 s._master_bug_id = p_master
194 elif s._master_bug_id != p_master:194 elif s._master_bug_id != p_master:
195 cwarn('Mismatch between tag and properties: master bug')195 cwarn('Mismatch : master bug - tag: %s; property: %s (lp: #%s)' % (s._master_bug_id, p_master, bug.id))
196 cwarn('tag: %s / property: %s' % (s._master_bug_id, p_master))
197 s._master_bug_id = p_master196 s._master_bug_id = p_master
198 #prefix = 'kernel-sru-%s-of-' % s.__type197 #prefix = 'kernel-sru-%s-of-' % s.__type
199 #s.__update_pfx_tag(prefix, '%s%s' % (prefix, p_master))198 #s.__update_pfx_tag(prefix, '%s%s' % (prefix, p_master))
diff --git a/stable/create-kernel-tasks b/stable/create-kernel-tasks
index c62b6db..4085a96 100755
--- a/stable/create-kernel-tasks
+++ b/stable/create-kernel-tasks
@@ -13,7 +13,6 @@ sys.path.append(os.path.realpath(
13from ktl.log import Clog, cerror, cwarn, cinfo, cdebug13from ktl.log import Clog, cerror, cwarn, cinfo, cdebug
14from ktl.kernel_series import KernelSeries14from ktl.kernel_series import KernelSeries
15from ktl.tracking_bug2 import TrackingBugs, TrackingBugError15from ktl.tracking_bug2 import TrackingBugs, TrackingBugError
16from ktl.sruboard import SRUBoard, SRUBoardError
1716
18class Task():17class Task():
19 def __init__(self, taskset, ks_source, ks_snap=None):18 def __init__(self, taskset, ks_source, ks_snap=None):
@@ -436,6 +435,7 @@ class TaskSet():
436 def CreateCards(self, boardname, dryrun=False, cve=False):435 def CreateCards(self, boardname, dryrun=False, cve=False):
437 if dryrun is False and self.board is None:436 if dryrun is False and self.board is None:
438 try:437 try:
438 from ktl.sruboard import SRUBoard, SRUBoardError
439 self.board = SRUBoard(self.cycletag, cve=cve)439 self.board = SRUBoard(self.cycletag, cve=cve)
440 except SRUBoardError as e:440 except SRUBoardError as e:
441 cerror(e)441 cerror(e)
@@ -540,17 +540,17 @@ Examples:
540 devel_set = False540 devel_set = False
541 for handle in args.handle:541 for handle in args.handle:
542 try:542 try:
543 (cn, sn) = handle.split(':')543 (cn, sn) = handle.split(':') # cn = "series codename (focal, jammy, etc.)"; sn = "source name (linux, linux-realtime, linux-aws, etc)"
544 except:544 except:
545 cerror('Failed to parse handle({})'.format(handle))545 cerror('Failed to parse handle({})'.format(handle))
546 sys.exit(2)546 sys.exit(2)
547 ks_series = ks.lookup_series(codename=cn)547 ks_series = ks.lookup_series(codename=cn)
548 if ks_series is None:548 if ks_series is None:
549 cerror('{} seems to be no valid series codename'.format(cn))549 cerror(f'"{cn}" is not a valid series codename. It was not found in kernel-series.info.')
550 sys.exit(3)550 sys.exit(3)
551 ks_source = ks_series.lookup_source(sn)551 ks_source = ks_series.lookup_source(sn)
552 if ks_source is None:552 if ks_source is None:
553 cerror('{} is no valid source in {}'.format(sn, cn))553 cerror(f'"{sn} is not a valid source within the "{cn}" series.')
554 sys.exit(3)554 sys.exit(3)
555 # The first handle decides whether we treat this as devel cycle or stable.555 # The first handle decides whether we treat this as devel cycle or stable.
556 # Instead of trying to figure out whether something originates in a development556 # Instead of trying to figure out whether something originates in a development

Subscribers

People subscribed via source and target branches