-
Notifications
You must be signed in to change notification settings - Fork 71
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
refactor(project|billing_group): replaced client-v2 with avngen #2034
base: main
Are you sure you want to change the base?
Conversation
eee5905
to
641c5be
Compare
Type: schema.TypeSet, | ||
Elem: &schema.Schema{Type: schema.TypeString}, | ||
Optional: true, | ||
//DiffSuppressFunc: schemautil.EmptyObjectNoChangeDiffSuppressFunc, |
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.
Either it must be computed, or we should clearly log this change in the changelog, telling we have fixed this.
Description: "Address lines 1 and 2. For example, street, PO box, or building.", | ||
Type: schema.TypeSet, | ||
Elem: &schema.Schema{Type: schema.TypeString}, | ||
Optional: true, |
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.
Same here. If it is not computed, it would show the plan.
return billinggroup.BillingCurrencyType(v.(string)) | ||
} | ||
return "" | ||
}(), |
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.
Get
always returns something. Either the real or zero value.
Check: resource.ComposeTestCheckFunc( | ||
resource.TestCheckResourceAttr(resourceName, "name", fmt.Sprintf("test-acc-bg-%s", rName)), | ||
resource.TestCheckResourceAttr(resourceName, "billing_emails.#", "0"), | ||
resource.TestCheckResourceAttr(resourceName, "address_lines.#", "0"), |
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.
Good job!
db, err := c.BillingGroup.Get(ctx, rs.Primary.ID) | ||
var e aiven.Error | ||
bg, err := c.BillingGroupGet(ctx, rs.Primary.ID) | ||
var e avngen.Error | ||
if common.IsCritical(err) && errors.As(err, &e) && e.Status != 500 { | ||
return fmt.Errorf("error getting a billing group by id: %w", err) | ||
} |
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.
This error message doesn't make sense. 500 is a clearly an error.
if cardID == "" { | ||
return nil, nil | ||
} | ||
|
||
card, err := client.CardsHandler.Get(ctx, cardID) | ||
cards, err := client.UserCreditCardsList(ctx) //nolint:staticcheck |
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.
Why do we skip linting?
About this change—what it does
project
andbilling_group
resources