WIP: Test CI #37
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: Protos | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| paths: | |
| - .github/workflows/protos.yml | |
| - dev/generate_protos.py | |
| - dev/generate-protos.sh | |
| - dev/test-generate-protos.sh | |
| - mlflow/protos/** | |
| - mlflow/java/client/src/main/java/com/databricks/api/proto/** | |
| # graphql related code changes could trigger changes in the autogenerated schema | |
| - mlflow/server/graphql/** | |
| - mlflow/server/js/src/graphql/** | |
| - requirements/skinny-requirements.yaml | |
| - requirements/core-requirements.yaml | |
| env: | |
| MLFLOW_HOME: ${{ github.workspace }} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| protos: | |
| if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| repository: ${{ github.event.inputs.repository }} | |
| ref: ${{ github.event.inputs.ref }} | |
| - uses: ./.github/actions/setup-python | |
| - name: Check OpenTelemetry protos are up-to-date | |
| run: | | |
| ./mlflow/protos/opentelemetry/update.sh | |
| GIT_STATUS="$(git status --porcelain mlflow/protos/opentelemetry/)" | |
| if [ "$GIT_STATUS" ]; then | |
| echo "OpenTelemetry proto files are outdated. Please run './mlflow/protos/opentelemetry/update.sh'" | |
| echo "Git status:" | |
| echo "$GIT_STATUS" | |
| exit 1 | |
| fi | |
| - name: Run tests | |
| run: | | |
| ./dev/test-generate-protos.sh | |
| - name: Test | |
| run: | | |
| uv run python -c "from google.protobuf.internal import api_implementation; assert api_implementation.Type() != 'python'" | |
| uv run python -c "import mlflow" | |
| # Ensure mlflow works fine with the python backend. See the following link for more details: | |
| # https://github.com/protocolbuffers/protobuf/tree/main/python#implementation-backends | |
| export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | |
| uv run python -c "from google.protobuf.internal import api_implementation; assert api_implementation.Type() == 'python'" | |
| uv run python -c "import mlflow" |