diff --git a/.github/actionlint.yml b/.github/actionlint.yml new file mode 100644 index 0000000000..fddd2f980d --- /dev/null +++ b/.github/actionlint.yml @@ -0,0 +1,8 @@ +self-hosted-runner: + labels: + - gen3 + - large + - small + - us-east-2 +config-variables: + - SLACK_UPCOMING_RELEASE_CHANNEL_ID diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 0000000000..584828c1d0 --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,31 @@ +name: Lint GitHub Workflows + +on: + push: + branches: + - main + - release + paths: + - '.github/workflows/*.ya?ml' + pull_request: + paths: + - '.github/workflows/*.ya?ml' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + actionlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: reviewdog/action-actionlint@v1 + env: + # SC2046 - Quote this to prevent word splitting. - https://www.shellcheck.net/wiki/SC2046 + # SC2086 - Double quote to prevent globbing and word splitting. - https://www.shellcheck.net/wiki/SC2086 + SHELLCHECK_OPTS: --exclude=SC2046,SC2086 + with: + fail_on_error: true + filter_mode: nofilter + level: error diff --git a/.github/workflows/approved-for-ci-run.yml b/.github/workflows/approved-for-ci-run.yml index bcd042e608..17c42db0d2 100644 --- a/.github/workflows/approved-for-ci-run.yml +++ b/.github/workflows/approved-for-ci-run.yml @@ -96,7 +96,7 @@ jobs: - run: | HEAD="ci-run/pr-${PR_NUMBER}" - CLOSED="$(gh pr --repo '${GITHUB_REPOSITORY}' list --head '${HEAD}' --json 'closed' --jq '.[].closed')" + CLOSED="$(gh pr --repo ${GITHUB_REPOSITORY} list --head ${HEAD} --json 'closed' --jq '.[].closed')" if [ "${CLOSED}" != "false" ]; then gh pr --repo "${GITHUB_REPOSITORY}" close "ci-run/pr-${{ github.event.pull_request.number }}" --delete-branch fi diff --git a/.github/workflows/benchmarking.yml b/.github/workflows/benchmarking.yml index 464b764d1a..e2f15d96db 100644 --- a/.github/workflows/benchmarking.yml +++ b/.github/workflows/benchmarking.yml @@ -137,11 +137,11 @@ jobs: }' if [ "$(date +%A)" = "Saturday" ]; then - matrix=$(echo $matrix | jq '.include += [{ "platform": "rds-postgres", "db_size": "10gb"}, + matrix=$(echo "$matrix" | jq '.include += [{ "platform": "rds-postgres", "db_size": "10gb"}, { "platform": "rds-aurora", "db_size": "50gb"}]') fi - echo "matrix=$(echo $matrix | jq --compact-output '.')" >> $GITHUB_OUTPUT + echo "matrix=$(echo "$matrix" | jq --compact-output '.')" >> $GITHUB_OUTPUT - name: Generate matrix for OLAP benchmarks id: olap-compare-matrix @@ -153,11 +153,11 @@ jobs: }' if [ "$(date +%A)" = "Saturday" ]; then - matrix=$(echo $matrix | jq '.include += [{ "platform": "rds-postgres" }, + matrix=$(echo "$matrix" | jq '.include += [{ "platform": "rds-postgres" }, { "platform": "rds-aurora" }]') fi - echo "matrix=$(echo $matrix | jq --compact-output '.')" >> $GITHUB_OUTPUT + echo "matrix=$(echo "$matrix" | jq --compact-output '.')" >> $GITHUB_OUTPUT - name: Generate matrix for TPC-H benchmarks id: tpch-compare-matrix @@ -172,11 +172,11 @@ jobs: }' if [ "$(date +%A)" = "Saturday" ]; then - matrix=$(echo $matrix | jq '.include += [{ "platform": "rds-postgres", "scale": "10" }, + matrix=$(echo "$matrix" | jq '.include += [{ "platform": "rds-postgres", "scale": "10" }, { "platform": "rds-aurora", "scale": "10" }]') fi - echo "matrix=$(echo $matrix | jq --compact-output '.')" >> $GITHUB_OUTPUT + echo "matrix=$(echo "$matrix" | jq --compact-output '.')" >> $GITHUB_OUTPUT pgbench-compare: needs: [ generate-matrices ] @@ -254,7 +254,7 @@ jobs: echo "connstr=${CONNSTR}" >> $GITHUB_OUTPUT QUERY="SELECT version();" - if [ "${PLATFORM}" = "neon"* ]; then + if [[ "${PLATFORM}" = "neon"* ]]; then QUERY="${QUERY} SHOW neon.tenant_id; SHOW neon.timeline_id;" fi psql ${CONNSTR} -c "${QUERY}" @@ -383,7 +383,7 @@ jobs: echo "connstr=${CONNSTR}" >> $GITHUB_OUTPUT QUERY="SELECT version();" - if [ "${PLATFORM}" = "neon"* ]; then + if [[ "${PLATFORM}" = "neon"* ]]; then QUERY="${QUERY} SHOW neon.tenant_id; SHOW neon.timeline_id;" fi psql ${CONNSTR} -c "${QUERY}" @@ -487,7 +487,7 @@ jobs: echo "connstr=${CONNSTR}" >> $GITHUB_OUTPUT QUERY="SELECT version();" - if [ "${PLATFORM}" = "neon"* ]; then + if [[ "${PLATFORM}" = "neon"* ]]; then QUERY="${QUERY} SHOW neon.tenant_id; SHOW neon.timeline_id;" fi psql ${CONNSTR} -c "${QUERY}" @@ -577,7 +577,7 @@ jobs: echo "connstr=${CONNSTR}" >> $GITHUB_OUTPUT QUERY="SELECT version();" - if [ "${PLATFORM}" = "neon"* ]; then + if [[ "${PLATFORM}" = "neon"* ]]; then QUERY="${QUERY} SHOW neon.tenant_id; SHOW neon.timeline_id;" fi psql ${CONNSTR} -c "${QUERY}" diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index a1494ac40c..898d19e7d4 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -254,10 +254,12 @@ jobs: cov_prefix="" CARGO_FLAGS="--locked --release" fi - echo "cov_prefix=${cov_prefix}" >> $GITHUB_ENV - echo "CARGO_FEATURES=${CARGO_FEATURES}" >> $GITHUB_ENV - echo "CARGO_FLAGS=${CARGO_FLAGS}" >> $GITHUB_ENV - echo "CARGO_HOME=${GITHUB_WORKSPACE}/.cargo" >> $GITHUB_ENV + { + echo "cov_prefix=${cov_prefix}" + echo "CARGO_FEATURES=${CARGO_FEATURES}" + echo "CARGO_FLAGS=${CARGO_FLAGS}" + echo "CARGO_HOME=${GITHUB_WORKSPACE}/.cargo" + } >> $GITHUB_ENV # Disabled for now # Don't include the ~/.cargo/registry/src directory. It contains just @@ -1009,7 +1011,7 @@ jobs: last_status="" # a variable to carry the last status of the "build-and-upload-extensions" context - for ((i=0; i <= $TIMEOUT; i+=$INTERVAL)); do + for ((i=0; i <= TIMEOUT; i+=INTERVAL)); do sleep $INTERVAL # Get statuses for the latest commit in the PR / branch