Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

mrc-6454 Replace Orderly Web with Packit#33

Merged
EmmaLRussell merged 36 commits intomasterfrom
mrc-6454-replace-ow-with-packit
Jul 29, 2025
Merged

mrc-6454 Replace Orderly Web with Packit#33
EmmaLRussell merged 36 commits intomasterfrom
mrc-6454-replace-ow-with-packit

Conversation

@EmmaLRussell
Copy link
Copy Markdown
Contributor

@EmmaLRussell EmmaLRussell commented Jun 12, 2025

This branch replaces OrderlyWeb with Packit in the implementation of the Diagnostic Report task.

In the run-dependencies script we now run packit deploy rather than installing orderly web. For some reason, packit deploy has a non-0 exit code, which we need to work around - even though everything seems to deploy just fine!

In the python code, OrderlyWebClientWrapper has been replaced with PackitClient to do the communication with Packit api to run tasks and poll for packet completion.

This reproduces some logic which was in the old OW wrapper to deal with token expiry - so all API calls are wrapped by execute which re-authenticates if necessary.

We no longer have a report timeout - this was supported by OW package, but we don't really have the concept in Packit I don't think. Could implement it in the task queue if necessary.

When we run a report task, we always use the main branch of the orderly repo. We need to provide a ref, so the client gets the latest commit for the branch. Potentially this could be replaced with "HEAD" if we update orderly runner to support this.

Previously, the task would publish the report by using the publish method on the ow wrapper. In packit, publishing is just a case of giving roles permission to view a packet, so for each report we configure a list of publish_roles (which may be user roles or group roles) who should be granted permission to view the new packet.

I've replaced some OW terminology with Packit terminology ("packet" for "version") but retained "report" and "publish" as they feel meaningful in the VIMC context and would be a lot of changes to eradicate!

There are also config file changes to replace OW config with Packit url etc. We'll need to update the corresponding config in montagu-config.

There were a few updates to get the dev run working - usual hyphen changes to update docker compose, and also needed to run the montagu proxy to get the preauth/montagu auth support. This meant optionally supporting disable certificate verification in the requests package to coax it to talk to local proxy with self-signed cert.

This can be tested locally, or on UAT, where it has been end-to-end tested by re-uploading the latest default-Routine-R burden estimates for the IC-Okell modelling group through the Modellers Contrib Portal (packet link). You should find that a new packet is created as well as a YouTrack ticket created or updated with the latest pcket link. You can check the logs of the montagu-task-queue container to check task progress.

There are some outstanding issues with setting tags on the YouTrack ticket created or updated by the task - but I want to fix them in another branch (if still actually necessary - I'll check with Katy) as this one has dragged on long enough! These issues are described in this ticket.

@EmmaLRussell EmmaLRussell marked this pull request as draft June 12, 2025 14:35
pyyaml
montagu>=0.0.2
orderlyweb-api>=1.0.0
git+https://github.com/reside-ic/youtrack-rest-python-library
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we should get that on pypi if we still want to use it (separate to this ofc)

set -ex

here=$(dirname $0)
export REGISTRY=vimc
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we not have things on ghcr yet? I guess not for montagu...something else to add to the backlog :(

Comment on lines +39 to +40
hatch env run pip3 install constellation
hatch env run pip3 install packit-deploy
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

if we're using hatch, why not add these to the pyproject.toml so they're installed when hatch builds the env?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't actually see how this is working - I'll follow up in person

self.__verify = not config.packit_disable_certificate_verify
self.__authenticate()

def __url(self, relative_url):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

single underscore for private but nbd

@@ -0,0 +1,165 @@
import json
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let's move this into a package later so we can reuse it at some point in future

token:
smtp:
host: montagu_smtp_server_1
host: montagu-smtp_server-1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we should fix this name too

@EmmaLRussell EmmaLRussell merged commit cb321a2 into master Jul 29, 2025
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants