Skip to content

Use partitions.json to generate PartitionMetadata classes#6694

Merged
S-Saranya1 merged 7 commits intomasterfrom
somepal/technical-debt-migrate-partition-metadata
Feb 14, 2026
Merged

Use partitions.json to generate PartitionMetadata classes#6694
S-Saranya1 merged 7 commits intomasterfrom
somepal/technical-debt-migrate-partition-metadata

Conversation

@S-Saranya1
Copy link
Contributor

@S-Saranya1 S-Saranya1 commented Jan 28, 2026

Migrate PartitionMetadata code generation from endpoints.json to partitions.json.

Motivation and Context

Currently, PartitionMetadata classes are being generated from endpoints.json. Endpoints.json is legacy and adds latency during client initialization, this PR migrates PartitionMetadataGenerator to use partitions.json as the data source instead.

Modifications

  • Updated RegionGenerationMojo to pass partitions.json data to the partition metadata generator.
  • Updated PartitionMetadataGenerator to read partition data from partitions.json instead of endpoints.json.

Testing

  • Verified generated PartitionMetadata classes match expected output.
  • Verified existing tests pass with new partition metadata generation.

@S-Saranya1 S-Saranya1 requested a review from a team as a code owner January 28, 2026 18:27
@@ -0,0 +1,6 @@
{
"type": "feature",
"category": "AWS SDK for Java v",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"category": "AWS SDK for Java v",
"category": "AWS SDK for Java v2",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

private static final String ID = "aws";

private static final String NAME = "AWS Standard";
private static final String NAME = "aws";
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason for this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed this, added a display naming mapping since partitions.json doesn't have this field, keeping the public API behavior same.

}

private void validateDualStackDnsSuffix(String dualStackDnsSuffix) {
if (dualStackDnsSuffix == null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Maybe check empty as well as null (StringUtils.isBlank)

@sonarqubecloud
Copy link

@S-Saranya1 S-Saranya1 added this pull request to the merge queue Feb 13, 2026
Merged via the queue into master with commit b39522e Feb 14, 2026
40 checks passed
@github-actions
Copy link

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 14, 2026
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