crashappsec / chalk

Chalk allows you to follow code from development, through builds and into production.
https://crashoverride.com/
GNU General Public License v3.0
322 stars 11 forks source link

feat: allow to download chalk by multiple urls #294

Closed miki725 closed 1 month ago

miki725 commented 1 month ago

Issue

As setup-chalk-action allows to download chalks pinned by their commit build, by only downloading chalk from a single release url, it will potentially break multi-platform builds. By attempting to download from a release url first and if failed downloading from a commit build it will allow chalk to fully function both with release and pre-release builds without requiring to update user-configs.

Testing

➜ make tests args="test_docker.py::test_multiplatform_build[valid/sample_1-True]"
miki725 commented 1 month ago

when using pre-release build show up as:


trace: docker: no chalk binary found for TARGETPLATFORM (linux/arm64). Attempting to download chalk binary.
trace: docker: downloading chalk binary from: https://dl.crashoverride.run/chalk/chalk-0.3.6-dev-linux-arm64
trace: docker: while downloading chalk binary recieved: 404 Not Found
trace: docker: downloading chalk binary from: https://dl.crashoverride.run/chalk-commit-builds/chalk-3552c319e21f4f402854e81e778802a4e07a5a7c-linux-arm64
trace: docker: saved downloaded chalk binary for linux/arm64 to /home/runner/.local/chalk/bin/linux/arm64/chalk```
miki725 commented 1 month ago

Better for the exception message to mention download_arch_binary?

not sure. that exception can bubble up to the user. dont think a lot of error messages show actions to users like "do X" but we can evaluate that in the long term what kind of messaging is useful on errors (not trace logs)