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(go): embed jsii runtime application #2066

Merged
merged 4 commits into from
Oct 2, 2020
Merged

Conversation

RomainMuller
Copy link
Contributor

Bundles the @jsii/runtime application within the go runtime library.
This ships the necessary files as byte slices in
embeddedruntime.generated.go. The client initializer will un-pack
this into a temporary directory (cleaned up by client.Close()) and run
that, unless the user specified the JSII_RUNTIME environment variable
(in which case, that command is used instead).

The client also assigns JSII_AGENT to a string representing the go
stack version used during build (runtime.Version()), the operating
system under which the application is running and the CPU architecture.
The string is formatted as VERSION/OS/ARCH.

A new runtime.go was introduced that manages a singleton client
instance and exports a Close function that can be invoked to
gracefully clean up the child process.


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

Bundles the `@jsii/runtime` application within the go runtime library.
This ships the necessary files as byte slices in
`embeddedruntime.generated.go`. The `client` initializer will un-pack
this into a temporary directory (cleaned up by `client.Close()`) and run
that, unless the user specified the `JSII_RUNTIME` environment variable
(in which case, that command is used instead).

The `client` also assigns `JSII_AGENT` to a string representing the `go`
stack version used during build (`runtime.Version()`), the operating
system under which the application is running and the CPU architecture.
The string is formatted as `VERSION/OS/ARCH`.

A new `runtime.go` was introduced that manages a singleton `client`
instance and exports a `Close` function that can be invoked to
gracefully clean up the child process.
@RomainMuller RomainMuller added language/go Regarding GoLang bindings effort/small Small work item – less than a day of effort module/runtime Issues affecting the `jsii-runtime` contribution/core This is a PR that came from AWS. labels Oct 1, 2020
@RomainMuller RomainMuller self-assigned this Oct 1, 2020
Copy link
Contributor

@SoManyHs SoManyHs left a comment

Choose a reason for hiding this comment

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

Just a few small comments. Are we saying that this will partially replace #2046?

@SoManyHs SoManyHs added this to the GoLang Alpha milestone Oct 2, 2020
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-Blkkw9bQFn8A
  • Commit ID: d746f6e
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Oct 2, 2020

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 Oct 2, 2020
@mergify mergify bot merged commit 85764de into master Oct 2, 2020
@mergify mergify bot deleted the rmuller/go-embedded-runtime branch October 2, 2020 21:53
@mergify
Copy link
Contributor

mergify bot commented Oct 2, 2020

Merging (with squash)...

@mergify mergify bot removed the pr/ready-to-merge This PR is ready to be merged. label Oct 2, 2020
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. effort/small Small work item – less than a day of effort language/go Regarding GoLang bindings module/runtime Issues affecting the `jsii-runtime`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants