Conversation
✅ No Breaking Changes DetectedNo public API breaking changes found in this PR. |
Hweinstock
left a comment
There was a problem hiding this comment.
Looks good! Small qs about integ tests.
| cls.region = os.environ.get("BEDROCK_TEST_REGION", "us-west-2") | ||
| cls.role_arn = os.environ.get("GATEWAY_ROLE_ARN") | ||
| if not cls.role_arn: | ||
| pytest.skip("GATEWAY_ROLE_ARN not set") |
There was a problem hiding this comment.
could this lead to tests being silently skipped or would the CI action still fail?
| authorizerType="NONE", | ||
| description="updated by integ test", | ||
| ) | ||
| assert updated["status"] == "READY" |
There was a problem hiding this comment.
should we assert that the gateway was actually updated?
There was a problem hiding this comment.
yep I'll add same assertion that i did for policy to make sure its actually updated
| ) | ||
| if not response.get("nextToken"): | ||
| return None | ||
| kwargs["nextToken"] = response["nextToken"] |
There was a problem hiding this comment.
Two questions:
- why would a user pass in nextToken?
- should we use a local variable instead to avoid mutating the parameters?
There was a problem hiding this comment.
- Popping the nextToken was just a defensive guard to make sure if the user passed in a nextToken, it does not conflict with our internal pagination. Maybe not necessary but cheap and harmless imo
- Good catch. I've changed this to a local var
|
|
||
|
|
||
| @pytest.mark.integration | ||
| class TestGatewayClient: |
There was a problem hiding this comment.
nit: could we add one more get_gateway_target_by_name
There was a problem hiding this comment.
There's tests for get_gateway_target_by_name in the TestGatewayTargetClient class down below. Is there a specific case that you were thinking of missing?
get_gateway_target returns AccessDeniedException when called with a gateway ARN. Extract the gateway ID from the ARN for all target _and_wait polling methods. Also add missing credentialProviderConfigurations to the update_gateway_target integ test.
22f7529 to
cc85cfd
Compare
fix(gateway): use gateway ID instead of ARN for target polling
Issue #, if available: Issue #390
Description of changes:
__getattr__passthrough*_and_waitpolling methods using shared wait_until/wait_until_deleted utilities:get_gateway_by_name— paginates through gateways, returns full details on first matchget_gateway_target_by_name— paginates through targets for a given gateway, returns full details on first match*_and_waitmethods accept WaitConfig for configurable polling behavior and apply convert_kwargs for snake_case supportTest Plan:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.