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

Ci/fix kgw test on v0.10 #1423

Merged
merged 1 commit into from
Feb 27, 2025
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
3 changes: 3 additions & 0 deletions .github/workflows/ci-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ jobs:

- name: Install Taskfile
uses: arduino/setup-task@v2
with:
# higher Github API rate limiting
repo-token: ${{ secrets.GITHUB_TOKEN }}

#ubuntu-latest has go 1.21 installed https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#go
#self-hosted also has go 1.21 installed
Expand Down
79 changes: 40 additions & 39 deletions .github/workflows/kgw-test-reuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,48 @@ jobs:
go version
task vendor

- name: Build cli binaries
run: |
task build:cli

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers for kwild # both restore and save
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache-kwild
key: ${{ runner.os }}-buildx-kwild-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-kwild

- name: manual git tag
run: |
version=`echo ${{ github.sha }} | cut -c 1-7`
echo "GIT_TAG=$version" >> $GITHUB_ENV

- name: manual build time
run: |
build_time=`TZ=UTC date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +"%Y-%m-%dT%H:%M:%SZ"`
echo "BUILD_TIME=$build_time" >> $GITHUB_ENV

- name: Build kwild image
id: docker_build_kwild
uses: docker/build-push-action@v6
with:
context: .
load: true
builder: ${{ steps.buildx.outputs.name }}
build-args: |
git_commit=${{ github.sha }}
version=${{ env.GIT_TAG }}
build_time=${{ env.BUILD_TIME }}
file: ./contrib/docker/kwild.dockerfile
push: false
tags: kwild:latest
cache-from: type=local,src=/tmp/.buildx-cache-kwild
cache-to: type=local,dest=/tmp/.buildx-cache-kwild-new

- name: Cache Docker layers for kgw # both restore and save
uses: actions/cache@v4
with:
Expand All @@ -113,6 +152,7 @@ jobs:
kdbDir=$(pwd)
echo "KDB_DIR=$(pwd)" >> $GITHUB_ENV
echo "current dir: " $kdbDir
rm -rf go.work
cd ..
rm -rf ./kgw
git config --global url."https://${GH_ACCESS_TOKEN}:[email protected]/kwilteam/".insteadOf "https://github.com/kwilteam/"
Expand Down Expand Up @@ -144,45 +184,6 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache-kgw
cache-to: type=local,dest=/tmp/.buildx-cache-kgw-new

- name: Cache Docker layers for kwild # both restore and save
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache-kwild
key: ${{ runner.os }}-buildx-kwild-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-kwild

- name: manual git tag
run: |
version=`echo ${{ github.sha }} | cut -c 1-7`
echo "GIT_TAG=$version" >> $GITHUB_ENV

- name: manual build time
run: |
build_time=`TZ=UTC date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +"%Y-%m-%dT%H:%M:%SZ"`
echo "BUILD_TIME=$build_time" >> $GITHUB_ENV

- name: Build kwild image
id: docker_build_kwild
uses: docker/build-push-action@v6
with:
context: .
load: true
builder: ${{ steps.buildx.outputs.name }}
build-args: |
git_commit=${{ github.sha }}
version=${{ env.GIT_TAG }}
build_time=${{ env.BUILD_TIME }}
file: ./contrib/docker/kwild.dockerfile
push: false
tags: kwild:latest
cache-from: type=local,src=/tmp/.buildx-cache-kwild
cache-to: type=local,dest=/tmp/.buildx-cache-kwild-new

- name: Build cli binaries
run: |
task build:cli

- name: Run kgw acceptance test
run: |
testUserID=$(id -u)
Expand Down
1 change: 1 addition & 0 deletions core/client/example/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2 changes: 1 addition & 1 deletion test/acceptance/act_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ var (
kgwSvc = &setup.CustomService{
ServiceName: "kgw",
DockerImage: "kgw:latest",
Command: `--log-level debug --log-outputs stdout /app/kgw.log --cors-allow-origins * --backends node0:8484 node1:8484 --domain http://localhost:8090 --statement 'Trust me ok?' --session-secret 'kgwtest' --chain-id kwil-testnet --allow-adhoc-query --devmode`,
Command: `--log-level debug --log-outputs stdout --cors-allow-origins * --backends node0:8484 node1:8484 --domain http://localhost:8090 --statement 'Trust me ok?' --session-secret 'kgwtest' --chain-id kwil-testnet --allow-adhoc-query --devmode`,
ExposedPort: "8090",
InternalPort: "8090",
ServiceProto: "http",
Expand Down
1 change: 1 addition & 0 deletions test/setup/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"time"

"github.com/docker/go-connections/nat"

"github.com/kwilteam/kwil-db/app/setup"
"github.com/kwilteam/kwil-db/config"
"github.com/kwilteam/kwil-db/core/crypto"
Expand Down
Loading