Skip to content

Commit 3dab37f

Browse files
committed
chore(config-resolver): make hostname and variants compulsory in PartitionHash
1 parent 7f93a8b commit 3dab37f

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

packages/config-resolver/src/regionInfo/PartitionHash.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export type PartitionHash = {
1010
regions: string[];
1111
regionRegex: string;
1212
// TODO: Remove hostname after fully switching to variants.
13-
hostname?: string;
13+
hostname: string;
14+
variants: EndpointVariant[];
1415
endpoint?: string;
15-
variants?: EndpointVariant[];
1616
};
1717
};

packages/config-resolver/src/regionInfo/getRegionInfo.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ describe(getRegionInfo.name, () => {
4444
[mockPartition]: {
4545
regions: [mockRegion, `${mockRegion}2`, `${mockRegion}3`],
4646
regionRegex: mockRegionRegex,
47-
...((regionCase === RegionCase.REGION || regionCase === RegionCase.REGION_AND_ENDPOINT) && {
48-
hostname: mockHostname,
49-
}),
47+
hostname: mockHostname,
48+
variants: [{ hostname: mockHostname, tags: [] }],
5049
...((regionCase === RegionCase.ENDPOINT || regionCase === RegionCase.REGION_AND_ENDPOINT) && {
5150
endpoint: mockEndpointRegion,
5251
}),

0 commit comments

Comments
 (0)