osbuild / osbuild-composer

An HTTP service for building bootable OS images.
https://www.osbuild.org
Apache License 2.0
160 stars 108 forks source link

client: extract endpoint() and newServerURL() helper #4329

Closed mvo5 closed 3 days ago

mvo5 commented 1 month ago

Small refactor, I am actually not sure it's worth it, so feel free to close as long term we want to move to konflux and a lot of this will probably go away. But maybe it is still useful.


worker: add endpoint() helper that cannot fail and use it

Small commit to (hopefully) make the intent of the code more clear when serverURL.Parse() is used. In most cases it is used to generate an endpoint URL. As this is a realtive path we do not need Parse() but can use JoinPath() instead which has the nice benefit that it cannot error or panic.


worker: extract newServerURL() helper and add tests

Also explain why serverURL.JoinPath() cannot be used here.

github-actions[bot] commented 1 week ago

This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days.

github-actions[bot] commented 3 days ago

This PR was closed because it has been stalled for 30+7 days with no activity.