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

pubsys: only create tokio runtime when needed #1034

Merged
merged 1 commit into from Aug 13, 2020

Conversation

tjkirch
Copy link
Contributor

@tjkirch tjkirch commented Aug 13, 2020

tough-ssm creates its own tokio runtime for making SSM calls, so we can't use
it inside our own tokio runtime. This change removes the general
[tokio::main] annotation that creates a runtime for the entire app, and
instead only creates a runtime inside the ami subcommand that needs one. We
can switch back to the annotation when tough-ssm moves to an async interface.

Testing done:

Created a repo using an SSM key, and created an AMI, and confirmed that both look OK.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

tough-ssm creates its own tokio runtime for making SSM calls, so we can't use
it inside our own tokio runtime.  This change removes the general
`[tokio::main]` annotation that creates a runtime for the entire app, and
instead only creates a runtime inside the `ami` subcommand that needs one.  We
can switch back to the annotation when tough-ssm moves to an async interface.
@tjkirch tjkirch merged commit e3c2495 into bottlerocket-os:develop Aug 13, 2020
@tjkirch tjkirch deleted the pubsys-tokio branch August 13, 2020 00:14
etungsten added a commit to etungsten/bottlerocket that referenced this pull request Aug 13, 2020
etungsten added a commit that referenced this pull request Aug 13, 2020
Copy link
Contributor

@zmrow zmrow left a comment

Choose a reason for hiding this comment

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

Woo!

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.

None yet

5 participants