Make WordPress Core

Opened 5 years ago

Closed 14 months ago

#50342 closed defect (bug) (duplicate)

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

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

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
5 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
3 years ago

#55914 was marked as a duplicate.

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


19 months ago

#4 @desrosj
14 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

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.