Skip to content

Watch incremental #211

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

Merged
merged 5 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/user-guide/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ add the `--watch` flag.
ploomber-cloud deploy --watch
```

You can also use the `--watch-incremental` flag to view only the newly added logs with every polling.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this description is confusing it says "only the newly added logs", does that mean that --watch will print all the logs on every update? (I don't think that's the case)

it's unclear wh I'd use one option over the other one

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the gist of it is:

use --watch if deploying from your terminal as it'll clear your screen
use --watch-incremental if storing the deployment output into a file (e.g. github actions) as it won't attempt to clear the screen and only print new logs and status updates

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for missing the previous comment.

fixed


```sh
ploomber-cloud deploy --watch-incremental
```

## Configure an existing project

If you want to deploy an existing project run the `init` command with the `--from-existing` flag:
Expand Down
8 changes: 4 additions & 4 deletions doc/user-guide/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,19 @@ Then, click on the most recent run, and you'll see the logs:
In the logs, you will see updates on the progress of the deployment. You'll also see a URL to your application where you can check its status.
Once the deployment has succeeded, it will return a URL to view your deployed project.

If you would prefer to track progress only through the application, you can remove `--watch` from the `deploy` command in your `ploomber-cloud.yaml`:
If you would prefer to track progress only through the application UI, you can remove `--watch-incremental` from the `deploy` command in your `ploomber-cloud.yaml`:

```yaml
- name: Deploy
env:
PLOOMBER_CLOUD_KEY: ${{ secrets.PLOOMBER_CLOUD_KEY }}
run: |
ploomber-cloud deploy # removed '--watch' here
ploomber-cloud deploy # removed '--watch-incremental' here
```

Removing `--watch` means deployment updates won't be output to the logs, but you will still be able to track its progress through the URL.
Removing `--watch-incremental` means deployment updates won't be output to the logs, but you will still be able to track its progress through the URL.

Without `--watch`, the logs will look like this:
Without `--watch-incremental`, the logs will look like this:

![](../static/github/logs.png)

Expand Down