srevinsaju / togomak

A declarative pipeline orchestrator with the magic of HCL as a configuration language, inspired from Terraform's architecture.
https://togomak.srev.in
Mozilla Public License 2.0
144 stars 5 forks source link

togomak doesn't abort after exit when multiple stages run #22

Open jgangemi opened 11 months ago

jgangemi commented 11 months ago

INFO[0000] [provider=git] Still pulling git repo data.git... [0s elapsed]
INFO[0001] [provider=git] Completed pulling git repo data.git in [2s elapsed]
INFO[0001] [+] deploy
INFO[0001] [+] build
INFO[0001] [+] docs
INFO[0001] [stage=build] INFO [+] ci-init (skipped)
INFO[0001] [stage=build] INFO [+] local-init
INFO[0001] [stage=docs] INFO [+] init (skipped)
INFO[0001] [stage=docs] INFO [+] docs (skipped)
INFO[0001] [stage=docs] INFO took 2ms
INFO[0001] [stage=deploy] INFO [+] version
INFO[0001] [stage=deploy] INFO [provider=git] Still pulling git repo data.git... [0s elapsed]
INFO[0001] [stage=deploy] INFO [stage=version] git repo is dirty
INFO[0001] [stage=deploy] ERRO <nil>: failed to run command (stage.version); exit status 1
INFO[0002] [stage=deploy] INFO [provider=git] Completed pulling git repo data.git in [0s elapsed]
INFO[0002] [stage=deploy] ERRO took 410ms
INFO[0002] [stage=deploy] Error: failed to run command (stage.version)
INFO[0002] [stage=deploy] 
INFO[0002] [stage=deploy] exit status 1
INFO[0002] [stage=deploy] 
ERRO[0002] <nil>: failed to run command (stage.deploy); exit status 1
INFO[0002] [stage=build] WARN [stage=local-init] Warning: In a future version of Poetry, PyPI will be disabled automatically if at least one custom source is configured with another priority than 'explicit'. In order to avoid a breaking change and make your pyproject.toml forward compatible, add PyPI explicitly via 'poetry source add pypi'. By the way, this has the advantage that you can set the priority of PyPI as with any other source.
INFO[0003] [stage=build] INFO [stage=local-init] Installing dependencies from lock file
INFO[0004] [stage=build] WARN [stage=local-init] Warning: poetry.lock is not consistent with pyproject.toml. You may be getting improper dependencies. Run `poetry lock [--no-update]` to fix it.```

this should have aborted after the `exit status 1`
srevinsaju commented 11 months ago

I wasn’t able to reproduce this error, but I added equivalent tests in https://github.com/srevinsaju/togomak/pull/32 which are supposed to fail. If you are able to recreate a similar togomak configuration file which succeeds similarly, when it is supposed to fail, that could help me reproduce the issue, additionally, I could add it to the integration-tests, which would contribute to increasing the coverage, by covering edge cases, if any.