Merge ~aieri/juju-lint:bug/2032714 into juju-lint:master

Proposed by Andrea Ieri
Status: Merged
Approved by: Eric Chen
Approved revision: 1e9ee9ea64b6abfa35bd15b201532812edc9f9d8
Merged at revision: cf207c1690f4b9266a981641bf75f80221500f30
Proposed branch: ~aieri/juju-lint:bug/2032714
Merge into: juju-lint:master
Diff against target: 107 lines (+11/-10)
5 files modified
contrib/canonical-rules.yaml (+3/-2)
contrib/includes/base.yaml (+1/-1)
contrib/includes/operations.yaml (+2/-1)
jujulint/config.py (+1/-1)
tests/resources/fcb-yoga-focal-bundle.yaml (+4/-5)
Reviewer Review Type Date Requested Status
Gabriel Cocenza Approve
🤖 prod-jenkaas-bootstack continuous-integration Approve
Ramesh Sattaru (community) Approve
Nobuto Murata Pending
BootStack Reviewers Pending
Review via email: mp+449760@code.launchpad.net

Commit message

Replace canonical-livepatch with ubuntu-advantage in all rulesets

canonical-livepatch is now deprecated, and should be replaced with
ubuntu-advantage (soon ubuntu-pro).

Closes-bug: #2032714

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Ramesh Sattaru (rameshcan) :
review: Approve
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrea Ieri (aieri) wrote :

As mentioned elsewhere by Gabriel, this change would produce errors for existing environments that are running livepatch and not ubuntu-advantage. Flipping back to in progress while we think about how best to handle the transition. Unfortunately we don't have a 'deprecated' lint operator.

Revision history for this message
Andrea Ieri (aieri) wrote :

Re-added livepatch as optional subordinate

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
Nobuto Murata (nobuto) wrote :

Can it be a warning instead of an error?

> The absence of the ubuntu-advantage will however trigger a linting
> error, regardless of whether livepatch esists in the model or not.

Revision history for this message
Gabriel Cocenza (gabrielcocenza) wrote :

It's possible to hard code a check in the function `results` on lint.py module and have a warning message if ubuntu-advantage is missing. It's not a beautiful solution, but it would be quick.

I consider this as a non-blocker, so I'll give a +1.

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision cf207c1690f4b9266a981641bf75f80221500f30

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/contrib/canonical-rules.yaml b/contrib/canonical-rules.yaml
2index 04c007d..e32abcd 100644
3--- a/contrib/canonical-rules.yaml
4+++ b/contrib/canonical-rules.yaml
5@@ -83,7 +83,7 @@ subordinates:
6 where: all except landscape-server
7 filebeat:
8 where: all except graylog
9- canonical-livepatch:
10+ ubuntu-advantage:
11 where: host only
12 nrpe:
13 where: container aware
14@@ -146,7 +146,7 @@ operations mandatory dependencies: &operations-mandatory-deps
15 - postgresql
16
17 operations subordinates: &operations-mandatory-subs
18- - canonical-livepatch
19+ - ubuntu-advantage
20 - filebeat
21 - ksplice
22 - landscape-client
23@@ -166,6 +166,7 @@ operations optional subordinates: &operations-optional-subs
24 - advanced-routing
25 - rsyslog-forwarder-ha
26 - local-users
27+ - canonical-livepatch
28
29 operations charms: &operations-charms
30 - *operations-kubernetes-mandatory-charms
31diff --git a/contrib/includes/base.yaml b/contrib/includes/base.yaml
32index ddf089d..566916c 100644
33--- a/contrib/includes/base.yaml
34+++ b/contrib/includes/base.yaml
35@@ -26,7 +26,7 @@ subordinates:
36 where: all except landscape-server
37 filebeat:
38 where: all except graylog
39- canonical-livepatch:
40+ ubuntu-advantage:
41 where: host only
42 nrpe:
43 where: container aware
44diff --git a/contrib/includes/operations.yaml b/contrib/includes/operations.yaml
45index 736ce11..f51d02f 100644
46--- a/contrib/includes/operations.yaml
47+++ b/contrib/includes/operations.yaml
48@@ -25,7 +25,7 @@ operations mandatory dependencies: &operations-mandatory-deps
49 - postgresql
50
51 operations subordinates: &operations-mandatory-subs
52- - canonical-livepatch
53+ - ubuntu-advantage
54 - filebeat
55 - ksplice
56 - landscape-client
57@@ -45,6 +45,7 @@ operations optional subordinates: &operations-optional-subs
58 - advanced-routing
59 - rsyslog-forwarder-ha
60 - local-users
61+ - canonical-livepatch
62
63 operations kubernetes mandatory: &operations-kubernetes-mandatory-charms
64 - kubernetes-service-checks
65diff --git a/jujulint/config.py b/jujulint/config.py
66index 16bb33d..402484b 100644
67--- a/jujulint/config.py
68+++ b/jujulint/config.py
69@@ -96,7 +96,7 @@ class Config(Configuration):
70 "-o",
71 "--override-subordinate",
72 dest="override.subordinate",
73- help="override lint-rules.yaml, e.g. -o canonical-livepatch:all",
74+ help="override lint-rules.yaml, e.g. -o ubuntu-advantage:all",
75 )
76 self.parser.add_argument(
77 "--logfile",
78diff --git a/tests/resources/fcb-yoga-focal-bundle.yaml b/tests/resources/fcb-yoga-focal-bundle.yaml
79index de6364c..9ed2626 100644
80--- a/tests/resources/fcb-yoga-focal-bundle.yaml
81+++ b/tests/resources/fcb-yoga-focal-bundle.yaml
82@@ -74,11 +74,11 @@ applications:
83 ? ''
84 : oam-space
85 charm: bcache-tuning
86- canonical-livepatch:
87+ ubuntu-advantage:
88 bindings:
89 ? ''
90 : oam-space
91- charm: canonical-livepatch
92+ charm: ubuntu-advantage
93 options:
94 livepatch_key: FCE_TEMPLATE
95 ceilometer:
96@@ -1106,9 +1106,8 @@ relations:
97 - ['barbican:juju-info', 'public-policy-routing:juju-info']
98 - ['barbican:juju-info', 'telegraf:juju-info']
99 - ['bcache-tuning:juju-info', 'ceph-osd:juju-info']
100-- ['canonical-livepatch:juju-info', 'ceph-osd:juju-info']
101-- ['canonical-livepatch:juju-info', 'vault:juju-info']
102-- ['canonical-livepatch:nrpe-external-master', 'nrpe:nrpe-external-master']
103+- ['ubuntu-advantage:juju-info', 'ceph-osd:juju-info']
104+- ['ubuntu-advantage:juju-info', 'vault:juju-info']
105 - ['ceilometer-agent:amqp', 'rabbitmq-server:amqp']
106 - ['ceilometer-agent:ceilometer-service', 'ceilometer:ceilometer-service']
107 - ['ceilometer-agent:nova-ceilometer', 'nova-compute:nova-ceilometer']

Subscribers

People subscribed via source and target branches