Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docs): add nodeadm wasm targets to call from docs #2083

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

ndbaker1
Copy link
Member

@ndbaker1 ndbaker1 commented Dec 6, 2024

Issue #, if available:

Description of changes:

It would be helpful to be able to test a NodeConfig straight from the browser without installing any tools.

This PR adds a WebAssembly package containing nodeadm's config parsing hook and provides a minimal editor that users can paste their config into.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Testing Done

deployed to my fork's ghpages: https://ndbaker1.github.io/amazon-eks-ami/nodeadm/doc/playground/

rm -rf ./site
pushd nodeadm && make wasm && popd
mkdir -p ./site/assets/javascripts && cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" ./site/assets/javascripts/
mkdir -p site/assets/wasm && cp nodeadm/_bin/nodeadm.wasm ./site/assets/wasm
mkdocs gh-deploy -r ndbaker1 --dirty --no-history --force

See this guide for recommended testing for PRs. Some tests may not apply. Completing tests and providing additional validation steps are not required, but it is recommended and may reduce review time and time to merge.

Copy link
Member

@cartermckinnon cartermckinnon left a comment

Choose a reason for hiding this comment

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

💯

nodeadm/wasm/assets/wasm_exec.js Outdated Show resolved Hide resolved
nodeadm/wasm/assets/index.html Outdated Show resolved Hide resolved
nodeadm/wasm/assets/main.wasm Outdated Show resolved Hide resolved
nodeadm/wasm/check/main.go Outdated Show resolved Hide resolved
@ndbaker1 ndbaker1 force-pushed the wasm-checker branch 2 times, most recently from 034a286 to d1367ca Compare December 10, 2024 01:14
@ndbaker1 ndbaker1 changed the title experiment: compiling wasm for use in docs feat(docs): add nodeadm wasm targets to call from docs Dec 10, 2024
@ndbaker1 ndbaker1 force-pushed the wasm-checker branch 6 times, most recently from e3d663c to 010bf46 Compare December 10, 2024 07:01
@ndbaker1 ndbaker1 marked this pull request as ready for review December 10, 2024 07:05
@ndbaker1
Copy link
Member Author

ndbaker1 commented Dec 10, 2024

im somewhat happy with the functionality now :)
feel free to take a closer look @cartermckinnon

Copy link
Member

@cartermckinnon cartermckinnon left a comment

Choose a reason for hiding this comment

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

One small thing!

.github/workflows/deploy-docs.yaml Show resolved Hide resolved
.github/workflows/deploy-docs.yaml Outdated Show resolved Hide resolved
@cartermckinnon cartermckinnon merged commit 86bd7fe into awslabs:main Dec 11, 2024
11 checks passed
@ndbaker1 ndbaker1 deleted the wasm-checker branch December 11, 2024 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants