Don't Load Spring on Chef-managed Deployment Servers #69484
Merged
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.
As a tool intended to speed up developer's iteration cycles, Spring is only needed in local development environments. But because we want to support developers running tests locally and lack a good way to distinguish between local developer tests and our managed test environment, we also end up installing it on our persistent managed test server.
For a long time, having Spring on the test server has been unnecessary but not actively problematic. Unfortunately, our recent change to start installing gems in
deploymentmode on our deployment servers broke this state, since Spring can't find the installed gems anymore:This PR proposes that we resolve this by updating the autogenerated spring executable to only load Spring into non-
deploymentenvironments. We could alternatively addDISABLE_SPRING=1to the.bashrcthat we generate for all of our managed servers; I think arguably that would be cleaner than making a manual update to a file that we don't typically update manually, but it would also be less discoverable. Open to suggestions if you'd prefer that direction, or another one entirely!Misc
Note that this PR includes both an automated code change and a manual one, and the automated one is responsible for the majority of the diff. Specifically, I first ran
spring binstubto update the autogenerated spring executable, and then applied our desired customization to that updated executable. I'd be happy to split these up (or to forgo the autogenerated update entirely) if anyone would prefer.Links
Testing story
Verified manually on the test server that with this change in place, we can again run
dashboard-consoleon that server without needing to manually specifyDISABLE_SPRING=1