Skip to content
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

Release 4.0.16 update #5962

Merged
merged 43 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
79f5724
Merging to release-4.0.14: [TT-2301] Create scope local variables for…
buger Jun 15, 2023
6943d3c
TT-9187 Update version.go (#5156)
maciejwojciechowski Jun 16, 2023
24f68ce
[TT-9199] Revert "[CI] Sync automation: Syncing commits from master" …
titpetric Jun 19, 2023
9633388
Merging to release-4.0.14: Backport TT-9177 to 4.3.4 (#5153) (#5228)
buger Jun 26, 2023
17134c3
[TT-9223] [release-4.0.14] pin goreleaser to working version (#5262)
titpetric Jul 4, 2023
7122d61
[TT-9223] Fix GitHub actions on 4.0.14 (#5266)
titpetric Jul 4, 2023
732814c
Tt 9177/fix revert debug logs to info log (#5270)
sredxny Jul 4, 2023
1b4445d
Version bump and branch creation
ilijabojanovic Oct 20, 2023
017e947
Merging to release-4.0.15: Merging to release-4-lts: [10308] Hide exp…
buger Oct 20, 2023
f547e47
[CI] Sync automation: Syncing commits from master
Tyk-ITS Jun 5, 2023
a2cd6c1
[CI] Sync automation: Syncing commits from master
Tyk-ITS Jun 7, 2023
a4f88e4
[CI] Sync automation: Syncing commits from master
Tyk-ITS Jun 15, 2023
62d4903
[CI] Sync automation: Syncing commits from master
Tyk-ITS Jun 16, 2023
7e7638d
[TT-9223] [release-4-lts] sync changes from 4.0.14 (#5265)
titpetric Jul 4, 2023
31a4902
[tests] Fix TestGroupResetHandler (#5583)
titpetric Oct 4, 2023
d3bfe9f
[TT-9987] [4-lts] Fix plugin compiler cves (#5578)
titpetric Oct 5, 2023
4fa6a1e
Merging to release-4-lts: [TT-7127] Fix goplugin invalid memory addre…
buger Oct 6, 2023
5d6b8e3
Merging to release-4-lts: [TT-10329] fix getargspec removal from pyth…
buger Oct 25, 2023
7069779
Merging to release-4-lts: Merging to release-4.3.8: [TT-9964] Prevent…
buger Nov 6, 2023
6158f50
Merging to release-4-lts: [TT-8547] Fix websocket error proxying (#4…
buger Nov 6, 2023
9a42e8f
[TT-10414] [release-4-lts] Fix python coprocess tests, pin protobuf d…
titpetric Nov 6, 2023
4f6ad7f
[TT-10432] Mark test as flaky (#5738)
titpetric Nov 6, 2023
9be5ac7
Merging to release-4-lts: [TT-9327] Decoding the URL request first, b…
buger Nov 6, 2023
271ee77
Merging to release-4-lts: [TT-9761] Add reload interval (#5418) (#5739)
buger Nov 6, 2023
e34a6a9
Merging to release-4-lts: [TT-9284] Ensure that old transport will cl…
buger Nov 6, 2023
089aeaf
Merging to release-4-lts: [TT-9924]remove muxer, proxy from explicitR…
buger Nov 6, 2023
f31f7fa
Merging to release-4-lts: TT-8942 Change default RPC pool size (#5030)
buger Nov 7, 2023
73b27d0
Merging to release-4-lts: TT-8934 Fix chunked response analytics (#54…
buger Nov 7, 2023
9afa372
Merging to release-4-lts: [TT-8558] Do not stop applying polices when…
buger Nov 7, 2023
d5132e2
Merging to release-4-lts: [TT-926] fix security vulnerability that ex…
buger Nov 7, 2023
169e9c3
Merging to release-4-lts: [TT-9829] Fix checking json.Marshal errors …
buger Nov 7, 2023
edf0508
Merging to release-4-lts: [TT-5988] Use defaults APISpec if no API ID…
buger Nov 7, 2023
9a1aa9b
Merging to release-4-lts: [TT-6446] Minimal approach to setting a con…
buger Nov 7, 2023
4f11fc1
Merging to release-4-lts: TT-10701, fix for urlRewrite encoding issue…
buger Dec 7, 2023
3c4ae82
Merging to release-4-lts: [TT-10189/TT-10467] Add OAuthPurgeLapsedTok…
buger Dec 21, 2023
c76e581
Merging to release-4-lts: [TT-10826] self trim oAuth sorted set (#590…
buger Dec 29, 2023
4614a59
Remove del-env, config docs (#5931)
titpetric Jan 8, 2024
d0c9a08
OIDC based AWS login
alephnull Jan 23, 2024
7d64317
test upgrades every time
alephnull Jan 23, 2024
ed353c2
Merge branch 'release-4-lts' into release-4.0.16-update
alephnull Jan 23, 2024
63faf3c
vbump
alephnull Jan 23, 2024
ddb27bf
vbump
alephnull Jan 23, 2024
f2488a4
Update api-tests.yml
ilijabojanovic Jan 23, 2024
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
95 changes: 8 additions & 87 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ jobs:
ci:
needs:
- goreleaser
permissions:
id-token: write # AWS OIDC JWT
contents: read # actions/checkout
runs-on: ubuntu-latest

steps:
Expand All @@ -177,31 +180,13 @@ jobs:
with:
fetch-depth: 1

- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
terraform_wrapper: false

- name: Get AWS creds from Terraform remote state
id: aws-creds
run: |
cd ci/terraform
terraform init -input=false
terraform refresh 2>&1 >/dev/null
eval $(terraform output -json tyk | jq -r 'to_entries[] | [.key,.value] | join("=")')
region=$(terraform output region | xargs)
[ -z "$key" -o -z "$secret" -o -z "$region" ] && exit 1
echo "secret=$secret" >> $GITHUB_OUTPUT
echo "key=$key" >> $GITHUB_OUTPUT
echo "region=$region" >> $GITHUB_OUTPUT

- name: Configure AWS credentials for use
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ steps.aws-creds.outputs.key }}
aws-secret-access-key: ${{ steps.aws-creds.outputs.secret }}
aws-region: ${{ steps.aws-creds.outputs.region }}
role-to-assume: arn:aws:iam::754489498669:role/ecr_rw_tyk
role-session-name: cipush
aws-region: eu-central-1
mask-aws-account-id: false

- name: Login to Amazon ECR
id: login-ecr
Expand All @@ -226,35 +211,6 @@ jobs:
${{ steps.login-ecr.outputs.registry }}/tyk:${{ needs.goreleaser.outputs.tag }}
${{ steps.login-ecr.outputs.registry }}/tyk:${{ github.sha }}

- name: Tell gromit about new build
id: gromit
run: |
# Remember to remove the true when TD-626 is fixed
curl -fsSL -H "Authorization: ${{secrets.GROMIT_TOKEN}}" 'https://domu-kun.cloud.tyk.io/gromit/newbuild' \
-X POST -d '{ "repo": "${{ github.repository}}", "ref": "${{ github.ref }}", "sha": "${{ github.sha }}" }' || true

- name: Tell integration channel
if: ${{ failure() }}
run: |
colour=bad
pretext=":boom: Could not add new build $${{ github.ref }} from ${{ github.repository }} to CD. Please review this run and correct it if needed. See https://github.com/TykTechnologies/tyk-ci/wiki/IntegrationEnvironment for what this is about."
curl https://raw.githubusercontent.com/rockymadden/slack-cli/master/src/slack -o /tmp/slack && chmod +x /tmp/slack
/tmp/slack chat send \
--actions '{"type": "button", "style": "primary", "text": "See log", "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"}' \
--author 'Bender' \
--author-icon 'https://hcoop.net/~alephnull/bender/bender-arms.jpg' \
--author-link 'https://github.com/TykTechnologies/tyk-ci' \
--channel '#service-integration' \
--color $colour \
--fields '{"title": "Repo", "value": "${{ github.repository }}", "short": false}' \
--footer 'github-actions' \
--footer-icon 'https://assets-cdn.github.com/images/modules/logos_page/Octocat.png' \
--image 'https://assets-cdn.github.com/images/modules/logos_page/Octocat.png' \
--pretext "$pretext" \
--text 'Commit message: ${{ github.event.head_commit.message }}' \
--title 'Failed to add new build for CD' \
--title-link 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'

sbom:
needs: ci
uses: TykTechnologies/github-actions/.github/workflows/sbom.yaml@main
Expand All @@ -265,7 +221,6 @@ jobs:
ORG_GH_TOKEN: ${{ secrets.ORG_GH_TOKEN }}

upgrade-deb:
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs: goreleaser
strategy:
Expand Down Expand Up @@ -417,37 +372,3 @@ jobs:
cd -
fi
done


# AWS updates only for stable releases
aws-mktplace-byol:
if: ( 'a' == 'b' )
runs-on: ubuntu-latest
needs:
- smoke-tests
strategy:
matrix:
flavour:
- al2
- rhel

steps:
- name: Checkout tyk
uses: actions/checkout@v3
with:
fetch-depth: 1

- uses: actions/download-artifact@v3
with:
name: rpm
path: aws

- name: Packer build
working-directory: ./ci/aws
run: |
export VERSION=${{ needs.goreleaser.outputs.tag }}
packer validate -var-file=${{ matrix.flavour }}.vars.json byol.pkr.hcl
packer build -var-file=${{ matrix.flavour }}.vars.json byol.pkr.hcl



1 change: 1 addition & 0 deletions ci/aws/hybrid/tyk_hybrid.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"enable_health_checks": false,
"health_check_value_timeouts": 60
},
"optimisations_use_async_session_write": true,
"allow_master_keys": false,
"policies": {
"policy_source": "rpc",
Expand Down
2 changes: 1 addition & 1 deletion ci/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apt-get install -y --no-install-recommends \
libpython3.7 \
python3.7-dev \
python3-pip \
&& pip3 install protobuf==3.20.1 grpcio==1.24.0 \
&& pip3 install protobuf grpcio==1.24.0 \
&& apt-get purge -y build-essential \
&& rm -rf /root/.cache
RUN apt-get autoremove -y
Expand Down
7 changes: 4 additions & 3 deletions ci/images/hybrid/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
FROM debian:bullseye-slim
FROM debian:buster-slim
ARG TARGETARCH

LABEL Description="Tyk Hybrid Gateway image" Vendor="Tyk"

RUN apt-get update \
&& apt-get dist-upgrade -y --no-install-recommends redis-server nginx \
python3-setuptools libpython3-dev curl ca-certificates \
python3-setuptools libpython3.7 python3.7-dev curl ca-certificates \
&& curl https://bootstrap.pypa.io/get-pip.py | python3 \
&& pip3 install --only-binary ":all:" grpcio protobuf==3.20.1 \
&& pip3 install --only-binary ":all:" grpcio protobuf \
&& apt-get autoremove -y \
&& rm -rf /usr/include/* && rm /usr/lib/*-linux-gnu/*.a && rm /usr/lib/*-linux-gnu/*.o \
&& rm /usr/lib/python3.7/config-3.7m-*-linux-gnu/*.a \
&& rm -rf /root/.cache \
&& rm -rf /var/lib/apt/lists/*

Expand Down
1 change: 1 addition & 0 deletions ci/images/hybrid/tyk/tyk.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"enable_health_checks": false,
"health_check_value_timeouts": 60
},
"optimisations_use_async_session_write": true,
"allow_master_keys": false,
"policies": {
"policy_source": "rpc",
Expand Down
1 change: 1 addition & 0 deletions ci/images/hybrid/tyk/tyk.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"enable_health_checks": false,
"health_check_value_timeouts": 60
},
"optimisations_use_async_session_write": true,
"allow_master_keys": false,
"policies": {
"policy_source": "mongo",
Expand Down
1 change: 1 addition & 0 deletions ci/install/data/tyk.standalone.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"enable_health_checks": false,
"health_check_value_timeouts": 60
},
"optimisations_use_async_session_write": true,
"enable_non_transactional_rate_limiter": true,
"enable_sentinel_rate_limiter": false,
"enable_redis_rolling_limiter": false,
Expand Down
2 changes: 1 addition & 1 deletion ci/tests/plugin-compiler/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
gw:
image: tykio/tyk-gateway:${tag}
volumes:
- ./testplugin/testplugin_${plugin_version}_${plugin_os}_${plugin_arch}.so:/opt/tyk-gateway/middleware/testplugin.so
- ./testplugin/testplugin.so:/opt/tyk-gateway/middleware/testplugin.so
- ./testplugin/apidef.json:/opt/tyk-gateway/apps/testplugin.json
ports:
- "0.0.0.0:8080:8080"
Expand Down
18 changes: 0 additions & 18 deletions ci/tests/plugin-compiler/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,7 @@ trap "$compose down" EXIT

rm -fv testplugin/*.so || true
docker run --rm -v `pwd`/testplugin:/plugin-source tykio/tyk-plugin-compiler:${tag} testplugin.so

# This ensures correct paths when running by hand
TYK_GW_PATH=$(readlink -f $(dirname $(readlink -f $0))/../../..)
# Get version from source code (will not include rc tags - same as ci/images/plugin-compiler build.sh)
TYK_GW_VERSION=$(perl -n -e'/v(\d+).(\d+).(\d+)/'' && print "v$1\.$2\.$3"' $TYK_GW_PATH/gateway/version.go)

# if params were not sent, then attempt to get them from env vars
if [[ $GOOS == "" ]] && [[ $GOARCH == "" ]]; then
GOOS=$(go env GOOS)
GOARCH=$(go env GOARCH)
fi

# pass plugin params
export plugin_version=${TYK_GW_VERSION}
export plugin_os=${GOOS}
export plugin_arch=${GOARCH}

$compose up -d

sleep 2 # Wait for init
curl -vvv http://localhost:8080/goplugin/headers
curl http://localhost:8080/goplugin/headers | jq -e '.headers.Foo == "Bar"' || { $compose logs gw; exit 1; }
2 changes: 1 addition & 1 deletion ci/tests/plugin-compiler/testplugin/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/TykTechnologies/tyk/ci/tests/plugin-compiler/testplugin

go 1.16
go 1.15

require (
github.com/HdrHistogram/hdrhistogram-go v1.1.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions ci/tests/plugin-compiler/testplugin/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
github.com/square/go-jose v2.4.1+incompatible/go.mod h1:7MxpAF/1WTVUu8Am+T5kNy+t0902CaLWM4Z745MkOa8=
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down Expand Up @@ -438,6 +439,7 @@ golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 h1:A1gGSx58LAGVHUUsOf7IiR0u8Xb6W51gRwfDBhkdcaw=
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
Expand Down Expand Up @@ -547,7 +549,9 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
gonum.org/v1/gonum v0.8.2 h1:CCXrcPKiGGotvnN6jfUsKk4rRqm7q09/YbKb5xCEvtM=
gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0=
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0 h1:OE9mWmgKkjJyEmDAAtGMPjXu+YNeGvK9VTSHY6+Qihc=
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
Expand Down
1 change: 0 additions & 1 deletion ci/tests/plugin-compiler/testplugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
var logger = log.Get()

// AddFooBarHeader adds custom "Foo: Bar" header to the request
//
//nolint:deadcode
func AddFooBarHeader(rw http.ResponseWriter, r *http.Request) {
r.Header.Add("Foo", "Bar")
Expand Down
12 changes: 0 additions & 12 deletions ci/tests/python-plugins/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ services:
image: redis
ports:
- "0.0.0.0:6379:6379"
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 5s
retries: 10
start_period: 2s
timeout: 10s

bundler:
build:
Expand All @@ -26,9 +20,3 @@ services:
- "0.0.0.0:8080:8080"
environment:
- TYK_LOGLEVEL=debug
wait:
image: hello-world:linux
depends_on:
redis:
condition: service_healthy

1 change: 1 addition & 0 deletions ci/tests/python-plugins/src/tyk.conf
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"enable_health_checks": false,
"health_check_value_timeouts": 0
},
"optimisations_use_async_session_write": false,
"allow_master_keys": true,
"hash_keys": true,
"hash_key_function": "murmur64",
Expand Down
2 changes: 1 addition & 1 deletion ci/tests/python-plugins/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ EOF
export tag=$1

docker-compose build && docker-compose up -d
sleep 10
sleep 4 # Wait to start
curl http://localhost:8080/pyplugin/headers | jq -e '.headers.Foo == "Bar"'
docker-compose down
2 changes: 1 addition & 1 deletion gateway/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package gateway

const VERSION = "v4.0.0"
const VERSION = "v4.0.15"
Loading