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

Use updated output with smithy build and diff #1712

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

mtdowling
Copy link
Member

Smithy diff and build now uses the pretty validation output and color theming options.

Because Styles were copied and repated multiple times, I introduced a ColorTheme class to store reusable styles. This isn't a swappable color scheme system, but could be evolved into one in the future if needed.

For Smithy Diff:

The old and new models are both validated, but only build-failing errors are shown. When the original model fails, a label is added before ERROR/DANGER to show it's on the OLD model. When the new model fails, it shows a NEW label.

When running the diff with two valid models, events have a label of DIFF. The events shown here use the --severity option and default to WARNING when not set.

For Smithy Build:

Each projection output is contained in a titled section using a colored title to match whether the projection passed or failed. Any events encountered during the projection are emitted using the updated styling and have a prefix label using the projection name.

Smithy build success output:
image

Smithy build, invalid source models (same as validation output):
image

Smithy build, invalid projection:
image

Smithy diff, old model issue:
image

Smithy diff, new model issue:
image

Smithy diff issue:
image

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

@mtdowling mtdowling force-pushed the improve-cli-colors branch from 670e5d9 to 95f7c59 Compare April 3, 2023 21:41
@mtdowling mtdowling changed the base branch from improve-cli-colors to cli-update-staging April 3, 2023 21:42
Smithy diff and build now uses the pretty validation output and
color theming options.

Because Styles were copied and repated multiple times, I introduced
a ColorTheme class to store reusable styles. This isn't a swappable
color scheme system, but could be evolved into one in the future if
needed.

For Smithy Diff:

The old and new models are both validated, but only build-failing
errors are shown. When the original model fails, a label is added
before ERROR/DANGER to show it's on the OLD model. When the new
model fails, it shows a NEW label.

When running the diff with two valid models, events have a label
of DIFF. The events shown here use the --severity option and default
to WARNING when not set.

For Smithy Build:

Each projection output is contained in a titled section using a
colored title to match whether the projection passed or failed.
Any events encountered during the projection are emitted using the
updated styling and have a prefix label using the projection name.
@mtdowling mtdowling force-pushed the update-cli-output-for-diff-and-build branch from 22d645d to aa66591 Compare April 3, 2023 21:43
@mtdowling mtdowling merged commit f00caa9 into cli-update-staging Apr 3, 2023
@mtdowling mtdowling deleted the update-cli-output-for-diff-and-build branch April 7, 2023 03:30
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