bagetter / BaGetter

A lightweight NuGet and symbol server
https://www.bagetter.com
MIT License
166 stars 38 forks source link

Validate configuration early #133

Open Regenhardt opened 2 months ago

Regenhardt commented 2 months ago

Options injected from the configuration like db and storage are validated when they are requested. This means, configuration for storage are only validated when a package is pushed or downloaded, as that is when the options object is first requested.

That's not great for setup when you don't 100% know what you're doing. I'd like either something calling all validations on startup, or on the statistics page.

Statistics page is probably better as this might run in a container somewhere and this way it can be spun up and looked at without having to go find the infrastructure's logs.

So I guess instead of the current service list, there'll be a table like this:

Database Storage Search Mirror
PostgreSql S3 DB integrated None
-
Region not set

Opinions?

Regenhardt commented 2 months ago

With borders: grafik

Without borders: grafik

seriouz commented 2 months ago

I like the idea of a table but i would pivot it:

Service Info Health Message
Database Postgres No errors
Storage AwS3 Error Message here
Cache - Not configured
Search Database No errors
Regenhardt commented 2 months ago

I chose a column per service because there may be multiple error messages for a config and that would change the height of the whole row, while the number of services will always be the same. Having all errors in the last row would just expand that one, leaving the rest of the table alone.
I do like the health status neatly below each other though.

ferarias commented 1 month ago

if you ask me, I like more the compact look of a row for each service, but both will do the job.