Closed simskij closed 2 years ago
Libraries are not up to date with their remote counterparts. If this was
not intentional, run charmcraft fetch-libs
and commit the updated libs
to your PR branch.
I wonder if this is also the cause for the unit test failure here (where the value is not mocked).
Should we fail back to x86_64
? It's only arm64
and x86_64
, and an equivalent to:
switch(runtime.GOARCH); {
case "arm64":
binary = "cos-tool-arm64"
default:
binary = "cos-tool-amd64"
}
Is probably a sane enough default
I wonder if this is also the cause for the unit test failure here (where the value is not mocked).
Should we fail back to
x86_64
? It's onlyarm64
andx86_64
, and an equivalent to:switch(runtime.GOARCH); { case "arm64": binary = "cos-tool-arm64" default: binary = "cos-tool-amd64" }
Is probably a sane enough default
I think it's probably good that it breaks if the user were to use some other fringe architecture, allowing them to raise an issue about having the arch added instead of troubleshooting for ages.
In that case, it's probably worth using the Run-On-Arch action to ensure that these are actually set.
Whatever scenario in the GH runners (Google hasn't turned up much) which leads to flaky architecture detection should be squashed unless we intend to globally patch it at the top of every unit test. Or use Run-On-Arch
Libraries are not up to date with their remote counterparts. If this was
not intentional, run charmcraft fetch-libs
and commit the updated libs
to your PR branch.
the current call to
platform.processor
is not reliable and quite frequently returns"unknown"
, for instance in the CI, or on arch linux. this patch replaces all occurrences with calls toplatform.machine
which should be way more reliable.