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

Proposed by Dimitri John Ledkov
Status: Rejected
Rejected by: Skia
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
Revision history for this message
Skia (hyask) wrote :

This patch still applies, however, the comments seems still relevant to me. Is that feature still needed? If so, how do we progress forward? I can surely be of help writing code if need be, but as I understand, there are some design decisions to be taken, roughly:
* what parameters do we dump? All of them, only all-proposed, anything else? This is closely related to the data we have access to from `autopkgtest:runner/autopkgtest`, as we should probably aim at generating the same file in all situations.
* what about that privacy issue? I think there are some mechanisms for embargoed builds now, am I right?

Revision history for this message
Skia (hyask) wrote :
Revision history for this message
Skia (hyask) wrote :

https://code.launchpad.net/~hyask/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/460240/comments/1235062

Here is an example output of what is now deployed in production. Be aware that this only affects new tests, and won't be available for old ones. If you don't have the `all-proposed` key in `testinfo.json`, then you'll have to parse the logs to get the info. But if you have it, then the info is available right away for you to use!

I'll close this MP as it's now been superseeded by a more generic handling of this. Thanks for the proposal anyway :-)

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
diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
index 1fc4595..0d6c8dc 100755
--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
@@ -519,12 +519,13 @@ def request(msg):
519519
520 triggers = None520 triggers = None
521 # a json file containing the env521 # a json file containing the env
522 custom_env = []
522 if 'triggers' in params:523 if 'triggers' in params:
523 triggers = ' '.join(params['triggers'])524 triggers = ' '.join(params['triggers'])
524 with open(os.path.join(out_dir, 'testinfo.json'), 'w') as testinfo:525 custom_env.append('ADT_TEST_TRIGGERS=%s' % triggers)
525 d = {'custom_environment':526 d = {'custom_environment': custom_env, 'params': params}
526 ['ADT_TEST_TRIGGERS=%s' % triggers]}527 with open(os.path.join(out_dir, 'testinfo.json'), 'w') as testinfo:
527 json.dump(d, testinfo, indent=True)528 json.dump(d, testinfo, indent=True)
528529
529 # and the testpackage version (pkgname blacklisted)530 # and the testpackage version (pkgname blacklisted)
530 # XXX: replace "blacklisted" here, but needs changes in531 # XXX: replace "blacklisted" here, but needs changes in

Subscribers

People subscribed via source and target branches