Skip to content

CARv2 imports broken when using the HTTP API #9361

@aschmahmann

Description

@aschmahmann

Checklist

Installation method

built from source

Version

Kubo version: 0.16.0
Repo version: 12
System version: amd64/linux
Golang version: go1.18.1

Config

Nothing of interest

Description

Run this command while the daemon is running

kubo/test/sharness/t0054-dag-car-import-export-data$ ipfs dag import lotus_testnet_export_128_v2.car
Error: operation not supported

This is the CAR imported in this test https://github.com/ipfs/kubo/blob/master/test/sharness/t0054-dag-car-import-export.sh#L257.

However, the test doesn't run with the daemon online (which is the most common way in which kubo is run).


IIUC the reason why this is happening is:


There's are a number of ways to handle this since it's basically an API mismatch. I suspect @guseggert, @Jorropo and @rvagg might have some opinions on the right way to do this since it's a similar issue to ipfs/go-datastore#188, golang/go#41198 and involves the go-car v2 internals.

Note for the kubo maintainers: IMO sharness tests should either test when the daemon is running or both when running and not running since having a daemon running is the most commonly use for kubo and we have run into issues like this before where there's success when no HTTP API is used, but failures over the HTTP API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/daysEstimated to take multiple days, but less than a weekexp/expertHaving worked on the specific codebase is importantkind/bugA bug in existing code (including security flaws)topic/rpc-apiIssues related to Kubo RPC API at /api/v0

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions