Skip to content

Revert "Revert "truss push: Make published deployments the default""#2202

Open
daanielww wants to merge 6 commits intomainfrom
revert-2201-revert-2178-danielwang/bt-15696-making-publish-the-default-in-truss
Open

Revert "Revert "truss push: Make published deployments the default""#2202
daanielww wants to merge 6 commits intomainfrom
revert-2201-revert-2178-danielwang/bt-15696-making-publish-the-default-in-truss

Conversation

@daanielww
Copy link
Contributor

Reverts #2201

@linear
Copy link

linear bot commented Feb 4, 2026

Issue reopened: BT-15696 Making publish the default in truss

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61cc13539a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +633 to +636
if tail:
raise click.UsageError("Cannot use --watch with --tail.")
# Development deployment for watch mode
publish = False

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject --watch with --publish to avoid silent dev deploys

When --watch is used, the CLI unconditionally forces publish = False and does not validate that the user also passed --publish. This means truss push --watch --publish silently creates a development deployment even though the caller explicitly requested published behavior. Because --watch is new and --publish is still accepted, this is a user-facing regression that can lead to deploying the wrong model type; it should raise a UsageError (similar to the promote/environment/tail checks) or explicitly reject --publish with --watch.

Useful? React with 👍 / 👎.

@daanielww daanielww force-pushed the revert-2201-revert-2178-danielwang/bt-15696-making-publish-the-default-in-truss branch from e9dc21e to 55e0a3e Compare February 4, 2026 20:24
help=(
"Deploy the chain as a published deployment to the specified environment."
"If specified, --publish is implied and the supplied value of --promote will be ignored."
"If specified, publish is implied and the supplied value of --promote will be ignored."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nit: given that we say published above, I bet we can simplify this to If specified, the supplied value ...

"Cannot use --watch with --environment. Watch mode runs a development deployment."
)
if tail:
raise click.UsageError("Cannot use --watch with --tail.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense for now, but I do think this is going to be an ask soon. Basically stream logs, but still have watch indicate what it's doing when needed

I'm not sure the best DX for this yet

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah agreed, but I think we can handle that separately

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes agreed! not for this PR


# Handle --watch flag: deploys as development and then watches
if watch_after_push:
if promote:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we error if you provided both --publish and --watch explicitly?

Otherwise I think people might miss the warning above and be slightly surprised

@daanielww daanielww force-pushed the revert-2201-revert-2178-danielwang/bt-15696-making-publish-the-default-in-truss branch from 510307d to 29ce828 Compare February 5, 2026 19:09
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

Successfully merging this pull request may close these issues.

2 participants