Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,23 @@ steps = [
"remote-cache-server",
"start",
],
{ argv = [
"remote-cache-server",
"run",
"--github-actions",
"vt",
"run",
"emit",
], envs = [
[
"VP_REMOTE_CACHE",
"read-write",
],
[
"VP_RUN_INTERNAL_HIDE_PENDING_UPLOADS",
"1",
],
], comment = "`emit` runs first, on its own, so its upload doesn't overlap `after-emit`'s fetch." },
{ argv = [
"remote-cache-server",
"run",
Expand All @@ -302,6 +319,23 @@ steps = [
"1",
],
] },
{ argv = [
"remote-cache-server",
"run",
"--github-actions",
"vt",
"run",
"build",
], envs = [
[
"VP_REMOTE_CACHE",
"read-write",
],
[
"VP_RUN_INTERNAL_HIDE_PENDING_UPLOADS",
"1",
],
], comment = "`build` runs first, on its own, so its upload doesn't overlap `after-build`'s fetch." },
{ argv = [
"remote-cache-server",
"run",
Expand All @@ -318,7 +352,7 @@ steps = [
"VP_RUN_INTERNAL_HIDE_PENDING_UPLOADS",
"1",
],
], comment = "`after-build` runs the same command as `after-emit`, so that step hits the entry the first run stored." },
], comment = "`after-build` runs the same command as `after-emit`, so that step hits the entry `after-emit`'s run stored, and nothing is fetched." },
[
"vt",
"cache",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,58 @@ As after a local hit, the steps after a remote hit are `unknown` only if it rest
```
```

## `VP_REMOTE_CACHE=read-write VP_RUN_INTERNAL_HIDE_PENDING_UPLOADS=1 remote-cache-server run --github-actions vt run after-emit`
## `VP_REMOTE_CACHE=read-write VP_RUN_INTERNAL_HIDE_PENDING_UPLOADS=1 remote-cache-server run --github-actions vt run emit`

`emit` runs first, on its own, so its upload doesn't overlap `after-emit`'s fetch.

```
$ vtt write-file dist/out.txt built

[remote-cache] POST /fetch 404
[remote-cache] POST /store 200
```

## `VP_REMOTE_CACHE=read-write VP_RUN_INTERNAL_HIDE_PENDING_UPLOADS=1 remote-cache-server run --github-actions vt run after-emit`

```
$ vtt write-file dist/out.txt built ◉ cache hit, replaying

$ vtt print checked
checked

---
vt run: 0/2 cache hit (0%), 2/2 successful. (Run `vt run --last-details` for full details)
[remote-cache] POST /fetch 404
vt run: 1/2 cache hit (50%), 2/2 successful. (Run `vt run --last-details` for full details)
[remote-cache] POST /fetch 404
[remote-cache] POST /store 200
```

## `VP_REMOTE_CACHE=read-write VP_RUN_INTERNAL_HIDE_PENDING_UPLOADS=1 remote-cache-server run --github-actions vt run build`

`build` runs first, on its own, so its upload doesn't overlap `after-build`'s fetch.

```
$ vtt print-file a.txt b.txt
a
b

[remote-cache] POST /fetch 404
[remote-cache] POST /store 200
```

## `VP_REMOTE_CACHE=read-write VP_RUN_INTERNAL_HIDE_PENDING_UPLOADS=1 remote-cache-server run --github-actions vt run after-build`

`after-build` runs the same command as `after-emit`, so that step hits the entry the first run stored.
`after-build` runs the same command as `after-emit`, so that step hits the entry `after-emit`'s run stored, and nothing is fetched.

```
$ vtt print-file a.txt b.txt
$ vtt print-file a.txt b.txt ◉ cache hit, replaying
a
b

$ vtt print checked ◉ cache hit, replaying
checked

---
vt run: 1/2 cache hit (50%), 2/2 successful. (Run `vt run --last-details` for full details)
[remote-cache] POST /fetch 404
[remote-cache] POST /store 200
vt run: 2/2 cache hit (100%), 2/2 successful. (Run `vt run --last-details` for full details)
```

## `vt cache clean`
Expand Down
Loading