Skip to content

[WIP] misc improvements to local dev#1933

Open
johnclary wants to merge 12 commits intomainfrom
john/26248-drop-street-level
Open

[WIP] misc improvements to local dev#1933
johnclary wants to merge 12 commits intomainfrom
john/26248-drop-street-level

Conversation

@johnclary
Copy link
Member

@johnclary johnclary commented Jan 9, 2026

Associated issues

Two local dev changes here:

  • You can now use the --apply flag with any vision-zero command that starts the graphql engine.
  • The DB is now persisted locally, even when you stop and prune the compose stack. This solves a key pain point when you want to tweak env vars without fully replicating again.

Testing

  1. Activate your VZ python environment and install requests if it's not already installed.
pip install requests
  1. Start your local stack by replicating with the new --apply command ✨
 ./vision-zero replicate-db --apply
  1. Query the DB to verify locations.street_level no longer exists:
select street_level from locations;
# ERROR:  column "street_level" does not exist
  1. Now we will test that your db data is persisted locally. First bring down the entire local stack
./vision-zero local-stack-down
  1. Now prune the containers and verify you do not have any docker remnants of the VZ stack
# prune the containers
docker container prune -f
# verify you have no running or stopped vision_zero containers
docker ps -a
  1. Start the stack without replicating:
./vision-zero local-stack-up
  1. The stack should start right up and there should be nothing to apply on the database. From the /database directory, verify the DB state matches what you expect:
hasura migrate status
  1. Nice, your DB is now persisted!

  2. Finally, start the VZE and head to the location details page to verify updated street levels column looks good. E.g. http://localhost:3002/editor/locations/153D618A97.

Screenshot 2026-01-09 at 1 45 02 PM

Ship list

  • Check migrations for any conflicts with latest migrations in main branch
  • Confirm Hasura role permissions for necessary access
  • Code reviewed
  • Product manager approved

@netlify
Copy link

netlify bot commented Jan 9, 2026

Deploy Preview for atd-vze-staging ready!

Name Link
🔨 Latest commit 62de5e7
🔍 Latest deploy log https://app.netlify.com/projects/atd-vze-staging/deploys/69692bb679dda5000843504f
😎 Deploy Preview https://deploy-preview-1933--atd-vze-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@johnclary johnclary changed the title Drop deprecated locations.street_level column and persist local db Drop deprecated locations.street_level column and misc improvements to local dev Jan 9, 2026
@johnclary johnclary changed the title Drop deprecated locations.street_level column and misc improvements to local dev Use the new location street levels column and misc improvements to local dev Jan 9, 2026
parser.add_argument("-f", "--filename", required=False)
parser.add_argument(
"-a",
"--apply",
Copy link
Member Author

@johnclary johnclary Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i considered trying to mirror the hasura CLI more closely such that we could use apply instead of --apply, but it would take some light refactoring of the parser setup to use suparsers. maybe i should go ahead and do that now?

./vision-zero local-stack-up apply

@johnclary
Copy link
Member Author

Revoking my review request until I have a chance to update our documentation as well

@johnclary johnclary changed the title Use the new location street levels column and misc improvements to local dev [WIP] misc improvements to local dev Jan 21, 2026
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.

1 participant