Skip to content

Rename Dataproc Spark Connect to Managed Spark Connect - #188

Open
ajma wants to merge 7 commits into
mainfrom
rename-dataproc-to-managed-spark
Open

Rename Dataproc Spark Connect to Managed Spark Connect#188
ajma wants to merge 7 commits into
mainfrom
rename-dataproc-to-managed-spark

Conversation

@ajma

@ajma ajma commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Renames the package/module/class surface from Dataproc-branded names to Managed Spark Connect: google.cloud.dataproc_spark_connectgoogle.cloud.managed_spark_connect, google.cloud.dataproc_magicsgoogle.cloud.managed_spark_magics, DataprocSparkSessionManagedSparkSession, DataprocMagicsManagedSparkMagics, and the PyPI distribution dataproc-spark-connectgoogle-cloud-managed-spark-connect.
  • Renames the sessionTemplate() builder method to runtimeProfile(), and the library's own DATAPROC_SPARK_CONNECT_* env vars to MANAGED_SPARK_CONNECT_*.
  • This is a clean, breaking rename — no backward-compatible shims are kept. Anyone upgrading to the new package needs to update their imports, builder calls, and env vars (documented in the new README "Migrating from dataproc-spark-connect" section).
  • Leaves references to the actual underlying GCP Dataproc API unchanged (google-cloud-dataproc dependency, dataproc_v1 imports, dataprocSessionConfig/dataprocSessionId methods, dataproc.googleapis.com endpoints) since those name real external resources, not this library's branding.
  • Updates README, DEVELOPING.md, .env.example, CI workflow env vars, and the Cloud Build image tags accordingly.
  • Pins GitHub Actions in integration-tests.yaml to commit SHAs and stops extracting secret fields via fromJson(secrets.*) in expressions (fixes zizmor security findings).

Test plan

  • pytest tests/unit — 161 passed (1 pre-existing, environment-dependent test deselected: it assumes google.auth.default() fails with no ADC configured, which doesn't hold when running on GCP-hosted infra with metadata-server credentials)
  • pyink --check passes on all touched files
  • python -m build + twine check dist/* passes under the new google-cloud-managed-spark-connect distribution name
  • zizmor reports zero findings on integration-tests.yaml

Renames the package, modules, and public classes from Dataproc-branded
names to Managed Spark Connect (DataprocSparkSession -> ManagedSparkSession,
dataproc_spark_connect -> managed_spark_connect, dataproc_magics ->
managed_spark_magics, PyPI package dataproc-spark-connect ->
managed-spark-connect). The sessionTemplate() builder method is renamed to
runtimeProfile(), and the DATAPROC_SPARK_CONNECT_* env vars gain
MANAGED_SPARK_CONNECT_* equivalents.

Old import paths, class names, sessionTemplate(), and env var names are
kept as deprecated aliases that emit a DeprecationWarning, so existing
integrations keep working. References to the actual underlying GCP
Dataproc API (google-cloud-dataproc, dataproc_v1, dataprocSessionConfig/
dataprocSessionId, dataproc.googleapis.com) are left unchanged since they
name real external resources, not this library's branding.
gemini-code-assist[bot]

This comment was marked as off-topic.

@ajma
ajma requested review from dborowitz, fangyh20 and medb August 26, 2026 18:46
ajma added 2 commits August 26, 2026 13:57
requirements-dev.txt pins pyink~=24.0, but the pyink CI workflow
installs the latest unpinned version (26.5.1), which enforces a blank
line after module docstrings.
Pins all action references to commit SHAs, adds an explicit
contents: read permission, sets persist-credentials: false on
checkout, and stops extracting secret fields via fromJson(secrets.*)
in expressions (which bypasses GitHub's log redaction) in favor of
a dedicated step that masks the derived values explicitly.
@ajma

ajma commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

I removed the Gemini comments since this PR is just file renames but that seems to trigger Gemini

Comment thread README.md Outdated
ajma added 4 commits August 27, 2026 10:10
Aligns with Google's naming convention for other google-cloud-*
client libraries rather than the shorter managed-spark-connect.
…Spark rename

Removes the google.cloud.dataproc_spark_connect / google.cloud.dataproc_magics
shim packages, the DataprocSparkSession/DataprocMagics aliases, the
sessionTemplate() deprecated alias for runtimeProfile(), and the
DATAPROC_SPARK_CONNECT_* env var fallback. Anyone moving to the new
google-cloud-managed-spark-connect package needs to update their imports,
builder calls, and env vars directly rather than relying on a
deprecation period.
Spells out each breaking change individually (package name, imports,
sessionTemplate() -> runtimeProfile(), env var prefix) with code
examples instead of a flat bullet list, since sessionTemplate ->
runtimeProfile in particular isn't obvious from a name-only diff.
Undo the runtimeProfile() rename; the method still sets
Session.session_template but keeps its original name.
@ajma
ajma requested a review from medb August 27, 2026 18:18
@ajma ajma assigned medb and unassigned medb Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants