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

Update smithy-build to be streaming #211

Merged
merged 1 commit into from
Nov 21, 2019
Merged

Conversation

mtdowling
Copy link
Member

smithy-build used to load every model from every projection into memory
at once. This was not ideal since some use cases utilize hundreds of
projections. For example, in AWS SDKs, we create a projection for every
AWS service, which is hundreds of them with tens-of-thousands of shapes
and operations.

This commit updates smithy-build to support two modes: in-memory and
streaming. The in-memory mode is useful for testing or one-off
integrations. The streaming mode is useful for actually executing
smithy-build from the CLI so that results are outputted to stdout as
they happen and not all models are loaded into memory.

The CLI was updated to significantly change its output to show more
information about things that go wrong and print more statistics. Every
projection and plugin is attempted to be executed -- the CLI previously
failed on the first exception.

Finally, executing tasks is now done with an ExecutorService rather than
parallel streams to have more control over task execution.

Issue #, if available:

Description of changes:

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

smithy-build used to load every model from every projection into memory
at once. This was not ideal since some use cases utilize hundreds of
projections. For example, in AWS SDKs, we create a projection for every
AWS service, which is hundreds of them with tens-of-thousands of shapes
and operations.

This commit updates smithy-build to support two modes: in-memory and
streaming. The in-memory mode is useful for testing or one-off
integrations. The streaming mode is useful for actually executing
smithy-build from the CLI so that results are outputted to stdout as
they happen and not all models are loaded into memory.

The CLI was updated to significantly change its output to show more
information about things that go wrong and print more statistics. Every
projection and plugin is attempted to be executed -- the CLI previously
failed on the first exception.

Finally, executing tasks is now done with an ExecutorService rather than
parallel streams to have more control over task execution.
}
}

private void executeParallelProjections(
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

@mtdowling mtdowling merged commit e73a5ee into master Nov 21, 2019
@mtdowling mtdowling deleted the improve-smithy-build branch December 10, 2019 20:45
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