Open tsandall opened 3 years ago
Sideline: What version have you used there? The doubled policy.wasm should have been resolved by now (#3011).
Some more data, from playing around:
Extracting the bundle into a directory "bndl", running opa run -b bndl
will attempt to retrieve the wasm module from the location of the calling command. So,
module
value to bndl/policy.wasm
, opa run -b bndl
will work;policy.wasm
, only opa run -b .
inside the bndl directory the unzipped location will work.I think it would make sense to interpret wasm module paths as relative to the bundle directory -- so "module":"/policy.wasm"
in directory bndl
refers to the policy.wasm
in directory bndl
. ðŸ’
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days.
The wasm entrypoint validation rejects unzipped bundle because the manifest is written w/ absolute filepaths:
A bundle containing a single file (x.rego):
Build the bundle:
Unzip the bundle:
Attempt to run inside the directory where the bundle was unzipped to:
Inspecting the manifest reveals the problem:
It's unclear if we need to use absolute paths in the manifest. If not, we should avoid it so that bundles can be unzipped and run through the OPA toolchain without issue.