Skip to content

aws: retries, timeouts and SDK errors, taken over from the #603 client - #612

Merged
semx merged 2 commits into
developmentfrom
fix/aws-client-config
Oct 31, 2026
Merged

semx merged 2 commits into
developmentfrom
fix/aws-client-config

Conversation

@semx

@semx semx commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Two things the client in #603 by @ekrichbaum did and ours did not, found by reading the two client.py files side by side. Both commits carry him as co-author.

The clients were created with the botocore defaults. They now use the standard retry mode with 5 attempts and a connect timeout of 10 seconds (the read timeout stays at 60).

A lost connection, a timeout, missing credentials or an unknown profile raised a bare botocore exception out of discover(), discover_organization() or the session setup, although the module says every failure that is not an authorization denial is an AWSDiscoveryError. These are wrapped now.

The new tests fail on development (five of them: the config values, the 8 places that create a client without config=, and the three error paths) and pass with this change, together with the 191 existing AWS tests (196 passed).

The clients used the botocore defaults. Use the standard retry mode with
5 attempts and a connect timeout of 10 seconds, the way the client in #603
did, and add a test that fails when a client is created without it.

Co-authored-by: Eric Krichbaum <11653069+ekrichbaum@users.noreply.github.com>
@semx
semx requested a review from bb-Ricardo as a code owner October 31, 2026 17:38
A lost connection, a timeout, missing credentials or an unknown profile
raised a bare botocore exception out of discover(), discover_organization()
or the session setup, although the module promises AWSDiscoveryError for
every failure that is not an authorization denial. Wrap them the way the
client in #603 did and add tests for all three.

Co-authored-by: Eric Krichbaum <11653069+ekrichbaum@users.noreply.github.com>
@semx semx changed the title aws: create every boto3 client with retries and a connect timeout aws: retries, timeouts and SDK errors, taken over from the #603 client Oct 31, 2026
@semx
semx merged commit db38dce into development Oct 31, 2026
1 check passed
@semx
semx deleted the fix/aws-client-config branch October 31, 2026 17:59
@ekrichbaum

Copy link
Copy Markdown

I rebased to your version and it generated a few thousand log issues in a dry run against my production instances.

The version removed custom_fields from NBCluster/NBVirtualDisk and stopped advertising
those object types as valid for custom fields. AWS service clusters rely on aws_resource_id there for identity
matching. Without the cluster’s stored AWS resource ID, the sync can’t match it as managed and falsely treats
it as an unrelated name collision. I was rebuilding around those changes. I'll regrab these changes to client.py before I rebuild again. It shouldn't because the missing items were from the object_classes adjustments.

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.

2 participants