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(runtimes): support JSII_NODE setting #4024

Merged
merged 6 commits into from
Mar 22, 2023
Merged

feat(runtimes): support JSII_NODE setting #4024

merged 6 commits into from
Mar 22, 2023

Conversation

RomainMuller
Copy link
Contributor

@RomainMuller RomainMuller commented Mar 22, 2023

Users can customize the node runtime used by the jsii runtime libraries by providing the JSII_NODE environment variable.

Additionally, this corrects how the child process is spawned in Java so that JSII_NODE and JSII_RUNTIME can contain spaces (previously, this would result in a spawn error). Added a test to verify the various scenarios work as intended.

Fixes #4009


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Users can customize the `node` runtime used by the jsii runtime for java
by providing the `JSII_NODE` environment variable. Additionally, this
corrects how the child process is spawned so that `JSII_NODE` and
`JSII_RUNTIME` can contain spaces (previously, this would result in a
spawn error). Added a test to verify the various scenarios work as
intended.

Fixes #4009
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Mar 22, 2023
@RomainMuller RomainMuller changed the title feat(java): support JSII_NODE setting feat(runtimes): support JSII_NODE setting Mar 22, 2023
public void withNoCustomization() {
final JsiiRuntime runtime = new JsiiRuntime(null, null);
runtime.getClient().createObject("Object", Collections.emptyList(), Collections.emptyList(), Collections.emptyList());
runtime.terminate();
Copy link

Choose a reason for hiding this comment

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

[nit] runtime could be a JsiiRuntimeTest class member and this line fitted into https://junit.org/junit5/docs/5.0.2/api/org/junit/jupiter/api/AfterEach.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah but it's not that much duplication and it makes the tests self-contained...

@mergify
Copy link
Contributor

mergify bot commented Mar 22, 2023

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label Mar 22, 2023
@mergify
Copy link
Contributor

mergify bot commented Mar 22, 2023

Merging (with squash)...

@mergify
Copy link
Contributor

mergify bot commented Mar 22, 2023

Merging (with squash)...

@mergify
Copy link
Contributor

mergify bot commented Mar 22, 2023

Merging (with squash)...

@mergify mergify bot merged commit f8f2f13 into main Mar 22, 2023
@mergify mergify bot deleted the rmuller/JSII_NODE branch March 22, 2023 20:14
@mergify mergify bot removed the pr/ready-to-merge This PR is ready to be merged. label Mar 22, 2023
@osdrv osdrv mentioned this pull request Mar 28, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants