Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7dfd0e6
chore: add endpoints.json with variants
trivikr Oct 29, 2021
ff969c0
chore(endpoints): re-add legacy config removed from dev json
trivikr Oct 29, 2021
a4e42ff
chore(clients): update endpoints for clients
trivikr Nov 1, 2021
ed36a2f
chore(codegen): populate variants in endpoints hashes
trivikr Oct 29, 2021
1711f95
chore(clients): populate variants in endpoints hashes
trivikr Nov 1, 2021
42e7158
chore(config-resolver): add endpoint variants array in RegionHash/Par…
trivikr Nov 1, 2021
8a73c94
chore: add a comment to remove hostname after switching to variants
trivikr Nov 2, 2021
5fffa7b
chore(codegen): populate default hostname and variant
trivikr Nov 2, 2021
42d15d6
chore(clients): populate default hostname and variant
trivikr Nov 2, 2021
7785fe3
chore(config-resolver): make hostname and variants compulsory in Regi…
trivikr Nov 2, 2021
94e3ea0
test(config-resolver): fix RegionHash in getRegionInfo.spec.ts
trivikr Nov 2, 2021
fdb5b45
chore(codegen): populate default hostname and variant in PartitionHash
trivikr Nov 2, 2021
7f93a8b
chore(clients): populate default hostname and variant in PartitionHash
trivikr Nov 2, 2021
3dab37f
chore(config-resolver): make hostname and variants compulsory in Part…
trivikr Nov 2, 2021
866a0ea
test(config-resolver): fix PartitionHash in getResolvedPartition.spec.ts
trivikr Nov 2, 2021
e0aa67a
chore(codegen): remove checks for hostname and variants
trivikr Nov 2, 2021
22b7a55
chore(codegen): return ArrayNode from partition.getVariants()
trivikr Nov 2, 2021
6f20a32
chore(codegen): add utility getResolvedHostname
trivikr Nov 2, 2021
4962f21
chore(codegen): update comments in EndpointResolver
trivikr Nov 2, 2021
d809298
chore(codegen): populate default variant as first variant
trivikr Nov 2, 2021
7f32fc8
chore(clients): populate default variant as first variant
trivikr Nov 2, 2021
fb544a8
chore(codegen): remove redundant newlines
trivikr Nov 2, 2021
3444561
chore(codegen): remove redundant local variables from getDefaultVariant
trivikr Nov 2, 2021
29dd012
chore(codegen): combine config population in one line
trivikr Nov 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore(codegen): combine config population in one line
  • Loading branch information
trivikr committed Nov 2, 2021
commit 29dd01216860fbe450ac39a7eb924091a481b9ab
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,13 @@ private void loadServiceEndpoints() {
String hostname = config.getStringMemberOrDefault("hostname", partition.hostnameTemplate);
String resolvedHostname = getResolvedHostname(hostname, dnsSuffix, endpointPrefix, entry.getKey());

// TODO: Remove hostname after fully switching to variants.
config = config.withMember("hostname", resolvedHostname);

ArrayNode variants = config.getArrayMember("variants").orElse(ArrayNode.fromNodes());
ArrayNode defaultVariant = ArrayNode.fromNodes(getDefaultVariant(resolvedHostname));

// Add resolved hostname as the default variant.
config = config.withMember("variants", defaultVariant.merge(variants));
endpoints.put(entry.getKey(), config);
endpoints.put(entry.getKey(),
config
.withMember("hostname", resolvedHostname)
.withMember("variants", defaultVariant.merge(variants)));
}
}
}
Expand Down