-
Notifications
You must be signed in to change notification settings - Fork 170
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
THREESCALE-7906 - initialization of $post_action_impact and $target_host variables as tables #1340
Conversation
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.
Summary of fix as I understand this:
THREESCALE-7906 reported 2 uninitialised variables being referenced in the access_logs so #1319 was fixing that BUT in fact once those were fixed another 2 variables were causing the same problem but were not caught because of a lack of testing for this log warning. Adding a test to catch this warn
statement will make future occurrences much easier to detect.
Fix and proper tests look good to me. Nice work @samugi 💪
gateway/http.d/apicast.conf.liquid
Outdated
@@ -14,6 +14,13 @@ map "" $extended_access_logs_enabled { | |||
default '0'; | |||
} | |||
|
|||
map "" $post_action_impact { | |||
default 0; |
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 think the value is defined as a string '0'
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've set it to empty string to reflect this
ee556b6
to
cff638e
Compare
@@ -14,6 +14,13 @@ map "" $extended_access_logs_enabled { | |||
default '0'; | |||
} | |||
|
|||
map "" $post_action_impact { |
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.
Shouldn't be removed from
APIcast/gateway/conf.d/apicast.conf
Line 159 in e17e421
set $post_action_impact ''; |
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.
currently investigating this. Removing this line would make sense but it seems to require reviewing our non-blackbox tests (that don't use apicast.conf.liquid).
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.
non blackbox tests conversion to Blackbox tracked here: #1343
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.
done!
cff638e
to
5d1e799
Compare
As a follow up to #1319, 2 more variables require to be initialized with a default value to avoid generating "uninitialized variables" logs in case a large URI is passed in the request (that causes 414 Request-URI Too Large): $target_host and $post_action_impact