Skip to content

Commit

Permalink
feat(endpoints): codegen sync for request creation performance improv…
Browse files Browse the repository at this point in the history
…ements (#6449)

* feat(middleware-endpoints): update codegen version for request creation performance improvements

* chore: update smithy hash

* chore: codegen sync

* chore: update yarn lock

* test: update client maximal config

* test(lib-dynamodb): throw error for cacheMiddleware=true

* fix(endpoints): avoid mutation of cached endpoint
  • Loading branch information
kuhe authored Sep 9, 2024
1 parent 7a0c615 commit c8e8f28
Show file tree
Hide file tree
Showing 910 changed files with 13,727 additions and 16,244 deletions.
42 changes: 21 additions & 21 deletions clients/client-accessanalyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,30 @@
"@aws-sdk/util-endpoints": "*",
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@smithy/config-resolver": "^3.0.5",
"@smithy/core": "^2.4.0",
"@smithy/fetch-http-handler": "^3.2.4",
"@smithy/hash-node": "^3.0.3",
"@smithy/invalid-dependency": "^3.0.3",
"@smithy/middleware-content-length": "^3.0.5",
"@smithy/middleware-endpoint": "^3.1.0",
"@smithy/middleware-retry": "^3.0.15",
"@smithy/middleware-serde": "^3.0.3",
"@smithy/middleware-stack": "^3.0.3",
"@smithy/node-config-provider": "^3.1.4",
"@smithy/node-http-handler": "^3.1.4",
"@smithy/protocol-http": "^4.1.0",
"@smithy/smithy-client": "^3.2.0",
"@smithy/types": "^3.3.0",
"@smithy/url-parser": "^3.0.3",
"@smithy/config-resolver": "^3.0.6",
"@smithy/core": "^2.4.1",
"@smithy/fetch-http-handler": "^3.2.5",
"@smithy/hash-node": "^3.0.4",
"@smithy/invalid-dependency": "^3.0.4",
"@smithy/middleware-content-length": "^3.0.6",
"@smithy/middleware-endpoint": "^3.1.1",
"@smithy/middleware-retry": "^3.0.16",
"@smithy/middleware-serde": "^3.0.4",
"@smithy/middleware-stack": "^3.0.4",
"@smithy/node-config-provider": "^3.1.5",
"@smithy/node-http-handler": "^3.2.0",
"@smithy/protocol-http": "^4.1.1",
"@smithy/smithy-client": "^3.3.0",
"@smithy/types": "^3.4.0",
"@smithy/url-parser": "^3.0.4",
"@smithy/util-base64": "^3.0.0",
"@smithy/util-body-length-browser": "^3.0.0",
"@smithy/util-body-length-node": "^3.0.0",
"@smithy/util-defaults-mode-browser": "^3.0.15",
"@smithy/util-defaults-mode-node": "^3.0.15",
"@smithy/util-endpoints": "^2.0.5",
"@smithy/util-middleware": "^3.0.3",
"@smithy/util-retry": "^3.0.3",
"@smithy/util-defaults-mode-browser": "^3.0.16",
"@smithy/util-defaults-mode-node": "^3.0.16",
"@smithy/util-endpoints": "^2.1.0",
"@smithy/util-middleware": "^3.0.4",
"@smithy/util-retry": "^3.0.4",
"@smithy/util-utf8": "^3.0.0",
"tslib": "^2.6.2",
"uuid": "^9.0.1"
Expand Down
17 changes: 12 additions & 5 deletions clients/client-accessanalyzer/src/endpoint/endpointResolver.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
// smithy-typescript generated code
import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
import { EndpointV2, Logger } from "@smithy/types";
import { customEndpointFunctions, EndpointParams, resolveEndpoint } from "@smithy/util-endpoints";
import { customEndpointFunctions, EndpointCache, EndpointParams, resolveEndpoint } from "@smithy/util-endpoints";

import { EndpointParameters } from "./EndpointParameters";
import { ruleSet } from "./ruleset";

const cache = new EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
});

export const defaultEndpointResolver = (
endpointParams: EndpointParameters,
context: { logger?: Logger } = {}
): EndpointV2 => {
return resolveEndpoint(ruleSet, {
endpointParams: endpointParams as EndpointParams,
logger: context.logger,
});
return cache.get(endpointParams as EndpointParams, () =>
resolveEndpoint(ruleSet, {
endpointParams: endpointParams as EndpointParams,
logger: context.logger,
})
);
};

customEndpointFunctions.aws = awsEndpointFunctions;
42 changes: 21 additions & 21 deletions clients/client-account/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,30 @@
"@aws-sdk/util-endpoints": "*",
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@smithy/config-resolver": "^3.0.5",
"@smithy/core": "^2.4.0",
"@smithy/fetch-http-handler": "^3.2.4",
"@smithy/hash-node": "^3.0.3",
"@smithy/invalid-dependency": "^3.0.3",
"@smithy/middleware-content-length": "^3.0.5",
"@smithy/middleware-endpoint": "^3.1.0",
"@smithy/middleware-retry": "^3.0.15",
"@smithy/middleware-serde": "^3.0.3",
"@smithy/middleware-stack": "^3.0.3",
"@smithy/node-config-provider": "^3.1.4",
"@smithy/node-http-handler": "^3.1.4",
"@smithy/protocol-http": "^4.1.0",
"@smithy/smithy-client": "^3.2.0",
"@smithy/types": "^3.3.0",
"@smithy/url-parser": "^3.0.3",
"@smithy/config-resolver": "^3.0.6",
"@smithy/core": "^2.4.1",
"@smithy/fetch-http-handler": "^3.2.5",
"@smithy/hash-node": "^3.0.4",
"@smithy/invalid-dependency": "^3.0.4",
"@smithy/middleware-content-length": "^3.0.6",
"@smithy/middleware-endpoint": "^3.1.1",
"@smithy/middleware-retry": "^3.0.16",
"@smithy/middleware-serde": "^3.0.4",
"@smithy/middleware-stack": "^3.0.4",
"@smithy/node-config-provider": "^3.1.5",
"@smithy/node-http-handler": "^3.2.0",
"@smithy/protocol-http": "^4.1.1",
"@smithy/smithy-client": "^3.3.0",
"@smithy/types": "^3.4.0",
"@smithy/url-parser": "^3.0.4",
"@smithy/util-base64": "^3.0.0",
"@smithy/util-body-length-browser": "^3.0.0",
"@smithy/util-body-length-node": "^3.0.0",
"@smithy/util-defaults-mode-browser": "^3.0.15",
"@smithy/util-defaults-mode-node": "^3.0.15",
"@smithy/util-endpoints": "^2.0.5",
"@smithy/util-middleware": "^3.0.3",
"@smithy/util-retry": "^3.0.3",
"@smithy/util-defaults-mode-browser": "^3.0.16",
"@smithy/util-defaults-mode-node": "^3.0.16",
"@smithy/util-endpoints": "^2.1.0",
"@smithy/util-middleware": "^3.0.4",
"@smithy/util-retry": "^3.0.4",
"@smithy/util-utf8": "^3.0.0",
"tslib": "^2.6.2"
},
Expand Down
17 changes: 12 additions & 5 deletions clients/client-account/src/endpoint/endpointResolver.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
// smithy-typescript generated code
import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
import { EndpointV2, Logger } from "@smithy/types";
import { customEndpointFunctions, EndpointParams, resolveEndpoint } from "@smithy/util-endpoints";
import { customEndpointFunctions, EndpointCache, EndpointParams, resolveEndpoint } from "@smithy/util-endpoints";

import { EndpointParameters } from "./EndpointParameters";
import { ruleSet } from "./ruleset";

const cache = new EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
});

export const defaultEndpointResolver = (
endpointParams: EndpointParameters,
context: { logger?: Logger } = {}
): EndpointV2 => {
return resolveEndpoint(ruleSet, {
endpointParams: endpointParams as EndpointParams,
logger: context.logger,
});
return cache.get(endpointParams as EndpointParams, () =>
resolveEndpoint(ruleSet, {
endpointParams: endpointParams as EndpointParams,
logger: context.logger,
})
);
};

customEndpointFunctions.aws = awsEndpointFunctions;
44 changes: 22 additions & 22 deletions clients/client-acm-pca/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,32 @@
"@aws-sdk/util-endpoints": "*",
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@smithy/config-resolver": "^3.0.5",
"@smithy/core": "^2.4.0",
"@smithy/fetch-http-handler": "^3.2.4",
"@smithy/hash-node": "^3.0.3",
"@smithy/invalid-dependency": "^3.0.3",
"@smithy/middleware-content-length": "^3.0.5",
"@smithy/middleware-endpoint": "^3.1.0",
"@smithy/middleware-retry": "^3.0.15",
"@smithy/middleware-serde": "^3.0.3",
"@smithy/middleware-stack": "^3.0.3",
"@smithy/node-config-provider": "^3.1.4",
"@smithy/node-http-handler": "^3.1.4",
"@smithy/protocol-http": "^4.1.0",
"@smithy/smithy-client": "^3.2.0",
"@smithy/types": "^3.3.0",
"@smithy/url-parser": "^3.0.3",
"@smithy/config-resolver": "^3.0.6",
"@smithy/core": "^2.4.1",
"@smithy/fetch-http-handler": "^3.2.5",
"@smithy/hash-node": "^3.0.4",
"@smithy/invalid-dependency": "^3.0.4",
"@smithy/middleware-content-length": "^3.0.6",
"@smithy/middleware-endpoint": "^3.1.1",
"@smithy/middleware-retry": "^3.0.16",
"@smithy/middleware-serde": "^3.0.4",
"@smithy/middleware-stack": "^3.0.4",
"@smithy/node-config-provider": "^3.1.5",
"@smithy/node-http-handler": "^3.2.0",
"@smithy/protocol-http": "^4.1.1",
"@smithy/smithy-client": "^3.3.0",
"@smithy/types": "^3.4.0",
"@smithy/url-parser": "^3.0.4",
"@smithy/util-base64": "^3.0.0",
"@smithy/util-body-length-browser": "^3.0.0",
"@smithy/util-body-length-node": "^3.0.0",
"@smithy/util-defaults-mode-browser": "^3.0.15",
"@smithy/util-defaults-mode-node": "^3.0.15",
"@smithy/util-endpoints": "^2.0.5",
"@smithy/util-middleware": "^3.0.3",
"@smithy/util-retry": "^3.0.3",
"@smithy/util-defaults-mode-browser": "^3.0.16",
"@smithy/util-defaults-mode-node": "^3.0.16",
"@smithy/util-endpoints": "^2.1.0",
"@smithy/util-middleware": "^3.0.4",
"@smithy/util-retry": "^3.0.4",
"@smithy/util-utf8": "^3.0.0",
"@smithy/util-waiter": "^3.1.2",
"@smithy/util-waiter": "^3.1.3",
"tslib": "^2.6.2"
},
"devDependencies": {
Expand Down
17 changes: 12 additions & 5 deletions clients/client-acm-pca/src/endpoint/endpointResolver.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
// smithy-typescript generated code
import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
import { EndpointV2, Logger } from "@smithy/types";
import { customEndpointFunctions, EndpointParams, resolveEndpoint } from "@smithy/util-endpoints";
import { customEndpointFunctions, EndpointCache, EndpointParams, resolveEndpoint } from "@smithy/util-endpoints";

import { EndpointParameters } from "./EndpointParameters";
import { ruleSet } from "./ruleset";

const cache = new EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
});

export const defaultEndpointResolver = (
endpointParams: EndpointParameters,
context: { logger?: Logger } = {}
): EndpointV2 => {
return resolveEndpoint(ruleSet, {
endpointParams: endpointParams as EndpointParams,
logger: context.logger,
});
return cache.get(endpointParams as EndpointParams, () =>
resolveEndpoint(ruleSet, {
endpointParams: endpointParams as EndpointParams,
logger: context.logger,
})
);
};

customEndpointFunctions.aws = awsEndpointFunctions;
44 changes: 22 additions & 22 deletions clients/client-acm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,32 @@
"@aws-sdk/util-endpoints": "*",
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@smithy/config-resolver": "^3.0.5",
"@smithy/core": "^2.4.0",
"@smithy/fetch-http-handler": "^3.2.4",
"@smithy/hash-node": "^3.0.3",
"@smithy/invalid-dependency": "^3.0.3",
"@smithy/middleware-content-length": "^3.0.5",
"@smithy/middleware-endpoint": "^3.1.0",
"@smithy/middleware-retry": "^3.0.15",
"@smithy/middleware-serde": "^3.0.3",
"@smithy/middleware-stack": "^3.0.3",
"@smithy/node-config-provider": "^3.1.4",
"@smithy/node-http-handler": "^3.1.4",
"@smithy/protocol-http": "^4.1.0",
"@smithy/smithy-client": "^3.2.0",
"@smithy/types": "^3.3.0",
"@smithy/url-parser": "^3.0.3",
"@smithy/config-resolver": "^3.0.6",
"@smithy/core": "^2.4.1",
"@smithy/fetch-http-handler": "^3.2.5",
"@smithy/hash-node": "^3.0.4",
"@smithy/invalid-dependency": "^3.0.4",
"@smithy/middleware-content-length": "^3.0.6",
"@smithy/middleware-endpoint": "^3.1.1",
"@smithy/middleware-retry": "^3.0.16",
"@smithy/middleware-serde": "^3.0.4",
"@smithy/middleware-stack": "^3.0.4",
"@smithy/node-config-provider": "^3.1.5",
"@smithy/node-http-handler": "^3.2.0",
"@smithy/protocol-http": "^4.1.1",
"@smithy/smithy-client": "^3.3.0",
"@smithy/types": "^3.4.0",
"@smithy/url-parser": "^3.0.4",
"@smithy/util-base64": "^3.0.0",
"@smithy/util-body-length-browser": "^3.0.0",
"@smithy/util-body-length-node": "^3.0.0",
"@smithy/util-defaults-mode-browser": "^3.0.15",
"@smithy/util-defaults-mode-node": "^3.0.15",
"@smithy/util-endpoints": "^2.0.5",
"@smithy/util-middleware": "^3.0.3",
"@smithy/util-retry": "^3.0.3",
"@smithy/util-defaults-mode-browser": "^3.0.16",
"@smithy/util-defaults-mode-node": "^3.0.16",
"@smithy/util-endpoints": "^2.1.0",
"@smithy/util-middleware": "^3.0.4",
"@smithy/util-retry": "^3.0.4",
"@smithy/util-utf8": "^3.0.0",
"@smithy/util-waiter": "^3.1.2",
"@smithy/util-waiter": "^3.1.3",
"tslib": "^2.6.2"
},
"devDependencies": {
Expand Down
17 changes: 12 additions & 5 deletions clients/client-acm/src/endpoint/endpointResolver.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
// smithy-typescript generated code
import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
import { EndpointV2, Logger } from "@smithy/types";
import { customEndpointFunctions, EndpointParams, resolveEndpoint } from "@smithy/util-endpoints";
import { customEndpointFunctions, EndpointCache, EndpointParams, resolveEndpoint } from "@smithy/util-endpoints";

import { EndpointParameters } from "./EndpointParameters";
import { ruleSet } from "./ruleset";

const cache = new EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
});

export const defaultEndpointResolver = (
endpointParams: EndpointParameters,
context: { logger?: Logger } = {}
): EndpointV2 => {
return resolveEndpoint(ruleSet, {
endpointParams: endpointParams as EndpointParams,
logger: context.logger,
});
return cache.get(endpointParams as EndpointParams, () =>
resolveEndpoint(ruleSet, {
endpointParams: endpointParams as EndpointParams,
logger: context.logger,
})
);
};

customEndpointFunctions.aws = awsEndpointFunctions;
44 changes: 22 additions & 22 deletions clients/client-amp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,32 @@
"@aws-sdk/util-endpoints": "*",
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@smithy/config-resolver": "^3.0.5",
"@smithy/core": "^2.4.0",
"@smithy/fetch-http-handler": "^3.2.4",
"@smithy/hash-node": "^3.0.3",
"@smithy/invalid-dependency": "^3.0.3",
"@smithy/middleware-content-length": "^3.0.5",
"@smithy/middleware-endpoint": "^3.1.0",
"@smithy/middleware-retry": "^3.0.15",
"@smithy/middleware-serde": "^3.0.3",
"@smithy/middleware-stack": "^3.0.3",
"@smithy/node-config-provider": "^3.1.4",
"@smithy/node-http-handler": "^3.1.4",
"@smithy/protocol-http": "^4.1.0",
"@smithy/smithy-client": "^3.2.0",
"@smithy/types": "^3.3.0",
"@smithy/url-parser": "^3.0.3",
"@smithy/config-resolver": "^3.0.6",
"@smithy/core": "^2.4.1",
"@smithy/fetch-http-handler": "^3.2.5",
"@smithy/hash-node": "^3.0.4",
"@smithy/invalid-dependency": "^3.0.4",
"@smithy/middleware-content-length": "^3.0.6",
"@smithy/middleware-endpoint": "^3.1.1",
"@smithy/middleware-retry": "^3.0.16",
"@smithy/middleware-serde": "^3.0.4",
"@smithy/middleware-stack": "^3.0.4",
"@smithy/node-config-provider": "^3.1.5",
"@smithy/node-http-handler": "^3.2.0",
"@smithy/protocol-http": "^4.1.1",
"@smithy/smithy-client": "^3.3.0",
"@smithy/types": "^3.4.0",
"@smithy/url-parser": "^3.0.4",
"@smithy/util-base64": "^3.0.0",
"@smithy/util-body-length-browser": "^3.0.0",
"@smithy/util-body-length-node": "^3.0.0",
"@smithy/util-defaults-mode-browser": "^3.0.15",
"@smithy/util-defaults-mode-node": "^3.0.15",
"@smithy/util-endpoints": "^2.0.5",
"@smithy/util-middleware": "^3.0.3",
"@smithy/util-retry": "^3.0.3",
"@smithy/util-defaults-mode-browser": "^3.0.16",
"@smithy/util-defaults-mode-node": "^3.0.16",
"@smithy/util-endpoints": "^2.1.0",
"@smithy/util-middleware": "^3.0.4",
"@smithy/util-retry": "^3.0.4",
"@smithy/util-utf8": "^3.0.0",
"@smithy/util-waiter": "^3.1.2",
"@smithy/util-waiter": "^3.1.3",
"tslib": "^2.6.2",
"uuid": "^9.0.1"
},
Expand Down
Loading

0 comments on commit c8e8f28

Please sign in to comment.