[UT] Remove Azure network dependency from filesystem cache test #55118
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: MERGE PIPELINE | ||
|
Check warning on line 1 in .github/workflows/ci-merged.yml
|
||
| on: | ||
| pull_request_target: | ||
| branches: | ||
| - main | ||
| - "branch-[0-9].[0-9]" | ||
| types: | ||
| - closed | ||
| permissions: | ||
| pull-requests: write | ||
| issues: write | ||
| actions: write | ||
| # get_next_release_tag.sh (version-label steps) reads /tags and /branches with | ||
| # GITHUB_TOKEN; with an explicit permissions block, unlisted scopes default to | ||
| # none, so grant contents:read or those queries are denied. | ||
| contents: read | ||
| env: | ||
| PR_NUMBER: ${{ github.event.number }} | ||
| jobs: | ||
| backport: | ||
| runs-on: ubuntu-latest | ||
| if: > | ||
| github.event.pull_request.merged == true && | ||
| github.base_ref == 'main' && | ||
| github.repository == 'StarRocks/starrocks' && | ||
| !contains(github.event.pull_request.title, 'cherry-pick') && | ||
| !contains(github.event.pull_request.title, 'backport') | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| version: ["4.1", "4.0", "3.5", "3.4", "3.3"] | ||
| env: | ||
| PR_NUMBER: ${{ github.event.number }} | ||
| steps: | ||
| - name: backport branch-${{ matrix.version }} | ||
| if: contains(github.event.pull_request.labels.*.name, matrix.version) | ||
| uses: thollander/actions-comment-pull-request@v2 | ||
| with: | ||
| message: | | ||
| @Mergifyio backport branch-${{ matrix.version }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - uses: actions-ecosystem/action-remove-labels@v1 | ||
| if: contains(github.event.pull_request.labels.*.name, matrix.version) | ||
| with: | ||
| labels: ${{ matrix.version }} | ||
| # Backport fan-out engine — DRY-RUN shadow. Runs alongside the static `backport` | ||
| # job above and only PRINTS the computed target set (never posts @Mergifyio), for | ||
| # reconciliation against the manual matrix before cutover. continue-on-error so it | ||
| # can never affect the merge. Depends on ci-tool #4910/#4911 being on the runner. | ||
| backport-fanout-shadow: | ||
| name: Backport Fan-out (dry-run shadow) | ||
| runs-on: [ self-hosted, quick ] | ||
| if: > | ||
| github.event.pull_request.merged == true && | ||
| github.base_ref == 'main' && | ||
| github.repository == 'StarRocks/starrocks' && | ||
| !contains(github.event.pull_request.title, 'cherry-pick') && | ||
| !contains(github.event.pull_request.title, 'backport') | ||
| continue-on-error: true | ||
| env: | ||
| PR_NUMBER: ${{ github.event.number }} | ||
| GH_TOKEN: ${{ secrets.PAT }} | ||
| steps: | ||
| - name: fan-out dry-run | ||
| run: | | ||
| rm -rf ./ci-tool && cp -rf /var/lib/ci-tool ./ci-tool && cd ci-tool && git pull && source lib/init.sh | ||
| python3 lib/backport_fanout_run.py --repo ${GITHUB_REPOSITORY} --pr ${PR_NUMBER} --dry-run | ||
| thirdparty-filter: | ||
| runs-on: ubuntu-latest | ||
| if: github.event.pull_request.merged == true | ||
| outputs: | ||
| thirdparty: ${{ steps.filter-info.outputs.thirdparty }} | ||
| centos7: ${{ steps.distro.outputs.centos7 }} | ||
| rocky9: ${{ steps.distro.outputs.rocky9 }} | ||
| steps: | ||
| - uses: dorny/paths-filter@v3 | ||
| id: linux-thirdparty-filter | ||
| with: | ||
| predicate-quantifier: every | ||
| filters: | | ||
| thirdparty: | ||
| - 'thirdparty/**' | ||
| - '!thirdparty/build-thirdparty-darwin.sh' | ||
| - '!thirdparty/vars-darwin-aarch64.sh' | ||
| dev_env: | ||
| - 'docker/dockerfiles/dev-env/dev-env.Dockerfile' | ||
| - name: Prepare filter info | ||
| id: filter-info | ||
| run: | | ||
| thirdparty=false | ||
| if [[ "${{ steps.linux-thirdparty-filter.outputs.thirdparty }}" == 'true' || "${{ steps.linux-thirdparty-filter.outputs.dev_env }}" == 'true' ]]; then | ||
| thirdparty=true | ||
| fi | ||
| echo "thirdparty=${thirdparty}" >> $GITHUB_OUTPUT | ||
| - name: Decide distros by version | ||
| id: distro | ||
| env: | ||
| BASE_REF: ${{ github.base_ref }} | ||
| run: | | ||
| # rocky9 replaces centos7 from 4.2 onward (CentOS 7 EOL): | ||
| # < 4.2 -> ubuntu + centos7 | ||
| # >= 4.2, main -> ubuntu + rocky9 | ||
| # Without this, a merge promotes a distro whose per-PR source image was | ||
| # never built (e.g. centos7 on main, or rocky9 on branch-4.1), and | ||
| # elastic-update-image.sh's `imagetools create` fails with "not found". | ||
| if [[ "${BASE_REF}" == "main" ]]; then | ||
| echo "centos7=false" >> $GITHUB_OUTPUT; echo "rocky9=true" >> $GITHUB_OUTPUT | ||
| else | ||
| ver=${BASE_REF#branch-}; major=${ver%%.*}; rest=${ver#*.}; minor=${rest%%.*} | ||
| if (( major > 4 || (major == 4 && minor >= 2) )); then | ||
| echo "centos7=false" >> $GITHUB_OUTPUT; echo "rocky9=true" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "centos7=true" >> $GITHUB_OUTPUT; echo "rocky9=false" >> $GITHUB_OUTPUT | ||
| fi | ||
| fi | ||
| thirdparty-update-image: | ||
| needs: thirdparty-filter | ||
| runs-on: [self-hosted, normal] | ||
| name: Thirdparty Update Image | ||
| if: github.event.pull_request.merged == true && needs.thirdparty-filter.outputs.thirdparty == 'true' | ||
| env: | ||
| PR_NUMBER: ${{ github.event.number }} | ||
| BRANCH: ${{ github.base_ref }} | ||
| REPO: ${{ github.repository }} | ||
| steps: | ||
| - name: clean | ||
| run: | | ||
| rm -rf ${{ github.workspace }} | ||
| mkdir -p ${{ github.workspace }} | ||
| - name: update image - ubuntu | ||
| run: | | ||
| rm -rf ./ci-tool && cp -rf /var/lib/ci-tool ./ci-tool && cd ci-tool && git pull && source lib/init.sh | ||
| ./bin/elastic-update-image.sh $BRANCH $PR_NUMBER ubuntu | ||
| - name: update image - centos7 | ||
| if: needs.thirdparty-filter.outputs.centos7 == 'true' | ||
| run: | | ||
| rm -rf ./ci-tool && cp -rf /var/lib/ci-tool ./ci-tool && cd ci-tool && git pull && source lib/init.sh | ||
| ./bin/elastic-update-image.sh $BRANCH $PR_NUMBER centos7 | ||
| - name: update image - rocky9 | ||
| if: needs.thirdparty-filter.outputs.rocky9 == 'true' | ||
| run: | | ||
| rm -rf ./ci-tool && cp -rf /var/lib/ci-tool ./ci-tool && cd ci-tool && git pull && source lib/init.sh | ||
| ./bin/elastic-update-image.sh $BRANCH $PR_NUMBER rocky9 | ||
| - name: Clean ENV | ||
| if: always() | ||
| run: | | ||
| rm -rf ${{ github.workspace }}/* | ||
| close_msg: | ||
| runs-on: [self-hosted, normal] | ||
| if: > | ||
| github.event.pull_request.merged == true && | ||
| github.base_ref == 'main' && | ||
| github.repository == 'StarRocks/starrocks' | ||
| env: | ||
| PR_NUMBER: ${{ github.event.number }} | ||
| steps: | ||
| - name: commit_sha | ||
| id: commit_sha | ||
| run: | | ||
| set -x | ||
| commit_sha=`curl -L \ | ||
| -H "Accept: application/vnd.github+json" \ | ||
| -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
| -H "X-GitHub-Api-Version: 2022-11-28" \ | ||
| https://api.github.com/repos/${{ github.repository }}/pulls/${PR_NUMBER} 2>/dev/null \ | ||
| | jq .merge_commit_sha` | ||
| commit_sha=$(echo ${commit_sha//\"}) | ||
| echo "commit_sha=${commit_sha}" >> $GITHUB_OUTPUT | ||
| - name: update merged coverage | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| rm -rf ./ci-tool && cp -rf /var/lib/ci-tool ./ci-tool && cd ci-tool && git pull && source lib/init.sh | ||
| ./bin/upload_cov_after_merge.sh --pr ${PR_NUMBER} --commit ${{ steps.commit_sha.outputs.commit_sha }} | ||
| - name: Clean ENV | ||
| if: always() | ||
| run: | | ||
| rm -rf ${{ github.workspace }}/* | ||
| clean_ci_workflow: | ||
| runs-on: ubuntu-latest | ||
| if: > | ||
| github.event.pull_request.merged != true | ||
| env: | ||
| PR_NUMBER: ${{ github.event.number }} | ||
| REPO: ${{ github.repository }} | ||
| BRANCH: ${{ github.base_ref }} | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| steps: | ||
| - name: cancel | ||
| run: | | ||
| if [[ "${BRANCH}" == "main" ]]; then | ||
| yaml=ci-pipeline.yml | ||
| else | ||
| yaml=ci-pipeline-branch.yml | ||
| fi | ||
| gh run list --workflow ${yaml} -R ${REPO} -b ${GITHUB_HEAD_REF} --json databaseId -q '.[].databaseId' | xargs gh run cancel -R ${REPO} || true | ||
| update_backport_merged_msg: | ||
| runs-on: [self-hosted, quick] | ||
| if: > | ||
| github.base_ref != 'main' && github.event.pull_request.merged == true | ||
| env: | ||
| PR_NUMBER: ${{ github.event.number }} | ||
| outputs: | ||
| VERSION_LABEL: ${{ steps.prepare_version_label.outputs.LABEL }} | ||
| steps: | ||
| - name: prepare merge label | ||
| if: > | ||
| !contains(github.event.pull_request.labels.*.name, 'sync') && | ||
| contains(github.event.pull_request.title, '(backport #') | ||
| env: | ||
| # Same-repo `gh label create`, no cascade; the sibling "add merge label" | ||
| # step already uses GITHUB_TOKEN. Off the shared PAT. | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| LABEL="${GITHUB_BASE_REF##*-}-merged" | ||
| gh label create "${LABEL}" -R ${GITHUB_REPOSITORY} -c 98C1D7 -f | ||
| - name: add merge label | ||
| if: > | ||
| always() && !contains(github.event.pull_request.labels.*.name, 'sync') && | ||
| contains(github.event.pull_request.title, '(backport #') | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| PR_TITLE: ${{ github.event.pull_request.title }} | ||
| run: | | ||
| LABEL="${GITHUB_BASE_REF##*-}-merged" | ||
| ORI_PR=$(echo "${PR_TITLE}" | grep -oP '\(backport #\K\d+' | tail -n 1) | ||
| gh api --method POST "/repos/${GITHUB_REPOSITORY}/issues/${ORI_PR}/labels" -f "labels[]=${LABEL}" | ||
| - name: prepare version label | ||
| id: prepare_version_label | ||
| if: always() | ||
| env: | ||
| # Same-repo tag/branch reads only. Use the per-run GITHUB_TOKEN (its own | ||
| # rate-limit budget) instead of the shared PAT: a PAT rate limit here made | ||
| # get_next_release_tag.sh fall back to <branch>.0 and post a wrong version. | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| rm -rf ./ci-tool && cp -rf /var/lib/ci-tool ./ci-tool && cd ci-tool && git pull >/dev/null | ||
| version=$(./scripts/get_next_release_tag.sh) | ||
| version_label="version:${version}" | ||
| echo "LABEL=${version_label}" >> $GITHUB_OUTPUT | ||
| gh label create "${version_label}" -R ${GITHUB_REPOSITORY} -c 1d76db -f | ||
| - name: add version label | ||
| if: always() | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| VERSION_LABEL: ${{ steps.prepare_version_label.outputs.LABEL }} | ||
| run: | | ||
| gh api --method POST "/repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" -f "labels[]=${VERSION_LABEL}" | ||
| update_version_label_for_main_feature: | ||
| runs-on: [self-hosted, quick] | ||
| if: > | ||
| github.base_ref == 'main' && github.event.pull_request.merged == true && | ||
| !contains(github.event.pull_request.labels.*.name, 'sync') && | ||
| startsWith(github.event.pull_request.title, '[Feature]') | ||
| env: | ||
| PR_NUMBER: ${{ github.event.number }} | ||
| outputs: | ||
| VERSION_LABEL: ${{ steps.prepare_version_label.outputs.LABEL }} | ||
| steps: | ||
| - name: prepare version label | ||
| id: prepare_version_label | ||
| if: always() | ||
| env: | ||
| # Same-repo tag/branch reads only. Use the per-run GITHUB_TOKEN (its own | ||
| # rate-limit budget) instead of the shared PAT: a PAT rate limit here made | ||
| # get_next_release_tag.sh fall back to <branch>.0 and post a wrong version. | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| rm -rf ./ci-tool && cp -rf /var/lib/ci-tool ./ci-tool && cd ci-tool && git pull >/dev/null | ||
| version=$(./scripts/get_next_release_tag.sh) | ||
| version_label="version:${version}" | ||
| echo "LABEL=${version_label}" >> $GITHUB_OUTPUT | ||
| gh label create "${version_label}" -R ${GITHUB_REPOSITORY} -c 1d76db -f | ||
| - name: add version label | ||
| if: always() | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| VERSION_LABEL: ${{ steps.prepare_version_label.outputs.LABEL }} | ||
| run: | | ||
| gh api --method POST "/repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" -f "labels[]=${VERSION_LABEL}" | ||
| update_feature_issue: | ||
| runs-on: [self-hosted, quick] | ||
| needs: | ||
| - update_backport_merged_msg | ||
| - update_version_label_for_main_feature | ||
| if: > | ||
| always() && !contains(github.event.pull_request.labels.*.name, 'sync') && startsWith(github.event.pull_request.title, '[Feature]') | ||
| env: | ||
| # get_pr_issue.py authenticates with the runner PAT (GITHUB_ACCESS_TOKEN) and falls back | ||
| # to GH_TOKEN when that PAT is missing or rejected. This job's permissions block already | ||
| # grants issues: write + pull-requests: write, which covers the issue body/label edits. | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| BRANCH_VERSION_LABEL: ${{ needs.update_backport_merged_msg.outputs.VERSION_LABEL }} | ||
| MAIN_VERSION_LABEL: ${{ needs.update_version_label_for_main_feature.outputs.VERSION_LABEL }} | ||
| steps: | ||
| - name: Update Issue Body & Label(main) | ||
| if: github.base_ref == 'main' && env.MAIN_VERSION_LABEL != '' | ||
| run: | | ||
| rm -rf ./ci-tool && cp -rf /var/lib/ci-tool ./ci-tool && cd ci-tool && git pull >/dev/null | ||
| python3 scripts/get_pr_issue.py update_issue ${GITHUB_REPOSITORY} ${PR_NUMBER} ${MAIN_VERSION_LABEL} | ||
| - name: Update Issue Body & Label(branch) | ||
| if: always() && github.base_ref != 'main' && env.BRANCH_VERSION_LABEL != '' | ||
| run: | | ||
| rm -rf ./ci-tool && cp -rf /var/lib/ci-tool ./ci-tool && cd ci-tool && git pull >/dev/null | ||
| python3 scripts/get_pr_issue.py update_issue ${GITHUB_REPOSITORY} ${PR_NUMBER} ${BRANCH_VERSION_LABEL} | ||
| merge_testcase: | ||
| runs-on: [self-hosted, quick] | ||
| env: | ||
| PR_NUMBER: ${{ github.event.number }} | ||
| GH_TOKEN: ${{ secrets.PAT }} | ||
| BRANCH: ${{ github.base_ref }} | ||
| if: > | ||
| github.base_ref == 'main' && github.event.pull_request.merged == true && !contains(github.event.pull_request.labels.*.name, 'sync') | ||
| steps: | ||
| - name: merge testcase | ||
| run: | | ||
| rm -rf ./ci-tool && cp -rf /var/lib/ci-tool ./ci-tool && cd ci-tool && git pull >/dev/null | ||
| ./scripts/merge-testcase.py --pr ${PR_NUMBER} --repo ${REPOSITORY} --branch ${BRANCH} | ||