Repository navigation
Conversation
Packit gets the results URL of a Testing Farm run only after Testing Farm reports back. Until then, the run detail page and the runs table show the pipeline ID with no link. Add `getTestingFarmResultsUrl()`, which falls back to `https://api.dev.testing-farm.io/v0.1/requests/<pipeline_id>` when `web_url` is missing, so you can check the current state of the request. The status label on the run detail page and the pipeline ID link in the runs table use it. Mark `web_url` as nullable, since packit-service stores `None` until the results arrive. Fixes packit#527 Assisted-by: Claude Code Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 40s |
betulependule
left a comment
There was a problem hiding this comment.
I personally prefer this version over fullsend's #552.
It's overall more consistent, includes tests and has a guard for the possibillity of <pipeline_id> not being defined. This can happen when the Testing Farm job is new doesn't have an ID assigned just yet, and this PR makes sure to check that it is defined before adding a link constructed based on the value of the ID. If this check weren't present, it would add a broken link.
This implementation makes it so that when the status field is clicked (fedora-43-x86_64), it redirects to https://api.dev.testing-farm.io/v0.1/requests/<pipeline_id> when the job is still queued.
I personally didn't find anything that looks broken. Perhaps it would make sense to also change pipeline_id: string; to pipeline_id: string | null; in frontend/src/apiDefinitions.ts, but that's a nitpick.
Packit gets the results URL of a Testing Farm run only after Testing Farm reports back. Until then, the run detail page and the runs table show the pipeline ID with no link.
This adds
getTestingFarmResultsUrl(), which falls back tohttps://api.dev.testing-farm.io/v0.1/requests/<pipeline_id>whenweb_urlis missing. The status label on the run detail page and the pipeline ID link in the runs table use it. A run without a pipeline ID (not submitted yet) gets no link.web_urlis now typed asstring | null, since packit-service storesNoneuntil the results arrive.The API URL matches the
TESTING_FARM_API_URLdefault in packit-service. If a deployment submits to another Testing Farm instance, this constant needs to follow.Fixes #527
Generated-by: Claude Code