Merge ~xnox/review-tools:riscv64 into review-tools:master

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 76be8da07321bed7d5a4a71535f3f59ad810e39b
Proposed branch: ~xnox/review-tools:riscv64
Merge into: review-tools:master
Diff against target: 40 lines (+12/-2)
2 files modified
reviewtools/sr_common.py (+3/-2)
reviewtools/tests/test_sr_lint.py (+9/-0)
Reviewer Review Type Date Requested Status
Jamie Strandboge (community) Approve
MyApps reviewers Pending
Review via email: mp+386272@code.launchpad.net

Commit message

Add riscv64 architecture.

To post a comment you must log in.
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

LGTM. Thanks! Note, other changes are needed to make a riscv64 snap of the review-tools, but that is a separate issue.

review: Approve
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

> LGTM. Thanks! Note, other changes are needed to make a riscv64 snap of the
> review-tools, but that is a separate issue.

Do review-tools in production run on the matching architecture for the snap under review?
If so, this complicates bootstrap of the snaps that I did not predict.

At the moment, I am bootstraping by hand: snapd snapcraft core20 lxd. Cause all of them are snaps, and need each other to snap them. Is review-tools needed to be added to this mix?

Or will I be allowed to upload snapd/snapcraft/core20/lxd to the store for the riscv64 architecture without review-tools riscv64 snap?

The set of by hand bootstrapped snaps is the list required for launchpad to be able to build snaps and enable snap builders.

Revision history for this message
Daniel Manrique (roadmr) wrote :

On Tue, Jun 23, 2020 at 4:00 PM Dimitri John Ledkov <email address hidden>
wrote:

> > LGTM. Thanks! Note, other changes are needed to make a riscv64 snap of
> the
> > review-tools, but that is a separate issue.
>
> Do review-tools in production run on the matching architecture for the
> snap under review?
> If so, this complicates bootstrap of the snaps that I did not predict.
>

They do not. Review-tools in production run on amd64 regardless of the
snaps' target architecture.

You will need an arch-specific build if you want to run review-tools to
pre-check your snaps before uploading. I believe snapcraft will try to do
this for you optionally. But AFAIK if you don't have review-tools installed
snapcraft will not barf, it'll just say you could be doing better :)

>
> At the moment, I am bootstraping by hand: snapd snapcraft core20 lxd.
> Cause all of them are snaps, and need each other to snap them. Is
> review-tools needed to be added to this mix?
>
> Or will I be allowed to upload snapd/snapcraft/core20/lxd to the store for
> the riscv64 architecture without review-tools riscv64 snap?
>
> The set of by hand bootstrapped snaps is the list required for launchpad
> to be able to build snaps and enable snap builders.
> --
>
> https://code.launchpad.net/~xnox/review-tools/+git/review-tools/+merge/386272
> Your team MyApps reviewers is requested to review the proposed merge of
> ~xnox/review-tools:riscv64 into review-tools:master.
>

--
- Daniel

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Right, a riscv64 review-tools snap is not required for any store reviews or snapcraft builds. I'm not sure of the UX for snapcraft in suggesting to install the review-tools when it isn't yet available for the arch, but that isn't anything for this PR. I mostly wanted to point out that this only enables store reviews and not snapcraft's running of the tools.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This is merged and ready to pull into prod via the 20200623-2050UTC tag.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/reviewtools/sr_common.py b/reviewtools/sr_common.py
2index f5c0c23..342783b 100644
3--- a/reviewtools/sr_common.py
4+++ b/reviewtools/sr_common.py
5@@ -180,12 +180,13 @@ class SnapReview(Review):
6 valid_system_usernames = ["snap_daemon"]
7
8 valid_compiled_architectures = [
9- "armhf",
10- "i386",
11 "amd64",
12 "arm64",
13+ "armhf",
14+ "i386",
15 "powerpc",
16 "ppc64el",
17+ "riscv64",
18 "s390x",
19 ]
20
21diff --git a/reviewtools/tests/test_sr_lint.py b/reviewtools/tests/test_sr_lint.py
22index b4559f0..c86e44e 100644
23--- a/reviewtools/tests/test_sr_lint.py
24+++ b/reviewtools/tests/test_sr_lint.py
25@@ -804,6 +804,15 @@ class TestSnapReviewLint(sr_tests.TestSnapReview):
26 expected_counts = {"info": 1, "warn": 0, "error": 0}
27 self.check_results(r, expected_counts)
28
29+ def test_check_architectures_single_riscv64(self):
30+ """Test check_architectures() (single arch, riscv64)"""
31+ self.set_test_snap_yaml("architectures", ["riscv64"])
32+ c = SnapReviewLint(self.test_name)
33+ c.check_architectures()
34+ r = c.review_report
35+ expected_counts = {"info": 1, "warn": 0, "error": 0}
36+ self.check_results(r, expected_counts)
37+
38 def test_check_architectures_single_s390x(self):
39 """Test check_architectures() (single arch, s390x)"""
40 self.set_test_snap_yaml("architectures", ["s390x"])

Subscribers

People subscribed via source and target branches