SAP / terraform-provider-btp

Terraform provider for SAP BTP
https://registry.terraform.io/providers/SAP/btp/latest
Apache License 2.0
86 stars 18 forks source link

[BUG] Rate limit exceeded errors still occurr #902

Closed holgpar closed 1 month ago

holgpar commented 1 month ago

Is there an existing issue for this?

What version of the Terraform provider are you using?

1.6.0

What version of the Terraform CLI are you using?

tofu v1.7.2

What type of issue are you facing

bug report

Describe the bug

We still see failing plan commands with outputs like this from time to time:

│ Error: API Error Reading Resource Entitlement (Subaccount) │ │ with module.cloudci.module.sap-btp-entitlements.btp_subaccount_entitlement.entitlement["cis-xrs"], │ on .terraform/modules/cloudci.sap-btp-entitlements/main.tf line 21, in resource "btp_subaccount_entitlement" "entitlement": │ 21: resource "btp_subaccount_entitlement" "entitlement" { │ │

I think this is unexpected, because there was a recent change in the provider to add some retry logic.

Expected Behavior

Rate Limits are handled by the provider via back-off and retrying.

Steps To Reproduce

Execute a "plan" against a subaccount with a configuration containing about 20 entitlements. We currently execute three such plans in parallel.

User's Role Collections

No response

Add screenshots to help explain your problem

No response

Additional context

No response

lechnerc77 commented 1 month ago

The adjustment we made was for the CREATE, UPDATE and DELETE operations which explains why the error occurs now during the READ.

holgpar commented 1 month ago

The adjustment we made was for the CREATE, UPDATE and DELETE operations which explains why the error occurs now during the READ.

yeah, that figures.

Did you make any changes with respect to the parallelism.

Nope, did not touch that.

Is it canary or live landscape?

It happens on live landscapes (but we also have much more regions on live landscapes).

lechnerc77 commented 1 month ago
lechnerc77 commented 1 month ago

Attempts to reproduce the error on prod landscape with identical set of entitlements as well as leveraging the module sap-btp-entitlements:

For reference see: https://github.com/lechnerc77/tf-btp-loadtest

lechnerc77 commented 1 month ago

Update: Parallel execution of apply and destroy with same setup in region eu10 -> the destroy has 10 parallel reads on the entitlements. Execution was successful see https://github.com/lechnerc77/tf-btp-loadtest/actions/runs/10843825292

lechnerc77 commented 1 month ago

Update: Parallel execution of apply and destroy with same setup in region AP10 -> the destroy has 10 parallel reads on the entitlements. Execution was successful see https://github.com/lechnerc77/tf-btp-loadtest/actions/runs/10850499262

CHERIANS commented 1 month ago

@holgpar we had the ver 1.7.0 of Terraform provider for BTP released yesterday which contains the fix