Open evan-gray opened 4 months ago
Oh, and bonus... the tilt CI step occasionally fails on RUN NODE_OPTIONS="" ignite generate vuex --proto-all-modules
with the following:
error while running command /tmp/sta3578825123 sta --module-name-index -1 -p /tmp/gen-js-openapi-module-spec2462645117/apidocs.swagger.json -o /apps/wormchain/vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module -n rest.ts: : fork/exec /tmp/sta3578825123: text file busy
Description and context
The
.proto
TypeScript generation used forwormchain
results in non-deterministic results, particularly the order of imports can change with multiple subsequent runs ofmake vue
. This prevents the generated output from being committed and checked in CI, like the other.proto
generation in this repo, like this: https://github.com/wormhole-foundation/wormhole/blob/c2496cd2afd8867ad2df08fd4dc7f3d0d681f4af/.github/workflows/build.yml#L300-L304The
ignite generate vuex
command has since been deprecated and allegedly its replacement,ts-client
fixes this issue.However, attempting to use a newer version of
ignite
that contains the command results in the following error:Steps to reproduce
Current state
Run
make vue
and stage the results, then runmake clean && make vue
again (this may have to be repeated multiple times). Eventually the resulting output will differ. You can also run locally, commit the changes, and compare in multiple CI runs.Recent ignite CLI
Change
wormchain/Dockerfile.proto
's base image toFROM ignitehq/cli:v28.5.0@sha256:2d4d1ab3af5c8a3ec004315de9f8235bc39edab44e4146efd90bebc9cc9016fa AS base
and thegenerate vuex
line togenerate ts-client
. Runmake vue
and watch it fail with the aforementioned error.Experienced behavior
Sadness.
Expected behavior
Deterministic build output.
Solution recommendation
Perhaps if / when Wormchain is updated to a newer version of the Cosmos SDK, a newer version of ignite with the
ts-client
command could be used (though ignite is only used for codegen). Or, does ignite really need to be used for this at all?