-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'--enable core --local' only runs core, no ancillary services #615
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing behaviour is an intentional special case to run everything in local mode.
A local instance isn't very usable by a developer (think app/contract developer) without Friendbot. Friendbot needs Horizon so local mode also runs it. At that point the only thing not running is the rpc so we just run everything in local mode because that's an easier statement to make on behaviour.
ok, yes, that default behavior makes sense given that context, this was driven by observation during new usage of quickstart for end-to-end integration test: [edit] - I've updated the description on PR to explain the new use case further. How about if I retain default behavior by changing this to just check for |
Thanks for the context, that helps to understand the use case we're enabling. And the resource usage while not outrageous is significant, the memory usage is about half (180mb 👉🏻 70mb) without Horizon, and CPU goes way down (18% 👉🏻 2%). 💯 This will be a breaking change. I don't think we can do this in a way that it wouldn't be a breaking change. But I think that's okay if we minimize the breakage.
That feels a bit awkward. The input value is unintuitive as to the surprising behavior it'd result in. I think we can compromise and move ahead with your original plan, we just need to minimise the breakage and I have a suggestion for an additional change to make below. We don't have metrics to know how people are executing the quickstart image but in tutorials and commands I see folks having used we should preserve default behavior when no The default behavior is already that all run, so we don't need to do anything to change that. A change needs to be made so that when running in Lines 204 to 212 in 611afc9
The result of your existing change here plus the change above should be:
That should be a small tweak. Wdyt? |
sounds good, applied that flow and updated the README to document this expectation - 5381df9 |
What Changed
when using
--local --enable core,,
do not start the horizon/friendbot service in container, only core service will be running.this removes prior default behavior, which started horizon and friendbot services automatically when
--local
was used.Why
we are using quickstart for new end-to-end integration tests now, and noticed with
--enable core,,
if--local
was used, quickstart would still start horizon/friendbot in container, here is reference of how the test uses these flags:https://github.com/stellar/go/pull/5370/files#diff-1c787ef8e522ba695cb843ceef6c93e842a3cfc319085d6b78349a1c4ec201abR279
the testing environment only needs the local core validator/history archive server available which quickstart automates the provisioning of these services very conveniently(and reliably for latest versions) and allows the tests to avoid significant boilerplate code otherwise to spin up it's own local core/archive, however, with quickstart spinning up other services in the container, it's giving up some of the gains made in the test use case, since it is consuming more integration test host compute.