Skip to content

Comments

WIP: adjust return codes and add resource exhausted#96

Closed
breuerfelix wants to merge 1 commit intomainfrom
backoff
Closed

WIP: adjust return codes and add resource exhausted#96
breuerfelix wants to merge 1 commit intomainfrom
backoff

Conversation

@breuerfelix
Copy link
Member

How to categorize this PR?

/kind enhancement

What this PR does / why we need it:
This PR adjusts return Codes and specifically adds the return code "resource exhausted". This prevents spamming the IaaS API when there are no valid hosts anymore.

Special notes for your reviewer:

Breaking changes:

@ske-prow ske-prow bot added the kind/enhancement Enhancement, improvement, extension label Jan 26, 2026
@ske-prow
Copy link

ske-prow bot commented Jan 26, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jamand for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ske-prow ske-prow bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 26, 2026
@breuerfelix breuerfelix force-pushed the backoff branch 2 times, most recently from 237b3a4 to be0e103 Compare January 26, 2026 15:33
@ske-prow ske-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 26, 2026
@ske-prow ske-prow bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 26, 2026
@breuerfelix breuerfelix force-pushed the backoff branch 2 times, most recently from 853ffd2 to f0b9867 Compare January 26, 2026 16:18
* use stackitProviderName everywhere

Signed-off-by: Felix Breuer <f.breuer94@gmail.com>

* extract secret extraction into function

Signed-off-by: Felix Breuer <f.breuer94@gmail.com>

---------

Signed-off-by: Felix Breuer <f.breuer94@gmail.com>

// Check for resource exhaustion errors to avoid spamming the API
errMsg := strings.ToLower(err.Error())
if strings.Contains(errMsg, "no valid host") || strings.Contains(errMsg, "quota exceeded") {
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure that this will be a error on the creation. If I got it correctly only the quota exceeded is a error on the create call. The no valid host is in the errorMessage in the get server https://internal-docs.api.stackit.cloud/documentation/iaas/version/v2#tag/Servers/operation/v2GetServer . Or did I get this wrong?

@breuerfelix breuerfelix marked this pull request as draft January 27, 2026 09:53
@ske-prow ske-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 27, 2026
@breuerfelix breuerfelix changed the title adjust return codes and add resource exhausted WIP: adjust return codes and add resource exhausted Jan 27, 2026
@breuerfelix breuerfelix marked this pull request as ready for review January 27, 2026 09:54
@breuerfelix
Copy link
Member Author

remove in favor of #99

@breuerfelix breuerfelix deleted the backoff branch February 18, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/enhancement Enhancement, improvement, extension size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants