Skip to content

Update to latest deps and make runable#2

Merged
mikhailshilkov merged 1 commit into
masterfrom
mikhailshilkov/revive
May 6, 2020
Merged

Update to latest deps and make runable#2
mikhailshilkov merged 1 commit into
masterfrom
mikhailshilkov/revive

Conversation

@mikhailshilkov

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

Comment thread pkg/provider/provider.go
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)

Copy link
Copy Markdown

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?

@mikhailshilkov mikhailshilkov May 3, 2020

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor

This PR has been shipped in release v2.82.0.

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