Skip to content

Commit

Permalink
Merge branch 'main' into joel/cleanup-schema-wasm-action
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolg42 authored Oct 26, 2023
2 parents 661f7be + 51d8349 commit b017903
Show file tree
Hide file tree
Showing 29 changed files with 771 additions and 431 deletions.
27 changes: 19 additions & 8 deletions .buildkite/engineer
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,35 @@ else
echo "We are in the $2 pipeline."
fi

# Checks what's the diff with the previous commit
# This is used to detect if the previous commit was empty
GIT_DIFF=$(git diff --name-only HEAD HEAD~1 -- .)

# Checks what's the diff with the previous commit,
# excluding some paths that do not need a run,
# because they do not affect tests running in Buildkite.
GIT_DIFF=$(git diff --name-only HEAD HEAD~1 -- . ':!.github' ':!query-engine/driver-adapters/js' ':!renovate.json' ':!*.md' ':!LICENSE' ':!CODEOWNERS';)
GIT_DIFF_WITH_IGNORED_PATHS=$(git diff --name-only HEAD HEAD~1 -- . ':!.github' ':!query-engine/driver-adapters/js' ':!renovate.json' ':!*.md' ':!LICENSE' ':!CODEOWNERS';)

# $2 is either "test" or "build", depending on the pipeline
# Example: ./.buildkite/engineer pipeline test
# We only want to check for changes and skip in the test pipeline.
if [[ "$2" == "test" ]]; then
# Checking if GIT_DIFF is empty
# If it's empty then it's most likely that there are changes but they are in ignored paths.
# So we do not start Buildkite
# If GIT_DIFF is empty then the previous commit was empty
# We assume it's intended and we continue with the run
# Example use: to get a new engine hash built with identical code
if [ -z "${GIT_DIFF}" ]; then
echo "No changes found for the previous commit in paths that are not ignored, this run will now be skipped."
exit 0
echo "The previous commit is empty, this run will continue..."
else
# Note that printf works better for displaying line returns in CI
printf "Changes found for the previous commit in paths that are not ignored: \n\n%s\n\nThis run will continue...\n" "${GIT_DIFF}"
# Checking if GIT_DIFF_WITH_IGNORED_PATHS is empty
# If it's empty then it's most likely that there are changes but they are in ignored paths.
# So we do not start Buildkite
if [ -z "${GIT_DIFF_WITH_IGNORED_PATHS}" ]; then
echo "No changes found for the previous commit in paths that are not ignored, this run will now be skipped."
exit 0
else
# Note that printf works better for displaying line returns in CI
printf "Changes found for the previous commit in paths that are not ignored: \n\n%s\n\nThis run will continue...\n" "${GIT_DIFF_WITH_IGNORED_PATHS}"
fi
fi
fi

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/query-engine-black-box.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v3
continue-on-error: true
if: "${{ secrets.DOCKERHUB_USERNAME != '' && secrets.DOCKERHUB_TOKEN != '' }}"
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/query-engine-driver-adapters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
QUERY_BATCH_SIZE: '10'
WORKSPACE_ROOT: ${{ github.workspace }}

runs-on: buildjet-16vcpu-ubuntu-2004
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Expand All @@ -68,6 +68,7 @@ jobs:
- name: 'Login to Docker Hub'
uses: docker/login-action@v3
continue-on-error: true
if: "${{ secrets.DOCKERHUB_USERNAME != '' && secrets.DOCKERHUB_TOKEN != '' }}"
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/query-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v3
continue-on-error: true
if: "${{ secrets.DOCKERHUB_USERNAME != '' && secrets.DOCKERHUB_TOKEN != '' }}"
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/schema-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v3
continue-on-error: true
if: "${{ secrets.DOCKERHUB_USERNAME != '' && secrets.DOCKERHUB_TOKEN != '' }}"
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
Loading

0 comments on commit b017903

Please sign in to comment.