YML Validation prior to rebuild?

This is on a self-hosted Discourse installation in a private VPS with a typical Docker installation.

I did it again:
I waited through a two hour “flawless” update rebuild to v3.4.0.beta2-dev.
Then added a couple lines to app.yml and waited for another couple hours for another rebuild.
(Why separate the operations? Because a double whammy is never good if there is potential for errors.)
Then I found runtime errors in the log because I forgot spaces in app.yml (for MaxMind account and key).
So tonight I need to do yet another rebuild.

That’s over six hours of virtual downtime, compared to a WordPress or other CMS site that would only take a few minutes in the exact same scenario. This screams “bad UX” and thus “anti-marketing” - it’s just not good for the platform.

The only reason I had to do a second rebuild was because I added these blasted two lines. I really wish a full rebuild wasn’t necessary just because of this small change in the config file.

  1. Has there been any talk about doing a validation on the yml file before a rebuild? That simple feature would have eliminated a time consuming operation and subsequent issues.

  2. Has there been any talk about a pre-processor that determines if a full rebuild is required after specific changes?

  3. I’m surprised a YAML error didn’t get reported in the logs. Is there a reason why the runtime main .yml folder and perhaps others are not checked for syntactical errors? … Or do more experienced admins do their own linting before a rebuild? :thinking:

I’m hosting in Docker because I believe it’s “the easiest” platform if/when I pass this system on to someone else for maintenance. If that’s not correct, and I’ve opted for not only “not easiest” but also “slowest”, perhaps I should consider a different installation option.

Thanks!

A two container setup can build the new container while the old one keeps running, so there’s only a minute or so if downtime while the new container cracks up.

That’s a very kind rebuild time. I guess you’re on pi or something else that’s very slow?

Usually if there is a yml config issue you get notice right away.

You can check the file size use this code,then you can analyze if it is the problem of space

/var/discourse# du -sh /* | sort -h

Except with those two spaces with MaxMind. It goes thru but geo things doesn’t work. So it isn’t yml syntax error per se, but it is still an error :man_shrugging:

1 Like