Skip to content

Contest: prepare HW split - #100

Open
matttbe wants to merge 6 commits into
linux-netdev:mainfrom
matttbe:contest-split-hw
Open

Contest: prepare HW split#100
matttbe wants to merge 6 commits into
linux-netdev:mainfrom
matttbe:contest-split-hw

Conversation

@matttbe

@matttbe matttbe commented Sep 10, 2026

Copy link
Copy Markdown
Member

This prepares the future split, dealing with HW results in a different 'contest'.

The plan is:

  • contest/results-collector.py:
    • change the config to deal with multiple branches and combined files
  • pw_contest.py:
    • launch a second service, from a subdir, with different settings, e.g. log, pw check name, input json file from results-collector.py, output one for status.html
    • this seems clearer, to have different logs, etc.
  • faker: not needed any more for pw_contest, but still for status.html. (Note that the faker part was not used apparently, so removed in this PR)
  • UI:
    • one small modification to get the HW branches. Nothing else needed because the DB will still be filled the same way.

Note: of course, this shouldn't be deployed until the corresponding modifications are done on the hosts.

@matttbe
matttbe requested a review from kuba-moo September 10, 2026 18:23
To prepare a split between HW and the rest.

Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
This file is read by another service (faker), possibly simultaneously.

Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
It looks like it is not / no longer used.

So drop that.

Note that the combined 'info' file will now only be used by the UI
(status page), not by pw_contest.py anymore.

Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
To support the HW branches, deal with multiple input branch URLs, and
multiple output combined files.

This sounds better than having to deal with different services writing
in the same DB.

Config changes:

  - branch_url -> branch_urls: with multiple URLs, separated by ','
  - combined -> combined_files: output files, separated by ','

Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
This limitation was only done for in progress work, but we don't need
the old results. Old results are still on the different runners (and in
the DB).

(Probably the different runners should also trim their 'results.json'
file.)

Because of that, 'all-results.json' is currently over 410MB, which takes
a bit of time to process here and in pw_contest.

The other consequence is that some files for the UI contains info about
old branches that are not needed, but are still processed on the client
side, e.g. branch-results.json.

Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
Generated in another file by the dedicated pw-contest service.

Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
Comment thread pw_brancher.py
info = config.get("output", "info")
with open(info, 'w') as fp:
json.dump(state["info"], fp)
write_json_atomic(config.get("output", "info"), state["info"])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to work? Last time we did this the writer did not have write permissions to the directory where the files are. So we could not do an atomic swap. Please double check if this will be a problem for branches info?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already checked the directory permission (and created the new files), but I will sure double check, thank you for the reminder

Comment thread contest/results-faker.py
dir=/path/to/output
url_pfx=relative/within/server
info=/path/to/info.json
"""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this commit. If you want to get rid of the faker why not delete the whole thing? You're removing the main reason for its existence. Combining infos can move to the brancher probably?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The combined infos is still used by the UI of I remember well (status I think, I can check when I have access)

dir=/path/to/output
url_pfx=relative/within/server
combined=name-of-manifest.json
combined_files=name-of-manifest1.json,name-of-manifest2.json

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure but also - why? Is it that bad to have two instances running?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was feeling this safer, not too have two confident writers (for the DB, even if it is supposed to be safe), and to keep the remote DB as is.

But I can revert back to two services (what I had in the v1)

Comment thread ui/status.js

branches.add(v.branch);

if (v.remote == "brancher") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this entry here what faker is producing?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think so, the combined info part. I can check when I have access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants