Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
exit 1
fi
echo "pr_head_sha=${PR_HEAD_SHA}" >> "$GITHUB_OUTPUT"
for job in ubuntu-latest macos-latest windows-latest "ubuntu-latest, runtime 4.0"; do
for job in ubuntu-latest macos-latest windows-latest "ubuntu-latest, runtime 4.0" "ubuntu-latest, rest"; do
gh api "repos/${GITHUB_REPOSITORY}/statuses/${PR_HEAD_SHA}" \
-f state="pending" \
-f target_url="${RUN_URL}" \
Expand All @@ -136,7 +136,7 @@ jobs:
done

integration-test:
name: Run integration tests (${{ matrix.os }}${{ matrix.runtime != 'default' && format(', runtime {0}', matrix.runtime) || '' }})
name: Run integration tests (${{ matrix.os }}${{ matrix.runtime != 'default' && format(', runtime {0}', matrix.runtime) || '' }}${{ matrix.transport != 'grpc' && format(', {0}', matrix.transport) || '' }})
# `ControlCheck.dominates` (`ControlChecks.qll`) traverses `needs:`, so
# `authorize-gcbrun`'s `BashCommentVsHeadDateCheck` dominates this job's checkout.
needs: [authorize-gcbrun]
Expand All @@ -156,11 +156,21 @@ jobs:
# extra's pyspark-client. Other runtimes need their own pyspark, and
# their own Python for Python UDFs; they run on one OS only.
runtime: ["default"]
# Declare transport as a base axis so the REST include entry overwrites
# an existing key and adds a separate job rather than merging into
# ubuntu-latest.
transport: ["grpc"]
include:
- os: "ubuntu-latest"
runtime: "4.0"
transport: "grpc"
python-version: "3.13"
pyspark: "pyspark-client~=4.2.0"
- os: "ubuntu-latest"
Comment thread
dborowitz marked this conversation as resolved.
Resolved
runtime: "default"
transport: "rest"
api-endpoint: "dataproc.googleapis.com"
pytest-marker: "control_plane"

# Run on push to main, manual dispatch, non-Dependabot same-repo pull requests,
# or authorized /gcbrun PR comments (`needs.authorize-gcbrun.result == 'success'`).
Expand Down Expand Up @@ -256,8 +266,15 @@ jobs:
MANAGED_SPARK_CONNECT_SUBNET: ${{ vars.GCP_SUBNET || secrets.GCP_SUBNET }}
MANAGED_SPARK_CONNECT_AUTH_TYPE: "SERVICE_ACCOUNT"
MANAGED_SPARK_CONNECT_TEST_RUNTIME_VERSION: ${{ matrix.runtime != 'default' && matrix.runtime || '' }}
MANAGED_SPARK_CONNECT_DATAPROC_TRANSPORT: ${{ matrix.transport != 'grpc' && matrix.transport || '' }}
GOOGLE_CLOUD_DATAPROC_API_ENDPOINT: ${{ matrix.api-endpoint || '' }}
PYTEST_MARKER: ${{ matrix.pytest-marker || '' }}
run: |
python -m pytest tests/integration/ -v --tb=short -x
if [[ -n "$PYTEST_MARKER" ]]; then
Comment thread
dborowitz marked this conversation as resolved.
Resolved
python -m pytest tests/integration/ -v --tb=short -x -m "$PYTEST_MARKER"
else
python -m pytest tests/integration/ -v --tb=short -x
fi

- name: Report /gcbrun commit status
if: always() && github.event_name == 'issue_comment' && needs.authorize-gcbrun.outputs.pr_head_sha != ''
Expand All @@ -266,7 +283,7 @@ jobs:
JOB_STATUS: ${{ job.status }}
PR_HEAD_SHA: ${{ needs.authorize-gcbrun.outputs.pr_head_sha }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
STATUS_CONTEXT: Integration Tests / Run integration tests (${{ matrix.os }}${{ matrix.runtime != 'default' && format(', runtime {0}', matrix.runtime) || '' }})
STATUS_CONTEXT: Integration Tests / Run integration tests (${{ matrix.os }}${{ matrix.runtime != 'default' && format(', runtime {0}', matrix.runtime) || '' }}${{ matrix.transport != 'grpc' && format(', {0}', matrix.transport) || '' }})
run: |
if [[ "$JOB_STATUS" == "success" ]]; then
STATE="success"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ These environment variables change how the client behaves.
| `MANAGED_SPARK_CONNECT_SHOW_OPERATION_LINKS` | `true` | Default for `showOperationLinks()`. |
| `MANAGED_SPARK_CONNECT_PROGRESS_BAR` | `true` | Default for `showProgressBar()`. |
| `MANAGED_SPARK_CONNECT_PROGRESS_BAR_LEAVE` | `false` | Default for `progressBarLeave()`. |
| `MANAGED_SPARK_CONNECT_DATAPROC_TRANSPORT` | `grpc` | Transport for Dataproc control-plane calls (`grpc` or `rest`). Pair `rest` with `GOOGLE_CLOUD_DATAPROC_API_ENDPOINT=dataproc.googleapis.com` in environments whose egress allowlists permit `dataproc.googleapis.com` but not regional `*-dataproc.googleapis.com` hostnames. |

### Reusing Named Sessions Across Notebooks

Expand Down
Loading
Loading