[#11891] fix(lance): retry repair-on-load metadata update on optimistic-lock conflict #11307
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: Test Charts | |
| # Controls when the workflow will run | |
| on: | |
| pull_request: | |
| branches: [ "main", "branch-*" ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d | |
| id: filter | |
| with: | |
| filters: | | |
| source_changes: | |
| - .github/workflows/** | |
| - dev/charts/** | |
| outputs: | |
| source_changes: ${{ steps.filter.outputs.source_changes }} | |
| lint-test: | |
| needs: changes | |
| if: needs.changes.outputs.source_changes == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Helm | |
| uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 | |
| - uses: actions/setup-python@v5.3.0 | |
| with: | |
| python-version: '3.x' | |
| check-latest: true | |
| - name: Set up Cosign | |
| uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0 | |
| - name: Set up chart-testing | |
| run: | | |
| set -euo pipefail | |
| CT_VERSION=3.14.0 | |
| YAMLLINT_VERSION=1.33.0 | |
| YAMALE_VERSION=6.0.0 | |
| if [[ "$(uname -m)" == "aarch64" ]]; then | |
| arch=arm64 | |
| else | |
| arch=amd64 | |
| fi | |
| cache_dir="${RUNNER_TOOL_CACHE}/ct/${CT_VERSION}/${arch}" | |
| venv_dir="${cache_dir}/venv" | |
| if [[ ! -d "${cache_dir}" ]]; then | |
| mkdir -p "${cache_dir}" | |
| archive="chart-testing_${CT_VERSION}_linux_${arch}.tar.gz" | |
| release_url="https://github.com/helm/chart-testing/releases/download/v${CT_VERSION}" | |
| curl --retry 5 --retry-delay 1 -sSLo ct.tar.gz "${release_url}/${archive}" | |
| cosign verify-blob --certificate "${release_url}/${archive}.pem" --signature "${release_url}/${archive}.sig" \ | |
| --certificate-identity "https://github.com/helm/chart-testing/.github/workflows/release.yaml@refs/heads/main" \ | |
| --certificate-oidc-issuer "https://token.actions.githubusercontent.com" ct.tar.gz | |
| tar -xzf ct.tar.gz -C "${cache_dir}" | |
| rm -f ct.tar.gz | |
| python -m venv "${venv_dir}" | |
| "${venv_dir}/bin/python" -m pip install --upgrade pip | |
| "${venv_dir}/bin/python" -m pip install "yamllint==${YAMLLINT_VERSION}" "yamale==${YAMALE_VERSION}" | |
| fi | |
| echo "${cache_dir}" >> "${GITHUB_PATH}" | |
| echo "CT_CONFIG_DIR=${cache_dir}/etc" >> "${GITHUB_ENV}" | |
| echo "VIRTUAL_ENV=${venv_dir}" >> "${GITHUB_ENV}" | |
| echo "${venv_dir}/bin" >> "${GITHUB_PATH}" | |
| "${cache_dir}/ct" version | |
| - name: List changed | |
| id: list-changed | |
| run: | | |
| changed=$(ct list-changed --chart-dirs=dev/charts --target-branch ${{ github.event.pull_request.base.ref }}) | |
| if [[ -n "$changed" ]]; then | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Lint | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: | | |
| helm repo add bitnami https://charts.bitnami.com/bitnami | |
| ct lint --chart-dirs=dev/charts --chart-yaml-schema=dev/ci/chart_schema.yaml --lint-conf=dev/ci/lintconf.yaml --target-branch ${{ github.event.pull_request.base.ref }} --check-version-increment=false | |
| - name: Set up helm-unittest | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: helm plugin install https://github.com/helm-unittest/helm-unittest.git --version v1.1.0 --verify=false | |
| - name: Unit test Gravitino chart | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: helm unittest --with-subchart=false dev/charts/gravitino | |
| - name: Unit test Gravitino Iceberg REST Server chart | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: helm unittest --with-subchart=false dev/charts/gravitino-iceberg-rest-server | |
| - name: Unit test Gravitino Lance REST Server chart | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: helm unittest --with-subchart=false dev/charts/gravitino-lance-rest-server | |
| - name: Set up kind cluster | |
| if: steps.list-changed.outputs.changed == 'true' | |
| uses: container-tools/kind-action@v2 | |
| with: | |
| version: v0.27.0 | |
| cluster_name: helm-test-cluster | |
| registry: true | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Extract Image Tag | |
| id: get-tag | |
| run: | | |
| # Use yq to parse the value. Path typically follows .image.tag structure. | |
| IMAGE_TAG=$(yq '.image.tag' dev/charts/gravitino/values.yaml) | |
| # Remove any potential quotes and save to GitHub Outputs | |
| echo "tag=$(echo $IMAGE_TAG | tr -d '\"')" >> "$GITHUB_ENV" | |
| - name: Build the Docker image to local registry | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: | | |
| sudo rm -rf /usr/local/lib/android | |
| sudo rm -rf /opt/hostedtoolcache/CodeQL | |
| docker buildx use default | |
| rm -rf ${{ github.workspace }}/README.md | |
| rm -rf ${{ github.workspace }}/etc | |
| rm -rf ${{ github.workspace }}/dev/charts/gravitino/Chart.lock | |
| for t in gravitino:gravitino iceberg-rest-server:gravitino-iceberg-rest lance-rest-server:gravitino-lance-rest; do | |
| ( | |
| REPO_NAME=${t#*:} | |
| FOLDER_NAME=${t%:*} | |
| CONTEXT_DIR="${{ github.workspace }}/dev/docker/${FOLDER_NAME}/" | |
| . ${CONTEXT_DIR}/${FOLDER_NAME}-dependency.sh | |
| docker build -t ${KIND_REGISTRY}/${REPO_NAME}:${tag} "${CONTEXT_DIR}" | |
| docker push ${KIND_REGISTRY}/${REPO_NAME}:${tag} | |
| ) | |
| done | |
| - name: Set up kubectl | |
| uses: azure/setup-kubectl@829323503d1be3d00ca8346e5391ca0b07a9ab0d | |
| - name: Run chart-testing (install default,gravitino) | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: ct install --charts dev/charts/gravitino --target-branch ${{ github.event.pull_request.base.ref }} --helm-extra-set-args "--set image.registry="" --set image.repository=${KIND_REGISTRY}/gravitino" | |
| - name: Run chart-testing (install default,gravitino-iceberg-rest-server) | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: ct install --charts dev/charts/gravitino-iceberg-rest-server --target-branch ${{ github.event.pull_request.base.ref }} --helm-extra-set-args "--set image.registry="" --set image.repository=${KIND_REGISTRY}/gravitino-iceberg-rest" | |
| - name: Run chart-testing (install gravitino with mysql enable,replicas 2) | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: ct install --charts=dev/charts/gravitino --helm-extra-set-args "--values dev/charts/gravitino/resources/scenarios/ci-values.yaml --set image.registry="" --set image.repository=${KIND_REGISTRY}/gravitino" --target-branch ${{ github.event.pull_request.base.ref }} | |
| - name: Run chart-testing (install gravitino with postgresql enable) | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: ct install --charts=dev/charts/gravitino --helm-extra-set-args "--values dev/charts/gravitino/resources/scenarios/pg-values.yaml --set image.registry="" --set image.repository=${KIND_REGISTRY}/gravitino" --target-branch ${{ github.event.pull_request.base.ref }} | |
| - name: Run chart-testing (install default,gravitino-lance-rest-server) | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: | | |
| helm install gravitino dev/charts/gravitino -n test --create-namespace --set image.registry="" --set image.repository=${KIND_REGISTRY}/gravitino --wait --timeout 5m | |
| kubectl run -n test --rm -i --restart=Never --image=curlimages/curl:latest metalake-setup \ | |
| --command -- curl -X POST \ | |
| -H "Content-Type: application/json" \ | |
| -H "Accept: application/vnd.gravitino.v1+json" \ | |
| -d '{"name":"lrs_test","comment":"Quick setup"}' \ | |
| http://gravitino.test:8090/api/metalakes | |
| ct install --charts dev/charts/gravitino-lance-rest-server --target-branch ${{ github.event.pull_request.base.ref }} --helm-extra-set-args "--set image.registry="" --set image.repository=${KIND_REGISTRY}/gravitino-lance-rest --set lanceRest.gravitinoUri=http://gravitino.test:8090 --set lanceRest.gravitinoMetalake=lrs_test" |