terminus icon indicating copy to clipboard operation
terminus copied to clipboard

env:commit is finishing/exiting too soon

Open jfussion opened this issue 6 years ago • 2 comments

Expected behavior

env:commit should finish/exit once the workflow has succeeded.

Actual behavior

env:commit finishes/exits too soon while workflow is still running

Steps to reproduce the behavior

$ terminus self:info
 ------------------------- -------------------------------------------------------------
  PHP binary                /usr/local/Cellar/php/7.2.10/bin/php
  PHP version               7.2.10
  php.ini used              /usr/local/etc/php/7.2/php.ini
  Terminus project config
  Terminus root dir         /Users/josephbonilla/apps/terminus2
  Terminus version          2.0.0
  Operating system          Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 2018;
                            root:xnu-4903.231.4~2/RELEASE_X86_64
 ------------------------- -------------------------------------------------------------

Output:

$ terminus env:commit jts-wp.404-cache --message="test commit 2" -n && terminus workflow:list jts-wp --fields "env,status,workflow"
 [notice] Your code was committed.
 ------------- ----------- ---------------------------------------------
  Environment   Status      Workflow
 ------------- ----------- ---------------------------------------------
  404-cache     running     Sync code on "404-cache"
[REMOVED]
 ------------- ----------- ---------------------------------------------

jfussion avatar Mar 12 '19 04:03 jfussion

@jfussion https://github.com/pantheon-systems/terminus/issues/2081 a new command would solve your issue as well, I think a specific command could be used to wait for an environment to complete all the code-related workflow operations.

AronNovak avatar Jul 07 '20 11:07 AronNovak

The suggestion I put in #2081 (build:env:push from the Terminus Build Tools plugin) won't work for env:commit. There's some code in the Terminus Build Tools plugin that waits for a workflow to complete that could be used to a similar effect with `env:commit', perhaps.

greg-1-anderson avatar Jul 07 '20 17:07 greg-1-anderson