Skip to content

Commit

Permalink
Merge branch 'master' into clean-flowtest
Browse files Browse the repository at this point in the history
  • Loading branch information
swilly22 committed Feb 18, 2024
2 parents f6b0c89 + 36ab4eb commit 195213d
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/actions/download-artifact/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
using: composite
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/upload-artifact/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:
shell: bash

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
if-no-files-found: ${{ inputs.if-no-files-found }}
name: ${{ inputs.name }}
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ name: Build on ubuntu
on:
workflow_dispatch:
pull_request:
branches: [master]
branches: [master, "[0-9]+.[0-9]+"]
push:
branches:
- master
- "[0-9]+.[0-9]+"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -110,7 +111,7 @@ jobs:
TARGETPLATFORM=${{ matrix.platform }}
- name: Upload tests image
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: falkordb-tests-${{ env.ARCH_SUFFIX }}
path: /tmp/falkordb-tests-${{ env.ARCH_SUFFIX }}.tar
Expand All @@ -130,7 +131,7 @@ jobs:
TARGETPLATFORM=${{ matrix.platform }}
- name: Upload image
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: falkordb-${{ env.ARCH_SUFFIX }}
path: /tmp/falkordb-${{ env.ARCH_SUFFIX }}.tar
Expand All @@ -149,7 +150,7 @@ jobs:
ARCH_SUFFIX: ${{ matrix.platform == 'linux/amd64' && 'x64' || 'arm64v8' }}
steps:
- name: Download image
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: falkordb-tests-${{ env.ARCH_SUFFIX }}
path: /tmp
Expand Down Expand Up @@ -180,7 +181,7 @@ jobs:
ARCH_SUFFIX: ${{ matrix.platform == 'linux/amd64' && 'x64' || 'arm64v8' }}
steps:
- name: Download image
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: falkordb-tests-${{ env.ARCH_SUFFIX }}
path: /tmp
Expand Down Expand Up @@ -211,7 +212,7 @@ jobs:
ARCH_SUFFIX: ${{ matrix.platform == 'linux/amd64' && 'x64' || 'arm64v8' }}
steps:
- name: Download image
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: falkordb-tests-${{ env.ARCH_SUFFIX }}
path: /tmp
Expand Down Expand Up @@ -242,7 +243,7 @@ jobs:
ARCH_SUFFIX: ${{ matrix.platform == 'linux/amd64' && 'x64' || 'arm64v8' }}
steps:
- name: Download image
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: falkordb-tests-${{ env.ARCH_SUFFIX }}
path: /tmp
Expand All @@ -258,4 +259,4 @@ jobs:
- name: Fuzz tests
run: |
docker run --platform ${{ matrix.platform }} --rm falkordb/falkordb-tests make fuzz TIMEOUT=180
docker run --platform ${{ matrix.platform }} --rm falkordb/falkordb-tests make fuzz TIMEOUT=180
75 changes: 58 additions & 17 deletions .github/workflows/release-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,40 @@ name: Release image to DockerHub

on:
workflow_dispatch:
inputs:
tag:
description: "Image tag"
required: true
commit_sha:
description: "Commit SHA"
required: true
workflow_run:
workflows: ["Build on ubuntu"]
types:
- completed
branches: [master, "[0-9]+.[0-9]+"]
release:
types: [published]
push:
branches:
- master

env:
BUILD_WORKFLOW_NAME: build.yml
BRANCH: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'master' || github.event.release.target_commitish }}
# Get the commit SHA from the event that triggered the workflow
# If the event is a workflow_dispatch, use the input value
# If the event is a workflow_run, use the head_commit.id
# If the event is a release, use the target_commitish
COMMIT_SHA: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.commit_sha || github.event_name == 'workflow_run' && github.event.workflow_run.head_commit.id || github.event_name == 'release' && github.event.release.target_commitish || github.sha }}

jobs:
release:
# Only run this job if the workflow_run event is successful or if the event is not a workflow_run
if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' || github.event_name != 'workflow_run' }}
runs-on: ubuntu-latest
steps:
- name: Retrieve built image AMD
uses: dawidd6/action-download-artifact@v3
with:
workflow: ${{ env.BUILD_WORKFLOW_NAME }}
branch: ${{ env.BRANCH }}
commit: ${{ env.COMMIT_SHA }}
workflow_conclusion: success
name: falkordb-x64
path: /tmp
Expand All @@ -30,7 +45,7 @@ jobs:
uses: dawidd6/action-download-artifact@v3
with:
workflow: ${{ env.BUILD_WORKFLOW_NAME }}
branch: ${{ env.BRANCH }}
commit: ${{ env.COMMIT_SHA }}
workflow_conclusion: success
name: falkordb-arm64v8
path: /tmp
Expand All @@ -47,20 +62,46 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Create manifest on PUSH
if: ${{ github.event_name == 'push' }}
- name: Set tag name
id: set_tag
run: |
docker buildx imagetools create -t falkordb/falkordb:edge \
falkordb/falkordb-x64 \
falkordb/falkordb-arm64v8
# If the event is a release, use the release tag name
if [ "${{ github.event_name }}" == "release" ]; then
TAG_NAME=${{ github.event.release.tag_name }}
echo "IS_LATEST=1" >> $GITHUB_ENV
fi
- name: Create manifest on RELEASE
if: ${{ github.event_name == 'release' }}
# If the event is a workflow_dispatch, use the input value
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
TAG_NAME=${{ github.event.inputs.tag }}
fi
# If the event is a workflow_run, and branch is master, set to "edge"
if [ "${{ github.event_name }}" == "workflow_run" ] && [ "${{ github.event.workflow_run.head_branch }}" == "master" ]; then
TAG_NAME="edge"
fi
# If the event is a workflow_run, and branch is not master, set to the branch name
if [ "${{ github.event_name }}" == "workflow_run" ] && [ "${{ github.event.workflow_run.head_branch }}" != "master" ]; then
TAG_NAME="v${{ github.event.workflow_run.head_branch }}"
fi
echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV
- name: Tag x64 and ARM images
run: |
docker buildx imagetools create -t falkordb/falkordb:${{ github.event.release.tag_name }} -t falkordb/falkordb:latest \
falkordb/falkordb-x64 \
falkordb/falkordb-arm64v8
docker tag falkordb/falkordb-x64 falkordb/falkordb:${{ env.TAG_NAME }}-x64
docker tag falkordb/falkordb-arm64v8 falkordb/falkordb:${{ env.TAG_NAME }}-arm64v8
- name: Push x64 and ARM images & create manifest
run: |
docker push falkordb/falkordb:${{ env.TAG_NAME }}-x64
docker push falkordb/falkordb:${{ env.TAG_NAME }}-arm64v8
docker buildx imagetools create -t falkordb/falkordb:${{ env.TAG_NAME }} ${{ env.IS_LATEST == '1' && '-t falkordb/falkordb:latest' || '' }} \
falkordb/falkordb:${{ env.TAG_NAME }}-x64 \
falkordb/falkordb:${{ env.TAG_NAME }}-arm64v8
- name: Inspect image
run: |
docker buildx imagetools inspect falkordb/falkordb:latest
docker buildx imagetools inspect falkordb/falkordb:${{ env.TAG_NAME }}
6 changes: 3 additions & 3 deletions .github/workflows/sanitize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: make unit-tests CLEAR_LOGS=0 SAN=address
continue-on-error: true

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: Upload unit tests logs
path: ${{ github.workspace }}/tests/unit/logs/
Expand All @@ -58,7 +58,7 @@ jobs:
run: make flow-tests CLEAR_LOGS=0 SAN=address
continue-on-error: true

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: Upload flow tests logs
path: ${{ github.workspace }}/tests/flow/logs/
Expand All @@ -69,7 +69,7 @@ jobs:
run: make tck-tests CLEAR_LOGS=0 SAN=address
continue-on-error: true

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: Upload TCK tests logs
path: ${{ github.workspace }}/tests/tck/logs/
Expand Down
4 changes: 2 additions & 2 deletions build/docker/run.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
export MODULE_DIR=/FalkorDB/bin/src

if [[ ${BROWSER} -eq 1 ]]
if [ ${BROWSER:-1} -eq 1 ]
then
if [ -d /FalkorDBBrowser ]
then
cd /FalkorDBBrowser && node server.js &
fi
fi

if [[ ${!TLS} -eq 1 ]]
if [ ${TLS:-0} -eq 1 ]
then
/FalkorDB/build/docker/gen-certs.sh
redis-server --protected-mode no ${REDIS_ARGS:-""} \
Expand Down
2 changes: 1 addition & 1 deletion src/commands/cmd_dispatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static int _read_flags

if(*timeout == CONFIG_TIMEOUT_NO_TIMEOUT && timeout_rw) {
Config_Option_get(Config_TIMEOUT_DEFAULT, timeout);
if(timeout == CONFIG_TIMEOUT_NO_TIMEOUT) {
if(*timeout == CONFIG_TIMEOUT_NO_TIMEOUT) {
*timeout = max_timeout;
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/flow/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ READIES=$ROOT/deps/readies

export PYTHONUNBUFFERED=1

VG_REDIS_VER=7.2-rc3
VG_REDIS_VER=7.2
VG_REDIS_SUFFIX=7.2
SAN_REDIS_VER=7.2-rc3
SAN_REDIS_VER=7.2
SAN_REDIS_SUFFIX=7.2

cd $HERE
Expand Down

0 comments on commit 195213d

Please sign in to comment.