Skip to content

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Jun 12, 2025

The client endpoint tests are now run through the client, including its full serializer behavior.

This also defers some legacy endpoint validations in S3 Control middleware to the endpoint rulesets.

@kuhe kuhe requested a review from a team as a code owner June 12, 2025 17:28
@kuhe kuhe changed the title test/endpoints fix(client-s3): defer endpoint validations to ruleset Jun 12, 2025
@kuhe kuhe force-pushed the test/endpoints branch from 8d1a35c to 5b5c24f Compare June 12, 2025 17:29
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
}
}
b.hn(resolvedHostname);
Copy link
Contributor Author

@kuhe kuhe Jun 12, 2025

Choose a reason for hiding this comment

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

  • validate intended behavior

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, hostPrefix "RequestRoute" MUST be preserved. The test cases were unable to express this requirement.

I've hard coded an exception.

@kuhe kuhe force-pushed the test/endpoints branch 5 times, most recently from 3c7a602 to 4e0933e Compare June 12, 2025 20:46
@kuhe kuhe marked this pull request as draft June 12, 2025 20:50
@kuhe kuhe force-pushed the test/endpoints branch 2 times, most recently from 9c5bbc3 to c28ca3a Compare June 13, 2025 17:19
@@ -58,6 +59,19 @@ public List<String> runAfter() {
);
}

@Override
public void addConfigInterfaceFields(TypeScriptSettings settings, Model model, SymbolProvider symbolProvider, TypeScriptWriter writer) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The PR adds the NodeConfigLoader to support the useArnRegion configuration property of S3Control.

Currently, only S3 has config loader support for this parameter, but the parameter is in both service models.

@kuhe kuhe force-pushed the test/endpoints branch 2 times, most recently from d9a57b9 to 0909d3a Compare June 13, 2025 18:06
@kuhe kuhe marked this pull request as ready for review June 13, 2025 18:06
@kuhe kuhe changed the title fix(client-s3): defer endpoint validations to ruleset test(clients): run endpoint tests in client mode Jun 13, 2025
clientStack.add(parseOutpostArnablesMiddleaware(options), parseOutpostArnablesMiddleawareOptions);
clientStack.add(updateArnablesRequestMiddleware(options), updateArnablesRequestMiddlewareOptions);
clientStack.addRelativeTo(parseOutpostArnablesMiddleaware(options), parseOutpostArnablesMiddleawareOptions);
clientStack.addRelativeTo(updateArnablesRequestMiddleware(options), updateArnablesRequestMiddlewareOptions);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

parseOutpostArnablesMiddleaware (I didn't want to fix the typo for backwards compatibility reasons) is now before serializer and updateArnablesRequestMiddleware is after serializer.

This prevents them from interfering with endpoint resolution by rewriting the inputs too early, but still lets them do their jobs.

@kuhe kuhe force-pushed the test/endpoints branch 3 times, most recently from 9a8063b to cdb7872 Compare June 13, 2025 20:18
@kuhe kuhe force-pushed the test/endpoints branch from cdb7872 to a89fa2a Compare June 13, 2025 20:39
@@ -129,7 +129,7 @@ describe("S3Control Client", () => {
expect(request.headers[HEADER_OUTPOST_ID]).eql(OutpostId);
expect(request.headers[HEADER_ACCOUNT_ID]).eql(AccountId);
expect(request.headers["authorization"]).contains(
`Credential=${credentials.accessKeyId}/${dateStr}/${region}/s3/aws4_request`
`Credential=${credentials.accessKeyId}/${dateStr}/${region}/s3-outposts/aws4_request`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this undoes the change from #4065

@kuhe kuhe merged commit 280c07a into aws:main Jun 16, 2025
5 checks passed
@kuhe kuhe deleted the test/endpoints branch June 16, 2025 15:00
Copy link

github-actions bot commented Jul 1, 2025

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants