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

Docs: Update to guide on dropping satellite cache #3282

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/cloud/satellites/managing.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,18 @@ Currently selected: No
## Clearing cache

There are two ways to clear the cache on satellite.
One method may be faster than the other, depending on the size of your cache.

### Recreating the Underlying Satellite Instance (often faster)
### Recreating the Underlying Satellite Instance

Running the `update` command with `--drop-cache` will relaunch the instance with an empty cache volume.
Note that this operation can take a while, and the satellite may also receive any available updates during the process.
The satellite must also be in a sleep state first, you can force a satellite to sleep by running `earthly satellite sleep`
Copy link
Member

Choose a reason for hiding this comment

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

Could we just make it sleep automatically? That would be a nicer UX.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like that idea. I think it would make sense for earthly cli to drive that, and perhaps ask the user if they want to force it asleep before proceeding

Copy link
Member

Choose a reason for hiding this comment

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

It's better if it's not interactive.. maybe it fails, unless --force is used.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@brandonSc we ran into this use-case today where a user needed to do a --drop-cache on a shared satellite. Even chaining two commands together, e.g. earthly satellite sleep my-sat && earthly satellite update --drop-cache my-sat didn't always work as other users (or the CI) would cause a wake to occur before the second command was executed.

Copy link
Member

Choose a reason for hiding this comment

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

Interesting... so a client-side-only solution would not be enough. We need the server to support this atomically.


```bash
earthly satellite update --drop-cache my-satellite
```
### Using the prune command (slower)
### Using the prune command

The `earthly prune` command also works on satellites.
It usually takes longer than running `satellite update`; however, it does not trigger a relaunch.
Expand Down