Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

truss push will incorrectly return a exit code of 0 when the target directory does not exist #1101

Open
brendan-kellam opened this issue Aug 25, 2024 · 1 comment

Comments

@brendan-kellam
Copy link

Describe the bug
If you pass a directory that does not contain a config.yaml to truss push, it will throw a FileNotFoundError, but incorrectly still return a 0 exit code.

To Reproduce

  1. Run truss push on a directory that does not contain a config.yaml
  2. Run echo $? to get the last exit code

Expected behaviour
truss returns a nonzero exit code

Actual behaviour
truss returns a zero exit code

Screenshots/Logs
N/A

Desktop (please complete the following information):

  • macOS
  • Truss version 0.9.29

Additional context
GitHub actions uses nonzero exit codes to signal failure for a given stage. We use actions to auto deploy into production using truss - unfortunately the pipeline was silently failing for a few days since we moved the config.yaml but forgot to update the action's yaml.

@squidarth
Copy link
Collaborator

Hi @brendan-kellam , sorry for the delay here. We will work on a fix here, thanks for reporting.

One thing to mention since you're using truss push in a CI/CD pipeline -- we have a Python SDK for Truss now: https://docs.baseten.co/truss-reference/python-sdk, which users seem to find more convenient for programmatic use-cases like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants