rust-buildkit
rust-buildkit copied to clipboard
Duplicated input indices
I am by no means an expert and just started reading into BuildKit and the inner workings of LLB but this looks not quite right:
The input is listed twice with the same index. In this specific case (buildkit-llb scratch
example from current master) it doesn't cause any issues due to the equal digest but in the case of the highly-parallel
example two different digests are occupying the same input index. I noticed some funky business with the index matching going on earlier and this is likely the cause for that.
Might be worth a look :)
{
"Op": {
"inputs": [
{
"digest": "sha256:4db4c9e0ad6c39235aa82237c23fc85ce11c5e1069cd86442c69019b66906f3b",
"index": 0
},
{
"digest": "sha256:4db4c9e0ad6c39235aa82237c23fc85ce11c5e1069cd86442c69019b66906f3b",
"index": 0
}
],
"Op": {
"file": {
"actions": [
{
"input": 1,
"secondaryInput": 0,
"output": 0,
"Action": {
"copy": {
"src": "/file0",
"dest": "/file1",
"mode": -1,
"timestamp": -1
}
}
},
{
"input": 2,
"secondaryInput": 2,
"output": 1,
"Action": {
"copy": {
"src": "/file0",
"dest": "/file2",
"mode": -1,
"timestamp": -1
}
}
}
]
}
}
},
"Digest": "sha256:2debf72ab9472756432c19c2dd418b46b394ee8e5877ab8feae84bdd4da3ff14",
"OpMetadata": {
"description": {
"llb.customname": "do multiple file system manipulations"
},
"caps": {
"file.base": true
}
}
}
Command that produced this output:
cargo run --example=scratch | buildctl debug dump-llb | jq . | less