You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
client.RecvTar() (in spread/client.go) tries hard to treat each artifact name as literal string (including shell-quoting)
The tar command executed on the test machine to pack the files will be something along the lines of /bin/tar cJ --sort=name --ignore-failed-read -- 'example_1.0_${PLATFORM}.snap'
As a workaround (because client.RecvTar() uses --ignore-failed-read) one can (try to) list ALL possible values for the artifacts, and spread will ignore invalid artifacts:
Because of --ignore-failed-read, Spread won't really complain about any mistyped and unmatched file names, and silently ignore any files it cannot find. Of course, this way of maintaining artifact names is error prone and tedious, as when e.g. a new architecture is added in the future (e.g. riscv64), it's not enough to add a new system to the list of systems for the lxd backend, but every task has to have its artifact list expanded.
The text was updated successfully, but these errors were encountered:
Assuming my
spread.yaml
contains the following definition:In a task, I might want to pack a specific artifact that's named after system-specific environment variables:
Also, no wildcard expansion is possible, which could in some cases alleviate the problem of having to resort to environment variables):
The problem seems to be that the list of artifacts is treated as literal string list when files are packed on the test machine:
type Task struct
inspread/project.go
(Artifacts [] string
)job.Task.Artifacts
is accessed infetchArtifacts()
(spread/runner.go
)fetchArtifacts()
callsclient.RecvTar(remoteDir, job.Task.Artifacts, tarw)
client.RecvTar()
(inspread/client.go
) tries hard to treat each artifact name as literal string (including shell-quoting)tar
command executed on the test machine to pack the files will be something along the lines of/bin/tar cJ --sort=name --ignore-failed-read -- 'example_1.0_${PLATFORM}.snap'
As a workaround (because
client.RecvTar()
uses--ignore-failed-read
) one can (try to) list ALL possible values for the artifacts, and spread will ignore invalid artifacts:Because of
--ignore-failed-read
, Spread won't really complain about any mistyped and unmatched file names, and silently ignore any files it cannot find. Of course, this way of maintaining artifact names is error prone and tedious, as when e.g. a new architecture is added in the future (e.g.riscv64
), it's not enough to add a new system to the list of systems for the lxd backend, but every task has to have its artifact list expanded.The text was updated successfully, but these errors were encountered: