Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
add Preflight Validate API support #4329
base: main
Are you sure you want to change the base?
add Preflight Validate API support #4329
Changes from 8 commits
4b4f6a3
4c267fd
1dd2246
24bef4f
7392da7
5fd5d08
4531513
d955428
59c65f0
e17c1db
932cba3
4ae5dc1
7bab2e2
5ad148b
0aba62a
ca49e0d
3264e88
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to do this? If we get an HttpError we should be able to case the error to ARM http error to parse the error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a workaround for a related bug here: Azure/azure-sdk-for-go#23350
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this basically captures the same ARM errors that we use in the
AzureDeploymentError
object that we already have. Can we reuse that one instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use this same
createDeploymentError()
func in the deployment stack use cases as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is great that the validate API exists but I am concerned that this may cause considerable time delay during deployments.
Do we have an idea of the amount of extra time the validations will take especially against more complex & nested deployments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hemarina and I had spoke awhile back about this while she was implementing -- I think this is pretty lightweight (<3s) from what she showed me, but it'd be great to test this out and gather the numbers with a few different templates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is lightweight as Wei said but I'll run some tests to confirm the exact number or ask manual test team to run all todo templates.
Check failure on line 260 in cli/azd/pkg/infra/scope.go
GitHub Actions / azd-lint (ubuntu-latest)
Check failure on line 260 in cli/azd/pkg/infra/scope.go
GitHub Actions / azd-lint (windows-latest)