Compose fixes, anonymous worker auth, additional API filters
I am adapting my Web UI to the v1 API and found a few issues along the way.
Opening this as a draft just to get some feedback. Since I am changing rebuilderd and UI side by side I'll keep this in a single branch for now but I can open separate MRs for final as/if any of the points below are ACKed. Also, I haven't written a single line of rust in my life until now so I am learning as I go and there is "vibe" coding involved.. please have patience.
-
Remove obsolete version from compose and add depends_on. Without it, the workers fail to register and wait for 30 seconds to re-register.
-
I believe v1 changed how unauthenticated workers are handled. If you follow the
README.mdandrebuilderd.confcomments, out of the box there should be no authentication and workers should be able to register anonymously. However, v1 auth code requires a key regardless. This breaks default compose (workers getting 403). I added a sample code which ignores auth and just registers a worker if config is not set but it could also go with a different approach to use some "changeme" key by default. This one is mostly for @Nihlus -
I need some more filtering options to make a better UI. Especially for Debian which has so many packages, I want to filter down as much as possible. Specifically, added filter by status and by prefix (name_starts_with) so I can have easy alphabetical filter.
-
Arch having no release (NULL in database) is quite annoying when it comes to API usage. Specifically, I can't call
distributions/archlinux/???/components/core/architecturesso I added a null handler but that is ugly. I guess the proper answer to this issue is to simply use/distributions/archlinux/architecturesbut I need to handle this case by case in the UI. Would it make sense to userollingkeyword for arch release instead of NULL? That would nicely solve the problem but maybe it's not a good idea for some reason.