Skip to content

Conversation

esosaoh
Copy link
Contributor

@esosaoh esosaoh commented Sep 1, 2025

Description

Fix kubewarden/policy-sdk-js#190

Test

To test this pull request, you can run the following commands:

Additional Information

Tradeoff

Potential improvement

@esosaoh esosaoh requested a review from a team as a code owner September 1, 2025 04:29
@github-project-automation github-project-automation bot moved this to Pending review in Kubewarden Sep 1, 2025
Copy link

netlify bot commented Sep 1, 2025

Deploy Preview for docs-kubewarden-io ready!

Name Link
🔨 Latest commit 38e002d
🔍 Latest deploy log https://app.netlify.com/projects/docs-kubewarden-io/deploys/68d0a91c0c7b2700083bbe03
😎 Deploy Preview https://deploy-preview-663--docs-kubewarden-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jhkrug jhkrug added area/documentation Improvements or additions to documentation and removed area/documentation Improvements or additions to documentation labels Sep 3, 2025
Copy link
Contributor

@jhkrug jhkrug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor few suggestions for consideration. From a few sources. I'll have another run through when they have been incorporated. Thank you. Looking good.

esosaoh and others added 5 commits September 3, 2025 22:21
Co-authored-by: Daria Vladykina <[email protected]>
Signed-off-by: Esosa Ohangbon <[email protected]>
Co-authored-by: Daria Vladykina <[email protected]>
Signed-off-by: Esosa Ohangbon <[email protected]>
Co-authored-by: Daria Vladykina <[email protected]>
Signed-off-by: Esosa Ohangbon <[email protected]>
Co-authored-by: Daria Vladykina <[email protected]>
Signed-off-by: Esosa Ohangbon <[email protected]>
Co-authored-by: Daria Vladykina <[email protected]>
Signed-off-by: Esosa Ohangbon <[email protected]>
@esosaoh
Copy link
Contributor Author

esosaoh commented Sep 18, 2025

done! @jhkrug

@jhkrug jhkrug moved this from In Progress to Pending review in Kubewarden Sep 19, 2025
Copy link
Contributor

@jhkrug jhkrug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @esosaoh. I think this is the last set of changes. Just all for consistency and taking note of some terminology suggestions from the checkers. Nearly there. Thanks!

Copy link
Contributor

@jhkrug jhkrug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't get the tutorial to work at the moment.

## Testing

Provided the necessary tools are in place, the `make all` command builds the `annotated-policy.wasm` target. The command `make e2e` runs tests using `bats` with `kwctl`.

Copy link
Contributor

@jhkrug jhkrug Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When trying make all I am unsuccessful. Any suggestions?

Using

[~/projects/suse/kubewarden/testing/test-js-policy][main|u=]
‽ node --version
v24.0.1
[~/projects/suse/kubewarden/testing/test-js-policy][main|u=]
‽ javy --version
javy 6.0.0
[~/projects/suse/kubewarden/testing/test-js-policy][main|u=]
‽ kwctl --version
kwctl 1.28.1

Use the `info` command to display system information.

[~/projects/suse/kubewarden/testing/test-js-policy][main|u=]
‽ bats --version
Bats 1.12.0
[~/projects/suse/kubewarden/testing/test-js-policy][main|u=]
‽

I get:

⸘ git remote -v
origin	[email protected]:jhkrug/test-js-policy.git (fetch)
origin	[email protected]:jhkrug/test-js-policy.git (push)
[~/projects/suse/kubewarden/testing/test-js-policy][main|u=]
⸘ make clean
npm cache clean --force
npm warn using --force Recommended protections disabled.
rm -f policy.wasm annotated-policy.wasm
rm -rf dist dist-ts node_modules package-lock.json
[~/projects/suse/kubewarden/testing/test-js-policy][main *|u=]
‽ make all
npm install
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported

added 399 packages, and audited 400 packages in 14s

59 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm run build

> [email protected] build
> npx webpack --config webpack.config.cjs

asset bundled.js 5.52 KiB [emitted] [minimized] (name: main)
asset types.d.ts 430 bytes [emitted]
asset index.d.ts 11 bytes [emitted]
./src/index.ts 3.84 KiB [built] [code generated]
./node_modules/kubewarden-policy-sdk/dist/bundle.js 3.85 KiB [built] [code generated]
webpack 5.101.3 compiled successfully in 1530 ms
npm install

added 1 package, and audited 401 packages in 996ms

59 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
javy build dist/bundled.js -C plugin=node_modules/kubewarden-policy-sdk/plugin/javy-plugin-kubewarden.wasm -o policy.wasm
Error: Could not process plugin: Using unsupported legacy plugin API
make: *** [Makefile:16: policy.wasm] Error 1
[~/projects/suse/kubewarden/testing/test-js-policy][main|u=]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@esosaoh can you please check and list the needed changes for this to work?

@jhkrug jhkrug moved this from Pending review to In Progress in Kubewarden Sep 19, 2025
esosaoh and others added 14 commits September 21, 2025 21:34
@jvanz jvanz requested review from jhkrug and viccuad September 24, 2025 12:37
@jvanz jvanz moved this from In Progress to Pending review in Kubewarden Sep 24, 2025
@viccuad viccuad moved this from Pending review to In Progress in Kubewarden Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Improvements or additions to documentation
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

docs: Add tutorial for policy-sdk-js
6 participants