terminus icon indicating copy to clipboard operation
terminus copied to clipboard

workflow:wait reports workflow is still running when it isn't

Open mattdaniel opened this issue 1 year ago • 5 comments

Platform

(x) MacOS ( ) Linux ( ) WSL2

Installed Via

(x) Homebrew ( ) Apt Package ( ) Manually

PHP Version

( ) 7.4x ( ) 8.0 (x) 8.1

Terminus Version

3.3.0

Command Executed

terminus workflow:wait projectname.dev

Expected behavior

  • Expect the correct status to be returned, including something like [notice] Workflow succeeded and the process exiting if there is no workflow running.

Actual behavior

  • The command thinks that the latest workflow is still running, when it isn't and actually finished a long time ago.
  • Command repeatedly reports this incorrect info until the max time is reached.
  • Example output:
 [notice] Current workflow is 'Automated backup for the live environment'; waiting for 'Sync code on dev'
 [notice] Current workflow is 'Automated backup for the live environment'; waiting for 'Sync code on dev'
 [notice] Current workflow is 'Automated backup for the live environment'; waiting for 'Sync code on dev'
  • Also note above that the environment is referring to live, but 'dev' was specified in the command.
  • The workflow that workflow:wait believes is running, has been confirmed as finished both in the dashboard, or with terminus, e.g. terminus workflow:info:status projectname.dev (note the info below still seems to ignore the .dev environment requested):
 [notice] Showing latest workflow on projectname.
 -------------- --------------------------------------------- 
  Workflow ID    c768ec2e-99f8-11ee-b832-...        
  Environment    live                                         
  Workflow       Automated backup for the "live" environment  
  User           Pantheon                                     
  Status         succeeded                                    
  Started At     2023-12-13 20:47:08                          
  Finished At    2023-12-13 20:54:14                          
  Time Elapsed   427s                                         
 -------------- --------------------------------------------- 

Note: same behaviour happening in github actions using ubuntu, terminus-build-tools-plugin, and build:workflow:wait

mattdaniel avatar Dec 13 '23 21:12 mattdaniel

I'm currently having the same issue:

Calling terminus workflow:wait --start 1715097376 --max 500 -- my-env
Notice: ] Current workflow is 'Sync code on my-env'; waiting for 'Sync code on my-env'
Notice: ] Current workflow is 'Sync code on my-env'; waiting for 'Sync code on my-env'
Notice: ] Current workflow is 'Sync code on my-env'; waiting for 'Sync code on my-env'
Notice: ] Current workflow is 'Sync code on my-env'; waiting for 'Sync code on my-env'
Notice: ] Current workflow is 'Sync code on my-env'; waiting for 'Sync code on my-env'
Notice: ] Current workflow is 'Sync code on my-env'; waiting for 'Sync code on my-env'
Notice: ] Current workflow is 'Sync code on my-env'; waiting for 'Sync code on my-env'
Notice: ] Current workflow is 'Sync code on my-env'; waiting for 'Sync code on my-env'

It never ends... Any fix for this? please

DarkteK avatar May 07 '24 17:05 DarkteK