Catch Route53 Record Sets without TTL#7767
Merged
thrau merged 1 commit intolocalstack:masterfrom Mar 1, 2023
Merged
Conversation
Alias records, for example, should explicitly not have a TTL set, as it's derived from the TTL of the target.
giograno
approved these changes
Mar 1, 2023
Member
giograno
left a comment
There was a problem hiding this comment.
Thanks for the contribution @quinnypig! 🙏
Comment on lines
+41
to
+43
| if "TTL" in attrs: | ||
| if isinstance(attrs["TTL"], str): | ||
| attrs["TTL"] = int(attrs["TTL"]) |
Member
There was a problem hiding this comment.
Suggested change
| if "TTL" in attrs: | |
| if isinstance(attrs["TTL"], str): | |
| attrs["TTL"] = int(attrs["TTL"]) | |
| if isinstance(ttl := attrs.get("TTL"), str): | |
| attrs["TTL"] = int(ttl) |
We could avoid the nested ifs with something like this.
Member
|
looked safe to merge, we'll have to check what's going on with the CI with community PRs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Alias records, for example, should explicitly not have a TTL set, as it's derived from the TTL of the target.