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(route53): latency based routing #28723

Merged
merged 30 commits into from
Jan 24, 2024

Conversation

badmintoncryer
Copy link
Contributor

@badmintoncryer badmintoncryer commented Jan 16, 2024

In this PR, I have made the RecordSet compatible with latency-based routing.
You can set it by providing a Region name to the region argument.

new route53.ARecord(this, 'ARecord', {
  zone: myZone,
  target: route53.RecordTarget.fromIpAddresses('1.2.3.4'),
  region: 'ap-northeast-1', // added
})

Closes #28722.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team January 16, 2024 13:37
@github-actions github-actions bot added feature-request A feature should be added or improved. p2 admired-contributor [Pilot] contributed between 13-24 PRs to the CDK labels Jan 16, 2024
@badmintoncryer badmintoncryer force-pushed the 28722-latencyBasedRouting branch 4 times, most recently from fad8429 to 9f583e6 Compare January 18, 2024 06:34
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@github-actions github-actions bot added the effort/medium Medium work item – several days of effort label Jan 18, 2024
@aws-cdk-automation aws-cdk-automation dismissed their stale review January 18, 2024 06:46

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@badmintoncryer badmintoncryer marked this pull request as ready for review January 18, 2024 06:47
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jan 18, 2024
Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Looks good overall 👍
I left some notes for minor adjustments.

packages/aws-cdk-lib/aws-route53/README.md Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-route53/lib/record-set.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-route53/lib/record-set.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-route53/lib/record-set.ts Outdated Show resolved Hide resolved
@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jan 21, 2024
@badmintoncryer
Copy link
Contributor Author

badmintoncryer commented Jan 21, 2024

@lpizzinidev Thank you for your review! I have addressed your comments.

Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Nice 👍

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jan 21, 2024
Copy link
Contributor

@aaythapa aaythapa left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! Looks great overall, only concern is should the region names be enum values? The docs clearly define which regions are allowed in this property so maybe we should do the same

packages/aws-cdk-lib/aws-route53/lib/record-set.ts Outdated Show resolved Hide resolved
@badmintoncryer
Copy link
Contributor Author

badmintoncryer commented Jan 23, 2024

@aaythapa Thank you for your review. I'll add enum!

@kaizencc kaizencc changed the title feat(route53): support latency based routing feat(route53): latency based routing Jan 23, 2024
badmintoncryer and others added 10 commits January 24, 2024 04:16
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Aayush thapa <84202325+aaythapa@users.noreply.github.com>
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@aws-cdk-automation aws-cdk-automation dismissed their stale review January 23, 2024 19:43

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@badmintoncryer
Copy link
Contributor Author

@aaythapa I've added LatencyBasedRoutingRegion. Please comfirm it.

@aaythapa
Copy link
Contributor

@aaythapa I've added LatencyBasedRoutingRegion. Please confirm it.

Hi @badmintoncryer thank you for making the changes. I talked it over with the team and we decided we don't want to add enums for regions. Our reasoning is users already use strings when defining region in CDK, for example here and with references like stack.env.region. On top of that, new regions are constantly being added so we need to manually maintain the list of enums which add additional overhead.

Sorry about the extra work, I should've discussed this with the team before suggesting you add enums. Hopefully it isn't too much work to go back.

@badmintoncryer
Copy link
Contributor Author

@aaythapa I've reverted modification! Please confirm it again.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: afdc41e
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

mergify bot commented Jan 24, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 169fd91 into aws:main Jan 24, 2024
10 checks passed
@badmintoncryer badmintoncryer deleted the 28722-latencyBasedRouting branch January 24, 2024 21:12
penniman26 pushed a commit to penniman26/aws-cdk that referenced this pull request Jan 25, 2024
In this PR, I have made the RecordSet compatible with latency-based routing.
You can set it by providing a Region name to the region argument.

```ts
new route53.ARecord(this, 'ARecord', {
  zone: myZone,
  target: route53.RecordTarget.fromIpAddresses('1.2.3.4'),
  region: 'ap-northeast-1', // added
})
```

Closes aws#28722.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
SankyRed pushed a commit that referenced this pull request Feb 8, 2024
In this PR, I have made the RecordSet compatible with latency-based routing.
You can set it by providing a Region name to the region argument.

```ts
new route53.ARecord(this, 'ARecord', {
  zone: myZone,
  target: route53.RecordTarget.fromIpAddresses('1.2.3.4'),
  region: 'ap-northeast-1', // added
})
```

Closes #28722.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admired-contributor [Pilot] contributed between 13-24 PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

route53: support latency based routing
4 participants