Make WordPress Core

Opened 6 years ago

Closed 3 years ago

#50342 closed defect (bug) (duplicate)

Local development environment installation doesn't wait for the mysql container to start

Reported by: johnbillion Owned by:
Priority: normal Milestone:
Component: Build/Test Tools Version: 5.3
Severity: normal Keywords: needs-patch
Cc: Focuses:

Description

Given a user who is installing the local development environment for the first time according to instructions in the project's readme file, the mysql container is not guaranteed to be fully up and running when the npm run env:start script ends, which means the subsequent npm run env:install script will fail when it cannot connect to the mysql host.

This is quite easy to reproduce by copying and pasting those four commands into your terminal so they execute in succession.

Can the npm run env:start script be made to wait until mysql is ready before terminating?

Change History (4)

#1 @desrosj
6 years ago

This can also be demonstrated by chaining commands.

npm run env:start && npm run env:install

According to the Docker compose documentation, the depends_on can be used to control start up order, but Docker does not wait for each service to be "ready".

There is wait-on currently loaded and used in the local-env/scripts. Looks like that could probably be used here as well.

#2 @johnbillion
4 years ago

#55914 was marked as a duplicate.

This ticket was mentioned in Slack in #core by desrosj. View the logs.


3 years ago

#4 @desrosj
3 years ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

Duplicate of #58867.

This should be resolved by [56464].

While this has more detail than the ticket attached to [56464], I'm going to close this as a duplicate.

Note: See TracTickets for help on using tickets.