Conversation
16455e3 to
d5844f9
Compare
eloycoto
left a comment
There was a problem hiding this comment.
Nginx part LGTM, I cannot understand the circleCI changes.
| - login-docker: | ||
| command: | | ||
| IMAGE_TAG="${CIRCLE_TAG:-${CIRCLE_BRANCH}}" | ||
| CIRCLE_BRANCH_LOWER=`echo $CIRCLE_BRANCH | tr '[:upper:]' '[:lower:]'` |
There was a problem hiding this comment.
I do not think that these changes should be part of this PR, maybe a separate commit or separate PR. Why is needed?
There was a problem hiding this comment.
The s2i-runtime failed because it used the branch name as a tag for the docker image, but it fails with uppercase characters. This change is to transform them to lowercase
There was a problem hiding this comment.
I separated the circleci changes on a different commit
d5844f9 to
b663554
Compare
gateway/http.d/apicast.conf.liquid
Outdated
| default ''; | ||
| } | ||
|
|
||
| map $status $access_logs_enabled { |
There was a problem hiding this comment.
Maps works like switch..case selectors to set values to conditional variables in nginx, if I am not mistaken. If I understand correctly then, when default is provided alone, the value of the variable will be the default value (when even default is omitted, it will be the empty string, by the way).
So why using $status? Out of curiosity, would something like the following work instead?
| map $status $access_logs_enabled { | |
| map "" $access_logs_enabled { |
|
Does this PR need any further work or review? |
Under some error circumstances (like 414 Request-URI Too Large) the access log were generated in a phase previous to having defined the access_log_enabled and the extended_access_logs_enabled. This causes a warning to arise, but most importanty, prevented that acces to be logged. We use the workarround of declaring the variables as a map with a default value because maps can be used in the http context and therefore will be available and initialized even on the given error case.
b663554 to
22e39cb
Compare
THREESCALE-7906
Under some error circumstances (like 414 Request-URI Too Large) the access log were generated in a phase previous to having defined the access_log_enabled and the extended_access_logs_enabled.
This causes a warning to arise, but most importanty, prevented that acces to be logged.
We use the workarround of declaring the variables as a map with a default value because maps can be used in the http context and therefore will be available and initialized even on the given error case.