Skip to content

Preview cache hits without running tasks #791

Description

@lifeiscontent

Problem

Before kicking off a long run, there's no way to see which tasks will come from the cache and which will actually run. In CI this matters when deciding whether an expensive job is worth starting, and locally it helps explain an unexpected miss before waiting for it. Today the only way to find out is to run the tasks and read the summary afterwards.

Proposal

Add vp run --dry-run <task>. It plans the run exactly like a normal run, then prints one line per task without running anything or changing the cache:

  • cache hit
  • cache miss, with the same reason the run summary would give ('src/a.ts' modified, no previous cache entry found, ...)
  • cache disabled
  • unknown, when a task it depends on would run first and could change its inputs

It would only read the local cache, so it's quick and has no side effects. Turborepo has a similar --dry flag. A JSON output could come later.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions