Merge ~andersson123/autopkgtest-cloud:seed_new_release_neutral_results into autopkgtest-cloud:master

Proposed by Tim Andersson
Status: Merged
Merged at revision: 31ecf38c1723133208737a6a463e8873be34d0c0
Proposed branch: ~andersson123/autopkgtest-cloud:seed_new_release_neutral_results
Merge into: autopkgtest-cloud:master
Diff against target: 15 lines (+2/-2)
1 file modified
charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/seed-new-release (+2/-2)
Reviewer Review Type Date Requested Status
Brian Murray Approve
Review via email: mp+446929@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tim Andersson (andersson123) wrote :

Maybe, actually, it's better to keep the exit codes and add 8 to them, which is the neutral exit code right? Do we want to filter on exit codes at all? What do you think?

Revision history for this message
Brian Murray (brian-murray) wrote :

The point of seed-new-release is to copy successful test results for the new release and by removing the exit code checking we'd then end up copying failures forward to the new release. So yes it is better to keep the exit codes and yes 8 is a neutral result.

Additionally, the change you suggested would make the two database queries identical. Which incidentally makes me wonder if the queries can be written in such a way that they don't return duplicate results and if that would speed up the seed-new-release process.

review: Needs Fixing
Revision history for this message
Tim Andersson (andersson123) wrote :

I've amended the exitcode, I'm not sure we can speed up the script much. The swift connection checks for duplicates anyway and doesn't copy if one exists I believe, so an external check I don't think would add much. But there could be a way to change the SQL query which I think is what you were suggesting, but I'm not well versed enough in SQL to say.

Revision history for this message
Brian Murray (brian-murray) :
review: Approve
Revision history for this message
Brian Murray (brian-murray) wrote :

I also updated the comments in the code to explain that neutral results are also copied.

Revision history for this message
Tim Andersson (andersson123) wrote :

Ah, mb, I missed that

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/tools/seed-new-release b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/seed-new-release
2index 64819ae..77176c7 100755
3--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/seed-new-release
4+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/seed-new-release
5@@ -163,8 +163,8 @@ for package, arch, run_id in db_con.execute(
6 "SELECT package, arch, MAX(run_id) "
7 "FROM test, result "
8 "WHERE test.id = result.test_id AND release = '%s' "
9- " AND (exitcode = 0 OR exitcode = 2 "
10- " OR triggers = 'migration-reference/0') "
11+ " AND (exitcode = 0 OR exitcode = 2 OR exitcode = 8 "
12+ " OR triggers = 'migration-reference/0') "
13 "GROUP BY package, arch" % args.old_release
14 ):
15 copy_run_results(

Subscribers

People subscribed via source and target branches