Azure / iotedge

The IoT Edge OSS project
MIT License
1.46k stars 459 forks source link

API Proxy module can't be build with included build.sh #7368

Open samuliHeikkinen opened 1 month ago

samuliHeikkinen commented 1 month ago

Expected Behavior

Running ./edge-modules/api-proxy-module/build.sh should build the module.

Current Behavior

After running the script it fails to OS Error 13 when trying to create a tmp file to /opt/rust/rustup

Steps to Reproduce

Provide a detailed set of steps to reproduce the bug.

  1. Checkout iotedge repo
  2. Run ./edge-modules/api-proxy-module/build.sh from the repository root

Device Information

Logs

Additional Information

This is due to build.sh using ekidd/rust-musl-builder without a version tag which defaults to latest which in turn has had massive changes (remove of ARM support).

david-emakenemi commented 1 month ago

Hey @samuliHeikkinen , can you share the logs for the Edge Hub and Edge Agent? Please make sure to redact any sensitive info. cc @nlcamp

samuliHeikkinen commented 1 month ago

Hey @david-emakenemi , you mean info of the running containers or the builds? As per repo, the API Proxy module should be able to be compiled without compiling the whole project.

This build issue also blocks the use of custom nginx config as the desired properties way won't work because template is over 4096 bytes while encoded to BASE64 which is over the maximum for desired property tags.

samuliHeikkinen commented 1 month ago

It is also worth mentioning that https://github.com/emk/rust-musl-builder which is used as the base for the module image for amd64 is effectively unmaintained.

samuliHeikkinen commented 1 month ago

Workaround for this is to build the ApiProxyModule first with ./scripts/linux/buildAPIProxy.sh so even though the ./edge-modules/api-proxy-module/build.sh still fails with the rust container to permissions, the build succeeds as we build it before.