-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix cloudfront middleware #2837
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 cloudfront middleware #2837
Conversation
Please sign your commits following these rules: $ git clone -b "fix-cloudfront-middleware" git@github.com:vishesh92/distribution.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354339184
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f Amending updates the existing PR. You DO NOT need to open a new one. |
809fad8
to
6f111d0
Compare
fa1c1ee
to
49d16e9
Compare
@vishesh92 What is the fix here? |
@manishtomar According to documentation, This PR fixes this issue and some minor formatting issues with cloudfront configuration docs. |
@vishesh92 Code looks good. However the build is failing due to linter check. Not sure why. Can you please check and see if something stands out w.r.t this PR? |
@manishtomar |
I triggered a build on master branch and Its failing there as well. https://travis-ci.org/vishesh92/distribution/builds/487321788 Its happening because version of gometalinter is not fixed and some changes were recently merged there: alecthomas/gometalinter#579 |
@vishesh92 Thanks for the info. Let me make a PR with fixes. |
Closed and reopened to trigger build |
Codecov Report
@@ Coverage Diff @@
## master #2837 +/- ##
=======================================
Coverage 60.45% 60.45%
=======================================
Files 102 102
Lines 8001 8001
=======================================
Hits 4837 4837
Misses 2517 2517
Partials 647 647
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.
Could you please address the comment? Thanks!
case "", "none": | ||
awsIPs = nil | ||
case "aws": | ||
newAWSIPs(ipRangesURL, updateFrequency, nil) |
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 noticed another bug (not w.r.t this PR): please assign this to awsIPs
:
awsIPs = newAWSIPs(ipRangesURL, updateFrequency, nil)
49d16e9
to
f7de676
Compare
@manishtomar I have made those changes. |
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 the changes @vishesh92. LGTM. @dmcgowan @caervs Could any of you merge this?
@dmcgowan @caervs @manishtomar any update on this? |
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.
@vishesh92 sorry for the delay. One last change from me and then I think we're good to merge.
Signed-off-by: Vishesh Jindal <vishesh92@gmail.com>
Signed-off-by: Vishesh Jindal <vishesh92@gmail.com>
f7de676
to
e1e72e9
Compare
@caervs resolved your comments. |
@vishesh92 thank you! |
@manishtomar According to documentation,
ipfilteredby
is not required. And if you don't setipfilteredby
for cloudfront middleware, registry crashes and you get the errorpanic: interface conversion: interface {} is nil, not string
.This PR fixes this issue and some minor formatting issues with cloudfront configuration docs.