Merge ~xnox/autopkgtest-cloud:all-proposed into autopkgtest-cloud:master

Proposed by Dimitri John Ledkov
Status: Needs review
Proposed branch: ~xnox/autopkgtest-cloud:all-proposed
Merge into: autopkgtest-cloud:master
Diff against target: 22 lines (+5/-4)
1 file modified
charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker (+5/-4)
Reviewer Review Type Date Requested Status
Iain Lane Needs Fixing
Julian Andres Klode Pending
Ubuntu Release Team Pending
Review via email: mp+403628@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Iain Lane (laney) wrote :

I like the idea. I like it a LOT. But it feels odd to be stuffing this into the custom environment. Any reason it couldn't be another entry in the dict instead? `'all_proposed': 'all_proposed' in params` or something.

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

Sure it can be a new key.... I don't even understand why the current one is an array of a single item in a dict key..... It would make sense to have each trigger as an array item, or even a dict of triggers.

And yeah all-proposed can be a new key.....

i almost feel like serializing all the params and dumping them as json as is....

Revision history for this message
Iain Lane (laney) wrote :

could do, the current thing is basically API though so let's leave that one as is

~xnox/autopkgtest-cloud:all-proposed updated
1667a59... by Dimitri John Ledkov

Report all params back

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

How about this? It keeps custom_env key as is, and adds a new one called params that dumps all the params used for the test.

Revision history for this message
Andy Whitcroft (apw) wrote :

I am not sure you are modifying the right testinfo generator here. This code can only ever result in testinfo.json with custom environment and params in it. But the examples as generated by executed jobs also set virt_server, kernel_version, nproc, and cpu_flags.

Revision history for this message
Andy Whitcroft (apw) wrote :

> I am not sure you are modifying the right testinfo generator here. This code
> can only ever result in testinfo.json with custom environment and params in
> it. But the examples as generated by executed jobs also set virt_server,
> kernel_version, nproc, and cpu_flags.

It feels like the testinfo.json we have in the results are actually being made by create_testinfo in autopkgtest:runner/autopkgtest.

Revision history for this message
Andy Whitcroft (apw) wrote :

Also can params contain anything embargoed? If so dropping it into a public file en-toto may not be viable.

Revision history for this message
Iain Lane (laney) wrote :

ah yes, very sorry, this is only for the cases where we fake the file up if autopkgtest dies badly. still needed here, but it's not enough. I think a general upstream solution would be to add the values of --apt-pocket (and the Debian equivalents, forgot what they are called OTTOMH). And then this fakery will need to be compatible with that of course.

as for privacy, if the test run is secret then we wouldn't be wanting to reveal the log or any of the artifacts, and łukasz's in progress work enforces that at the swift ACL level

thanks andy!

review: Needs Fixing

Unmerged commits

1667a59... by Dimitri John Ledkov

Report all params back

2ef4180... by Dimitri John Ledkov

worker: in testinfo.json record if the run was with all-proposed.

Kernel's team adt-matrix wants to know if extra packages got
installed, and if they came from -proposed or not. Which can only be
detected if we know if the run was done with all-proposed, or not.

Signed-off-by: Dimitri John Ledkov <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
2index 1fc4595..0d6c8dc 100755
3--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
4+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
5@@ -519,12 +519,13 @@ def request(msg):
6
7 triggers = None
8 # a json file containing the env
9+ custom_env = []
10 if 'triggers' in params:
11 triggers = ' '.join(params['triggers'])
12- with open(os.path.join(out_dir, 'testinfo.json'), 'w') as testinfo:
13- d = {'custom_environment':
14- ['ADT_TEST_TRIGGERS=%s' % triggers]}
15- json.dump(d, testinfo, indent=True)
16+ custom_env.append('ADT_TEST_TRIGGERS=%s' % triggers)
17+ d = {'custom_environment': custom_env, 'params': params}
18+ with open(os.path.join(out_dir, 'testinfo.json'), 'w') as testinfo:
19+ json.dump(d, testinfo, indent=True)
20
21 # and the testpackage version (pkgname blacklisted)
22 # XXX: replace "blacklisted" here, but needs changes in

Subscribers

People subscribed via source and target branches