Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a self-test that runs nginx and doesn't basic sanity checks on the
files it serves. This is nice to make sure that
--open
works butalso it should serve as another line of defence against making invalid
nginx config files. This is important as those nginx config files will
be used on the web site and we'd really prefer not to bring that down.
To get this to work consistently I have to drop the "don't run twice"
behavior of
build_docs.pl
. That behavior is implemented by checkingfor a pidfile on startup. If the file is there it checks if
ps
forthat pid comes back with a process that looks like the running one. When
the perl process terminates naturally it destroys the file. This is
known to cause trouble when a server loses power and can't delete the
file and the process is started on startup. Startup is fairly
predictable and it is common that the process would end up with the same
pid so the
ps
check will think that the new process collides withitself.
Pulling a server's power from the wall is fairly similar to what
happens when the docker process that runs the
--self-test
comes to theend and destroys that docker image. This hasn't come up before because
build_docs.pl
always terminates fairly quickly. It doesn't when you do--open
. I tried to get something that consistently removed the pidfilebut such a thing is complex in make, I think. So I just removed it.
"Don't run twice" wasn't really buying us much anyway. At this point we
run
build_docs
on immutable infrastructure in CI and Jenkins manageswhether or not to run the build concurrently. We have much more precise
control there which is what we want anyway. It might have some value
during
--self-test
to make sure that we don't leavebuild_docs.pl
running between tests. At this point we shoot it if the test is
successful and let it die if the test fails. Which isn't great but it
should work.