-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: custom domains in HTTP API #1472
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
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1472 +/- ##
===========================================
- Coverage 94.39% 94.35% -0.05%
===========================================
Files 78 78
Lines 4714 4819 +105
Branches 948 969 +21
===========================================
+ Hits 4450 4547 +97
- Misses 121 125 +4
- Partials 143 147 +4 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: is the empty "" needed after must be
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just Black being annoying. will fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor question: I thought if route53.get("IpV6") is True:
statement would be enough. Is it needed to add not None
check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the possible values? If it's only booleans, then if route53.getI("IpV6"):
is sufficient by itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the test by adding condition here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, not sure what you mean? Condition is set on the Api and the Function resource.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to see if conditions work for Domain
property
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me. Is Domain
supported in globals?
6fcacc4
to
5a356dd
Compare
yes. updated a test to use globals instead |
Can we add |
Codecov Report
@@ Coverage Diff @@
## develop #1472 +/- ##
===========================================
- Coverage 94.15% 94.11% -0.04%
===========================================
Files 78 78
Lines 4789 4897 +108
Branches 967 988 +21
===========================================
+ Hits 4509 4609 +100
- Misses 130 134 +4
- Partials 150 154 +4
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Conditions look to be handled correctly, and the translation looks good. Just a few other smaller things to address.
# Assign the OpenApi back to template | ||
self.definition_body = editor.openapi | ||
|
||
def _construct_api_domain(self, http_api): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is about 100 lines long, and is conceptually difficult to grasp. Could you break the components apart? It looks like this could be split into Domain, BasePath, and RouteSettings methods.
Codecov Report
@@ Coverage Diff @@
## develop #1472 +/- ##
===========================================
- Coverage 94.15% 94.10% -0.06%
===========================================
Files 78 78
Lines 4789 4900 +111
Branches 967 988 +21
===========================================
+ Hits 4509 4611 +102
- Misses 130 134 +4
- Partials 150 155 +5 Continue to review full report at Codecov.
|
) | ||
if "HostedZoneId" in route53: | ||
record_set_group.HostedZoneId = route53.get("HostedZoneId") | ||
if "HostedZoneName" in route53 and "HostedZoneId" not in route53: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if "HostedZoneName" in route53 and "HostedZoneId" not in route53:
-> elif "HostedZoneName" in route53:
Issue #, if available:
Description of changes:
Description of how you validated changes:
End to end tested
Checklist:
make pr
passesexamples/2016-10-31
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.