dagger/dagger · error

invalid %s lock value

Error message

invalid %s lock value

What it means

selectedSHAEntry: the lock entry's stored value is the empty string, so there is no resolved SHA/digest to pin into a selected entry. The lockfile entry exists but its value is missing.

Source

Thrown at core/lockfile_update.go:110

}

func containsLockEntry(entries []workspace.LookupEntry, target workspace.LookupEntry) bool {
	for _, entry := range entries {
		if entry.Namespace == target.Namespace &&
			entry.Operation == target.Operation &&
			reflect.DeepEqual(entry.Inputs, target.Inputs) {
			return true
		}
	}
	return false
}

func selectedSHAEntry(
	entry workspace.LookupEntry,
	value string,
) (workspace.LookupEntry, error) {
	if value == "" {
		return workspace.LookupEntry{}, fmt.Errorf("invalid %s lock value", entry.Operation)
	}
	required, options, err := workspace.ParseLookupInputs(entry.Inputs)
	if err != nil {
		return workspace.LookupEntry{}, fmt.Errorf("invalid %s inputs %v: %w", entry.Operation, entry.Inputs, err)
	}

	var operation string
	var selectedInputs []any
	switch entry.Operation {
	case workspace.LockOperationGitLatest:
		if len(required) != 1 {
			return workspace.LookupEntry{}, fmt.Errorf("invalid %s inputs %v", entry.Operation, entry.Inputs)
		}
		operation = workspace.LockOperationGitSHA
		selectedInputs = []any{required[0], value}
	case workspace.LockOperationOCILatest:
		if len(required) != 1 {
			return workspace.LookupEntry{}, fmt.Errorf("invalid %s inputs %v", entry.Operation, entry.Inputs)

View on GitHub (pinned to 82ba2681db)

Solutions

  1. Re-resolve the latest entry so a concrete value is stored
  2. Regenerate the lockfile — the empty value indicates corruption
  3. Validate lock values at load time to catch this earlier
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at core/lockfile_update.go:110 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of dagger/dagger@82ba2681db (2026-09-05). Data as JSON: /api/errors/500e30be0435070b. Report an issue: GitHub.