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

fix: deploy errors are reported properly #146

Merged
merged 3 commits into from
Jul 19, 2021
Merged

Conversation

shetzel
Copy link
Contributor

@shetzel shetzel commented Jul 13, 2021

What does this PR do?

Deploy errors are in the JSON output but not being displayed in stdout in all cases. This was due to the code assuming that the response contained DeployMessage[] but it can also (unfortunately) return DeployMessage.

Deploy errors are now displayed in the stdout table format.

What issues does this PR fix or reference?

@W-9596635@

Copy link
Contributor

@WillieRuemmele WillieRuemmele left a comment

Choose a reason for hiding this comment

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

nice new formatter tests

@@ -73,15 +78,26 @@ export const getDeployResponse = (
type: DeployResponseType,
overrides?: Partial<MetadataApiDeployStatus>
): MetadataApiDeployStatus => {
const response = { ...baseDeployResponse, ...overrides };
const response = JSON.parse(JSON.stringify({ ...baseDeployResponse, ...overrides })) as MetadataApiDeployStatus;
Copy link
Contributor

Choose a reason for hiding this comment

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

probably worth a comment as to why the parse/stringify is required

@mshanemc mshanemc merged commit 08fbbdd into main Jul 19, 2021
@mshanemc mshanemc deleted the sh/deploy-error-output branch July 19, 2021 23:06
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.

3 participants