Skip to content

Conversation

@Hamms
Copy link
Contributor

@Hamms Hamms commented Nov 11, 2025

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 deployment mode on our deployment servers broke this state, since Spring can't find the installed gems anymore:

ubuntu@test:~/test$ bin/dashboard-console
/usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.5.17/lib/bundler/runtime.rb:299:in `check_for_activated_spec!': You have already activated set 1.0.2, but your Gemfile requires set 1.1.0. Since set is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports set as a default gem. (Gem::LoadError)

This PR proposes that we resolve this by updating the autogenerated spring executable to only load Spring into non-deployment environments. We could alternatively add DISABLE_SPRING=1 to the .bashrc that 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 binstub to 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-console on that server without needing to manually specify DISABLE_SPRING=1

@Hamms Hamms changed the title Elijah/disable spring on managed servers disable spring on managed servers Nov 11, 2025
@Hamms Hamms changed the title disable spring on managed servers Don't Load Spring on Chef-managed Deployment Servers Nov 20, 2025
@Hamms Hamms marked this pull request as ready for review November 20, 2025 22:31
@Hamms Hamms requested a review from a team November 20, 2025 22:31
@Hamms Hamms merged commit d407578 into staging Dec 18, 2025
6 checks passed
@Hamms Hamms deleted the elijah/disable-spring-on-managed-servers branch December 18, 2025 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants