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
Fix schema validation of CloudFront distribution config #8308
Fix schema validation of CloudFront distribution config #8308
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8308 +/- ##
==========================================
- Coverage 88.16% 88.02% -0.15%
==========================================
Files 250 249 -1
Lines 9391 9312 -79
==========================================
- Hits 8280 8197 -83
- Misses 1111 1115 +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.
@jede great thanks for that! Indeed, there's an issue, and I have no idea how it got in, in this form.
Still, please see my comment, I think we can have it way simpler
I made the changes you suggested, but let me know if the order thing matters, in that case I can just revert :) |
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.
@jede sorry for confusion, but after your input, it's clear that what you proposed originally while more verbose, is definitely more correct.
…CachedMethods and ForwardedValues
4008c6c
to
8e65905
Compare
No worries! I reset it back to the original. Happy to contribute! |
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.
@jede great thanks for update. It all looks good for AllowedMethods
and CachedMethods
but I've discovered some issues with ForwardedValues
please see my comments
Great! Fixed it and adjusted the test case. |
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.
Thanks for comment @jede, as we discussed, it seems reasonable to recognize ForwardedValues
.
Now when reviewing deeply it's schema, I've spotted few schema issues, and proposed one style improvement. Let me know
Thanks for the suggestions! Makes it more coherent with the rest of the code. I went ahead and added |
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.
Thank you @jede, that looks great!
Addresses: #8025 (this is a minor bugfix related to PR #8250)
I noticed some
unsupported configuration format
warnings that occurred after #8250 with CloudFront events and specifically usingAllowedMethods
,CachedMethods
andForwardedValues
:So I used the example given here to write a test that validates the config.
Any feedback is welcome!