Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(endpoints): codegen sync for request creation performance improvements #6449

Merged
merged 7 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
Loading