jdx/mise · error

unsupported task cache archive entry type

Error message

unsupported task cache archive entry type

What it means

When archiving a task output into the CAS, only regular files, directories, and symlinks are supported archive entry types. Any other tar/entry type (device nodes, FIFOs, sockets, hardlinks depending on the reader) is rejected because the remote cache node model cannot represent it.

Source

Thrown at src/task/task_cache_store.rs:610

                digest: CacheDigest {
                    algorithm: "blake3".into(),
                    hash: hasher.finalize().to_hex().to_string(),
                    size,
                },
                executable: mode & 0o111 != 0,
                mode,
                file: temporary,
            }
        } else if entry_type == EntryType::Symlink {
            let target = entry
                .header()
                .link_name()
                .ok_or_else(|| eyre!("remote cache symlink is missing its target"))?
                .into_owned();
            validate_cache_symlink_target(&entry_path, &target)?;
            ArchiveNode::Symlink { mode, target }
        } else {
            bail!("unsupported task cache archive entry type");
        };
        if nodes.insert(entry_path.clone(), node).is_some() {
            bail!("task cache archive contains duplicate paths");
        }
        let mut parent = entry_path.parent();
        while let Some(path) = parent {
            nodes
                .entry(path.to_path_buf())
                .or_insert(ArchiveNode::Directory { mode: 0o755 });
            parent = path.parent();
        }
    }

    fn build_directory(
        path: &Path,
        nodes: &BTreeMap<PathBuf, ArchiveNode>,
        directory_uploads: &mut Vec<BlobUpload>,
    ) -> Result<CacheDigest> {

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Exclude special files from the task's declared outputs (add ignore patterns or write them elsewhere).
  2. Change the producing tool to create a regular file or symlink instead of a FIFO/socket in the output directory.
  3. If hardlinks are intended, change the archiving step to dereference/copy them as regular files.

Example fix

// before
mkfifo build/progress.fifo   # included in cached outputs
// after
mkfifo /tmp/progress.fifo    # keep special files out of cached outputs
Defensive patterns

Strategy: validation

Validate before calling

fn entry_type_cacheable(ft: std::fs::FileType) -> bool {
    ft.is_file() || ft.is_dir() || ft.is_symlink()
}

Type guard

fn cacheable_entry(md: &std::fs::Metadata) -> Option<&std::fs::Metadata> {
    let ft = md.file_type();
    (ft.is_file() || ft.is_dir() || ft.is_symlink()).then_some(md)
}

Try / catch

match commit(&out).await {
    Err(e) if e.to_string().contains("unsupported task cache archive entry type") => {
        // exclude the special file and retry, or copy it to a regular file
    }
    r => r?,
}

Prevention

When it happens

Trigger: commit → archive_to_cas walking an output tree (or reading an archive) containing a special file: FIFO, Unix socket, device node, or other non-file/dir/symlink entry type.

Common situations: Task outputs that include files created by test harnesses or servers (e.g. unix sockets in build dirs), /dev node copies, or archives built with tools that embed hardlink/device entries.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/d3a32fe7a00333ce. Report an issue: GitHub.