rocky-linux / peridot

Cloud-native build and release tools tailored to building, releasing and maintaining Linux distributions and forks
https://peridot.build.resf.org
BSD 3-Clause "New" or "Revised" License
147 stars 32 forks source link

Project settings UI incomplete #182

Open josephtate opened 6 months ago

josephtate commented 6 months ago

Describe The Bug

When modifying a project's settings via the peridot web ui (:////settings), several fields are missing, and when the form is submitted, they are missing from the PUT request to the API causing them to be nulled out.

These fields include cdnURL, streamMode, and buildPoolType.

These settings are modifiable in the API.

I'm not sure if more modern peridot versions have fixed this form.

Reproduction Steps

  1. Have a project
  2. Set a cdnURL (but you can't in the UI, so use the API)
  3. Update the architectures in the /settings page
  4. Note that the cdnURL is missing when looking at the settings again in the API.

Really, this should use PATCH, not PUT to update only the changes. This makes the page more future proof when the data layer changes.

Expected Behavior

The UI should support all the fields available in the Project object. Or it should track the original object and only change the fields present in the form, or it should use PATCH to modify the object state on the server vs. PUT.

Version and Build Information

It is not obvious what version of peridot I'm using, but it's kinda old. IDK if this bug is still relevant.

Additional context

Please close if not relevant to current releases.

mstg commented 6 months ago

We're not planning to use PATCH as the general pattern is that the resource is replaced wholly. So GET -> PUT is expected. I agree that newer options should have been present in the UI to not cause issues like this.