Skip to content

chore(objectstorage): add retry on 429 for objectstorage control plane - #1764

Open
h3adex wants to merge 2 commits into
stackitcloud:mainfrom
h3adex:dev/fix-429-error
Open

h3adex wants to merge 2 commits into
stackitcloud:mainfrom
h3adex:dev/fix-429-error

Conversation

@h3adex

@h3adex h3adex commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Description

Adds retry for object storage control plane API

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Acceptance tests got implemented or updated (see e.g. here)
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@h3adex
h3adex requested a review from a team as a code owner September 11, 2026 15:45
@h3adex
h3adex marked this pull request as draft September 11, 2026 15:47
@h3adex
h3adex force-pushed the dev/fix-429-error branch 2 times, most recently from 7cd704a to e17dec9 Compare September 14, 2026 09:06
@h3adex
h3adex marked this pull request as ready for review September 14, 2026 09:06
@h3adex

h3adex commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Test Code:

// Single bucket
resource "stackit_objectstorage_bucket" "test" {
  project_id = var.stackit_project_id
  name       = "rate-limit-test"
}

# Read the same bucket 200 times via separate datasource instances.
# for_each over a set of indices gives 200 independent Read calls,
# each hitting the Object Storage API enough to trigger the 60 req/min limit
# and exercise the retry + jitter logic without creating 100 real buckets.
data "stackit_objectstorage_bucket" "test" {
  for_each = toset([for i in range(200) : tostring(i)])

  project_id = stackit_objectstorage_bucket.test.project_id
  name       = stackit_objectstorage_bucket.test.name
  region     = stackit_objectstorage_bucket.test.region
}

Current upstream build (Error is wrong displayed it is 429 and not 404). Also fixed that:

Screenshot 2026-09-14 at 11 59 45

With new build trying to read 200 buckets:

Screenshot 2026-09-14 at 11 59 31

@h3adex
h3adex force-pushed the dev/fix-429-error branch 5 times, most recently from a47cc85 to 493f975 Compare September 14, 2026 10:55
Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>
Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>
@h3adex
h3adex requested a review from marceljk September 15, 2026 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants