Repository navigation
functions build via the action drops custom endpoints (satellite_extension.did → service : {}) #108
Description
Summary
Running functions build inside junobuild/juno-action@full produces a satellite_extension.did of service : {} — i.e. a satellite with none of its custom endpoints (defineQuery / defineUpdate). Running the same CLI version locally (or npm i -g @junobuild/cli@… against the project’s own node_modules in CI) builds the full, correct interface.
Because the build still "succeeds", the action goes green and functions upgrade / functions publish then ship a satellite whose custom methods are simply missing. The only symptom is runtime "method not found" errors that only reproduce via CI, never locally — which makes this quite hard to diagnose.
Impact
upgrade.yml/publish.ymlstyle workflows using the action silently deploy a satellite with no custom endpoints.- CI is green; the breakage only surfaces at runtime against the deployed canister.
- The generated
satellite_extension.didisservice : {}instead of listing the endpoints.
Likely root cause
The runtime image bundles its own toolchain that does not match the consuming project’s dependencies:
- Stale
@icp-sdk/bindgen.kit/setup/addonspinsnpm i -g @icp-sdk/bindgen@0.3.0. Projects on a current@junobuild/functions(we’re on0.9.0) pin@icp-sdk/bindgen@^0.4.0. The build appears to use the image’s global bindgen0.3.0, which is too old to enumerate thedefineQuery/defineUpdateexports → it emits an emptyservice. When the build instead runs against the project’snode_modules(with bindgen^0.4.0), the interface is generated correctly. This is the decisive difference. - Sputnik compiled from
main, not a release.docker/download/juno-sourceusesBRANCH=main, so the Sputnik runtime baked into the image is whateverjunomainHEAD was at image-build time — non-reproducible and free to drift from the released@junobuild/functionsthe project imports.
Reproduction
- A satellite with TS serverless functions that exports custom endpoints via
defineQuery/defineUpdatefrom@junobuild/functions@0.9.0, with@icp-sdk/bindgen@^0.4.0in devDependencies. - Build via the action:
- uses: junobuild/juno-action@full with: args: functions build
- Inspect the generated
src/satellite/satellite_extension.did.
Expected: the service lists the defineQuery / defineUpdate endpoints (matching a local juno functions build --lang ts).
Actual: service : {} — every custom endpoint is dropped.
Workaround
Don’t let the action build. Install the pinned CLI in CI and build against the project’s own node_modules:
- run: npm ci
- run: npm i -g @junobuild/cli@0.15.4
- run: juno functions build --lang tsThe action is then only used for steps that don’t build a wasm (e.g. functions publish for its OIDC token exchange, hosting deploy).
Suggested fix
- Make
functions builduse the project’s installed@icp-sdk/bindgen(and other juno deps fromnode_modules) rather than the image’s global pins, or bump the bundled@icp-sdk/bindgeninkit/setup/addonsto match the current CLI /@junobuild/functionsline. - Pin
docker/download/juno-sourceto a released tag instead ofBRANCH=mainso the bundled Sputnik runtime is reproducible and matches a published@junobuild/functions.
Environment
- Action ref:
junobuild/juno-action@full→ imagedocker://junobuild/action:0.7.3 - Bundled in image:
@junobuild/cli@0.15.4(kit/setup/tools),@icp-sdk/bindgen@0.3.0(kit/setup/addons), Sputnik fromjuno@main(docker/download/juno-source) - Project:
@junobuild/functions@0.9.0,@icp-sdk/bindgen@^0.4.0, local CLI0.15.4 - Runner:
ubuntu-latest
Activity
[-]functions build via the action drops custom endpoints (satellite_extension.did → `service : {}`)[/-][+]`functions build` via the action drops custom endpoints (satellite_extension.did → `service : {}`)[/+]peterpeterparker commentedon Jun 5, 2026
Thanks for the issue. I could replicate it in https://github.com/peterpeterparker/juno-action-issue-108.
Summary: the Sputnik WASM built and published using GitHub Actions does not include the custom endpoints - i.e. it does not include the Rust code generated from the TypeScript code.
I could assert that the Rust code seems to be generated (
sputnik_index.rsis present in https://github.com/peterpeterparker/juno-action-issue-108/actions/runs/27017058623/job/79734753820), therefore the issue is likely that the build function instructing Cargo to use the generated module is not defined.I traced this back to the CLI Rust build and patched it in junobuild/cli#515.
Hard to assert the fix without releasing - which I'll do now. 🤞
AntonioVentilii commentedon Jun 5, 2026
@peterpeterparker thank you very much for this!!! We can test it on the field: if you want I test it right away after the release, in my repo, and come back here to give feedbacks.
peterpeterparker commentedon Jun 5, 2026
The new GitHub Action version v0.15.5 should resolve the issue - i.e. it seems that the CLI patch shipped here in #/110 does the trick for the sample project. I cannot replicate the issue anymore.
Can you double check and let me know if it solves it for you as well?
peterpeterparker commentedon Jun 6, 2026
Closing it. If it ain't resolve on your hand @AntonioVentilii please ping me, happy to reopen it and revisit. Thanks for the help!
AntonioVentilii commentedon Jun 6, 2026
All good and perfect! Thank you @peterpeterparker !