Skip to content
This repository was archived by the owner on Apr 13, 2020. It is now read-only.

[FEATURE] Add Specific error code for infra generate command#471

Merged
dennisseah merged 7 commits intomasterfrom
errorChainForInfraGenerateCmd
Mar 30, 2020
Merged

[FEATURE] Add Specific error code for infra generate command#471
dennisseah merged 7 commits intomasterfrom
errorChainForInfraGenerateCmd

Conversation

@dennisseah
Copy link
Collaborator

closes microsoft/bedrock#1277

getting messages like this

$ ts-node src/index.ts infra generate 
error:   
code: 1000
message: infra-generate-cmd-failed: Infra generate Command was not successfully executed.
  code: 1010
  message: infra-defn-yaml-not-found: definition.yaml was not found in /Users/veseah/git/spk

@dennisseah
Copy link
Collaborator Author

@yradsmikham, @NathanielRose there are two TOFIX in the changes that I cannot figure out, can you pls help?

// TOFIX: are these warnings? if yes, please write some comments.

Copy link
Contributor

@jmspring jmspring left a comment

Choose a reason for hiding this comment

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

Lgtm

checkTfvars(parentDirectory, BACKEND_TFVARS);
writeTfvarsFile(backendTfvarsObject, parentDirectory, BACKEND_TFVARS);
} else {
// TOFIX: are these warnings? if yes, please write some comments.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is also another valid warning.

Copy link
Collaborator

@yradsmikham yradsmikham Mar 30, 2020

Choose a reason for hiding this comment

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

Not all templates will require a remote backend (i.e Bedrock's azure-simple). Keep in mind, that if a remote backend is not configured for a template, it will be impossible to be able to use spk infra in a pipeline, but this can still work locally.

Copy link
Collaborator

@NathanielRose NathanielRose left a comment

Choose a reason for hiding this comment

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

LGTM

@dennisseah
Copy link
Collaborator Author

@yradsmikham and @NathanielRose , thank so much

@dennisseah dennisseah merged commit a5b5a26 into master Mar 30, 2020
@dennisseah dennisseah deleted the errorChainForInfraGenerateCmd branch March 30, 2020 23:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specific error codes for infra generator command

4 participants