Skip to content

Get a file's digest #7709

Closed
Closed

Description

@shykes

Problem

The Dagger API doesn't provide an efficient way to compute a file's digest. Which, in turn, makes it impossible to efficiently compare two files, or check if a file has changed for example. There are workarounds, but they either add complexity, hurt performance, or both.

Solution

Add a function to compute a file's digest. Ideally reusing the underlying buildkit digest.

extend type File {
  """
  Return the file's digest.
  The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine.
  """
  digest: String!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/enginearea/engine/api

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions