Merge lp:~orndorffgrant/ubuntu-motd/aptnews-pkg-selectors into lp:ubuntu-motd

Proposed by Grant Orndorff
Status: Needs review
Proposed branch: lp:~orndorffgrant/ubuntu-motd/aptnews-pkg-selectors
Merge into: lp:ubuntu-motd
Diff against target: 41 lines (+31/-0)
1 file modified
aptnews-schema.json (+31/-0)
To merge this branch: bzr merge lp:~orndorffgrant/ubuntu-motd/aptnews-pkg-selectors
Reviewer Review Type Date Requested Status
Christian Ehrhardt  Approve
Review via email: mp+465173@code.launchpad.net

Description of the change

This adds new selectors to the schema to help only show apt news when it is pertinent to users.

These selectors were specced in (canonical internal link) https://docs.google.com/document/d/10-UdSnmJUBTZ7pMcJde53KRrMn9qCmbbTW-Hap92P_8/edit

The client side implementation of these selectors is being added to ubuntu-pro-client version 32, scheduled to be released May 21, 2024. As such, this proposal should not be merged before a successful release of version 32 - tracking in https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/2060732

The presence of these selectors will not cause errors on older versions of ubuntu-pro-client; they will be ignored.

To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I checked this and it does indeed match the specification.

I'm glad to heard that (as planned) it does not cause issues on older versions of the client.

You asked for only landing this after version 32 is released.
But I assume it would also not cause errors in the new client - right?
Neither if we land this earlier nor if we land it later?

AFAIU (please correct me if I'm wrong) then the landing of this only enables allowing these qualifiers to be used in the news definition.

review: Approve
Revision history for this message
Grant Orndorff (orndorffgrant) wrote :

You are right that the landing of this only enables the use of these selectors and that won't harm any version of pro-client.

I only suggest waiting because the presence of these selectors in the schema implies that they will work, but they won't actually work until v32 of pro-client is released.

Revision history for this message
Steve Langasek (vorlon) wrote :

Christian, as you have marked this approved and Grant has answered your question, are you planning to land the branch?

Revision history for this message
Grant Orndorff (orndorffgrant) wrote :

v32 of pro-client was released today, so I think this MP is ready to land.

Unmerged revisions

99. By Grant Orndorff

add new selectors to apt-news schema

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'aptnews-schema.json'
2--- aptnews-schema.json 2022-12-13 19:59:54 +0000
3+++ aptnews-schema.json 2024-04-29 18:46:04 +0000
4@@ -32,6 +32,37 @@
5 },
6 "pro": {
7 "type": "boolean"
8+ },
9+ "architectures": {
10+ "type": "array",
11+ "items": {
12+ "type": "string"
13+ }
14+ },
15+ "packages": {
16+ "type": "array",
17+ "items": {
18+ "type": "array",
19+ "minItems": 3,
20+ "maxItems": 3,
21+ "prefixItems": [
22+ {
23+ "type": "string"
24+ },
25+ {
26+ "enum": [
27+ "<",
28+ "<=",
29+ "==",
30+ ">=",
31+ ">"
32+ ]
33+ },
34+ {
35+ "type": "string"
36+ }
37+ ]
38+ }
39 }
40 },
41 "additionalProperties": false

Subscribers

People subscribed via source and target branches