Page MenuHomePhabricator

[Scripts] Ensure docker is running before starting localstack
ClosedPublic

Authored by jon on Apr 11 2023, 7:29 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 27, 8:26 AM
Unknown Object (File)
Sat, Dec 21, 3:04 AM
Unknown Object (File)
Sat, Dec 21, 2:26 AM
Unknown Object (File)
Fri, Dec 20, 11:47 PM
Unknown Object (File)
Fri, Dec 20, 8:48 PM
Unknown Object (File)
Sat, Dec 7, 8:41 PM
Unknown Object (File)
Sat, Dec 7, 8:40 PM
Unknown Object (File)
Sat, Dec 7, 7:28 AM
Subscribers

Details

Summary

Localstack failing to start because docker isn't available
is not a good user experience as it outputs a bunch of "cannot open
socket" errors.

As part of starting localstack, ensure that docker is available before
attempting to launch localstack

https://linear.app/comm/issue/ENG-3227

Test Plan
# Stop docker
comm-dev services start
# Get message about starting docker

# Start docker
comm-dev services start
# Localstack starts

Diff Detail

Repository
rCOMM Comm
Branch
jonringer/assert-docker-is-running
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

scripts/comm-dev.sh
44–45

switched these because localstack is more likely to fail

Don’t have context

ashoat removed reviewers: varun, bartek, atul.

I wish you had deferred this work instead of randomly picking it up. You probably thought it would be easy, but now you have a diff and going to have to spend even more time on this responding to comments...

This is a huge distraction from your monthly goal, which you are deeply behind on. Even the scoping is incomplete!

I'm accepting this and removing reviewers to try to minimize the work that you have to do here. Before landing, please make sure you don't cause nix develop to fail if Localstack is not running. (An alternative solution would be to abandon the diff)

scripts/localstack_up.sh
22
  1. Capitalize Docker
  2. Most devs do not need Localstack

See my suggested edit, but please modify it to make sure each line does not exceed 80 chars

This revision is now accepted and ready to land.Apr 11 2023, 8:31 AM
jon marked an inline comment as done.

Capitalize docker, revisit error message

$ comm-dev services start
Localstack requires Docker to be running
Please start Docker and try again
jon added inline comments.
scripts/localstack_up.sh
22

"Docker doesn’t appear to be running. If you need Localstack for a local AWS environment, you’ll need to start Docker and try running nix develop again."

nix develop doesn't start any of these services. It's invoked through the comm-dev services subcommand.

$ comm-dev services start
Localstack requires Docker, please start Docker and try again
# Start docker
$ comm-dev services start
Starting Localstack...
22

Most devs do not need Localstack

Correct, but for people working services, it's useful. Since I was trying to get a local dev environment going for Tunnelbroker, I thought I would fix this wrinkle that I tripped over.

Going to assume that we don't want to spend anymore time on this.