Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update to latest deps and make runable #2

Merged
merged 1 commit into from
May 6, 2020

Conversation

mikhailshilkov
Copy link
Member

  • Go mod
  • Update to pulumi 2.0
  • Add new methods to the provider
  • Add resource groups
  • Default to az CLI
  • Improve some error handling

_, err = k.azureGet(ctx, id)
if resErr, ok := err.(azure.RequestError); ok && resErr.StatusCode == 404 {
_, err = k.azureGet(ctx, id, res.apiVersion)
if err == nil {
return nil, fmt.Errorf("cannot create already existing resource %v", id)

Choose a reason for hiding this comment

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

Why do we return his on err == nil now?

Copy link
Member Author

@mikhailshilkov mikhailshilkov May 3, 2020

Choose a reason for hiding this comment

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

  1. We are in Create, trying to check whether the resource-to-be-created already exists.
  2. We make a GET on its endpoint
  3. If we get no error, that means 200, that means it already exists.
  4. We can't create it => error.

I think it used to "work" because the type conversion was wrong.

@mikhailshilkov mikhailshilkov merged commit 740d3ae into master May 6, 2020
@pulumi-bot pulumi-bot deleted the mikhailshilkov/revive branch May 6, 2020 06:51
thomas11 added a commit that referenced this pull request Jan 8, 2025
Skip the flattening of nested properties indicated by
[x-ms-client-flatten](https://github.com/Azure/autorest/blob/main/docs/extensions/readme.md#x-ms-client-flatten)
if it would lead to overwriting a property, creating incorrect schema
and SDKs. This case happens when inner and outer property have the same
name. For a report on all occurrences see #3013.

This change is breaking and could therefore only be applied to v3 of the
provider.

The PR is written to be reviewed commit by commit. It supersedes the
previous #3801. **I recommend hiding whitespace when reviewing since the
level of indentation of otherwise unaffected code changed.**

Resolves #3195
@pulumi-bot
Copy link
Contributor

This PR has been shipped in release v2.82.0.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants