Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ jobs:
- run: make test-runtime-image gateway-logs --keep-going
- login-docker:
command: |
IMAGE_TAG="${CIRCLE_TAG:-${CIRCLE_BRANCH}}"
CIRCLE_BRANCH_LOWER=`echo $CIRCLE_BRANCH | tr '[:upper:]' '[:lower:]'`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think that these changes should be part of this PR, maybe a separate commit or separate PR. Why is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I separated the circleci changes on a different commit

IMAGE_TAG="${CIRCLE_TAG:-${CIRCLE_BRANCH_LOWER}}"
if [ "${IMAGE_TAG}" == "master" ]
then
IMAGE_TAG="latest"
Expand Down Expand Up @@ -179,7 +180,8 @@ jobs:

- login-docker:
command: |
IMAGE_TAG="${CIRCLE_TAG:-${CIRCLE_BRANCH}}-builder"
CIRCLE_BRANCH_LOWER=`echo $CIRCLE_BRANCH | tr '[:upper:]' '[:lower:]'`
IMAGE_TAG="${CIRCLE_TAG:-${CIRCLE_BRANCH_LOWER}}-builder"
if [ "${IMAGE_TAG}" == "master-builder" ]
then
IMAGE_TAG="latest-builder"
Expand Down Expand Up @@ -281,7 +283,7 @@ jobs:
machine: true
steps:
- checkout
- run: IMAGE_TAG=${CIRCLE_TAG:-${CIRCLE_BRANCH}} make benchmark
- run: IMAGE_TAG=`echo $CIRCLE_BRANCH | tr '[:upper:]' '[:lower:]'` make benchmark
- run: IMAGE_TAG=master make benchmark
- store_artifacts:
path: tmp/benchmark
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- Fixed issues with OIDC filters [PR #1304](https://github.com/3scale/APIcast/pull/1304) [THREESCALE-6042](https://issues.redhat.com/browse/THREESCALE-6042)
- Fixed issues with Upstream MTLS certs [PR #1307](https://github.com/3scale/APIcast/pull/1307) [THREESCALE-7508](https://issues.redhat.com/browse/THREESCALE-7508)
- Fixed warning messages [PR #1318](https://github.com/3scale/APIcast/pull/1318) [THREESCALE-7906](https://issues.redhat.com/browse/THREESCALE-7906)

### Added

Expand Down
15 changes: 12 additions & 3 deletions gateway/http.d/apicast.conf.liquid
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
log_format time '[$time_local] $target_host:$server_port $remote_addr:$remote_port "$request" $status $body_bytes_sent ($request_time) $post_action_impact';

map $status $extended_access_log {
# Use maps as variables because some logs can be raised out of the server context
# where variables cannot be set, this allow us to avoid a warning
map "" $extended_access_log {
default '';
}

map "" $access_logs_enabled {
default '1';
}

map "" $extended_access_logs_enabled {
default '0';
}


log_format extended escape=none '$extended_access_log';

server {
Expand Down Expand Up @@ -50,9 +61,7 @@ server {
server {
{% capture log_buffer %} {%if log_buffer_size %}buffer={{ log_buffer_size }} {% endif %} {% endcapture %}

set $access_logs_enabled '1';
access_log {{ access_log_file | default: "/dev/stdout" }} time if=$access_logs_enabled {{ log_buffer }};
set $extended_access_logs_enabled '0';
access_log {{ access_log_file | default: "/dev/stdout" }} extended if=$extended_access_logs_enabled {{ log_buffer }};

{%- assign http_port = port.apicast | default: 8080 %}
Expand Down