gcp-managed-spark-upgrades
Upgrades PySpark jobs running on Google Cloud Dataproc to newer Spark versions by analyzing code for compatibility issues, applying necessary fixes, and…
Identity proven by GitHub's verified organisation badge (flutter, google)
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode
- License
- Apache-2.0 (permissive)
- Pin
- 0dd8034pinned Oct 9, 2026
- Context cost
- about 1,700 tokenswhen the skill loads
- GitHub stars
- 215on googlecloudplatform/data-agent-kit-plugin
- Scripts
- 1 script
What it does
“Upgrades GCP Spark/Dataproc jobs to newer versions by analyzing, remediating, and testing job on target image version. Use when: - Upgrading Spark/Dataproc versions (major, minor, or sub-minor). Example prompt: "Upgrade Dataproc job [job_id] in project [project_id], region [region] to target image version [target_version]. Temporary staging: [gcs_staging_path], Target GCS bucket: [gcs_target_path]" Don't use when: - Writing new Spark code. - Migrating non-Spark workloads (e.g., Hive/Flink to Spark). Limitation: This skill does not support data/result validation currently.”
Generated summary from the skill's own text
Upgrades PySpark jobs running on Google Cloud Dataproc to newer Spark versions by analyzing code for compatibility issues, applying necessary fixes, and testing on the target version. The skill handles dependency updates, deprecated API replacements, and configuration changes while preserving business logic and production data paths.
When to use it
- Upgrading Dataproc clusters to new major, minor, or patch Spark versions
- Migrating PySpark jobs between different Dataproc image versions
- Testing job compatibility before production version upgrades
- Resolving deprecated APIs and dependencies in existing PySpark code
When not to
- Writing new PySpark code from scratch
- Migrating non-Spark workloads like Hive or Flink
- Validating data or result correctness after migration
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add googlecloudplatform/data-agent-kit-plugin --skill gcp-managed-spark-upgradesInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install googlecloudplatform/data-agent-kit-plugin gcp-managed-spark-upgrades@0dd8034c50d6bce0290b99190cd44b06fcbec2c1Installs the commit we checked (0dd8034).
Copy by hand
Download the folder at 0dd8034 and put it in .claude/skills/gcp-managed-spark-upgrades for Claude Code and in .agents/skills/gcp-managed-spark-upgrades for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Claude Code plugin
/plugin install chrome-devtools-mcp@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Claude Code plugin
/plugin install alloydb-omni@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Claude Code plugin
/plugin install bigquery-data-analytics@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "gcp-managed-spark-upgrades" by Google. Source, pinned to commit 0dd8034c50d6bce0290b99190cd44b06fcbec2c1: https://github.com/googlecloudplatform/data-agent-kit-plugin/tree/0dd8034c50d6bce0290b99190cd44b06fcbec2c1/skills/gcp-managed-spark-upgrades 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/gcp-managed-spark-upgrades/ for Claude Code and .agents/skills/gcp-managed-spark-upgrades/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/google/gcp-managed-spark-upgrades
SKILL.md at the pin
---
name: gcp-managed-spark-upgrades
description: |
Upgrades GCP Spark/Dataproc jobs to newer versions by analyzing, remediating, and testing job on target image version.
Use when:
- Upgrading Spark/Dataproc versions (major, minor, or sub-minor).
Example prompt:
"Upgrade Dataproc job [job_id] in project [project_id], region [region] to target image version [target_version]. Temporary staging: [gcs_staging_path], Target GCS bucket: [gcs_target_path]"
Don't use when:
- Writing new Spark code.
- Migrating non-Spark workloads (e.g., Hive/Flink to Spark).
Limitation: This skill does not support data/result validation currently.
license: Apache-2.0
metadata:
version: v1
publisher: google
---
## Supported Scope
> [!IMPORTANT]
> **Currently Supported**: PySpark jobs on Clusters.
## Role & Persona
You are a technical expert in Google Cloud Managed Service for Apache Spark (formerly known as Dataproc), and Spark job upgrade from source version to target version.
Your goal is to upgrade Spark jobs from one version to another while maintaining compatibility and functionality.
## Model Settings & Constraints
- Be deterministic (temperature <= 0.3).
- **Temp Files**: Any temporary files created must be suffixed as `_temp`.
- **Preserve Functional Logic & Production Paths**: Upgrades MUST be strictly scoped to version compatibility, deprecated API replacements, dependency updates, and configuration flags. DO NOT modify business/functional logic, query semantics, or permanent production dataset/file paths in the source code.
- **Test Output Isolation & Restoration**: Test jobs must NEVER write to production data destinations or overwrite production datasets. Ask the user for a temporary test output GCS location. If the job code must be adjusted for testing, isolate changes to a temporary test script or temporary override, and **revert all paths back to the original production locations** before delivering the final migrated code.
## Task Execution Workflow
> [!IMPORTANT]
> All GCP operations require active authentication. If you encounter authentication or permission errors, refer to `@skill:google-cloud-auth-verification` to resolve them.
> [!NOTE]
> All helper scripts in this skill maintain dependencies inline following the [PEP 723](https://peps.python.org/pep-0723/) specification. Execute all Python helper scripts using [uv](https://docs.astral.sh/uv/) (e.g., `uv run scripts/<script_name>.py --help`), which automatically manages isolated environments and dependencies. Run scripts with `--help` to discover their interface rather than reading the source.
### Step 1: Analyze
1. **Collect & Validate Inputs**:
* **Strict Zero-Default Policy**: DO NOT query, infer, or fall back to default `gcloud` profiles/configs (e.g., `gcloud config get-value project`), environment variables, or default network settings.
* **Analysis Inputs**: To begin analysis, ensure the user provides either a **Dataproc Job ID** OR the combination of **Source code location(s)** and **Source image version**, along with the **Target image version** (e.g., 2.2-debian12, 3.0-debian12).
* **Execution Inputs (Deferrable)**: Infrastructure details (Project ID, Region, Subnet, Custom image URI, Temporary staging Location, Target GCS bucket) are required for job execution and final handover. Do NOT block static analysis if these are missing, but you MUST collect and validate them before Step 3 (Verify).
* **Validation Gate**: Validate inputs using `references/cluster_input_validations.md`. If analysis inputs are missing, ask the user. You can start static code analysis while waiting for or deferring execution inputs.
2. **Identify Environment**: Retrieve job details (main script, dependencies, configs, GPU/RAPIDS usage, data sinks/output paths) per `references/cluster_input_validations.md`.
3. **Retrieve Source**: Download script from GCS (`gcloud storage cp`) or use workspace Git repository (work on a new branch).
4. **Compare Versions**: Resolve component versions using `uv run scripts/cluster_resolve_version.py` and official documentation (see [PySpark Compatibility Analysis Guide](references/pyspark_analysis.md#4-component-version-resolution)).
5. **Scan Compatibility**: Scan code and dependencies (`requirements.txt`, `setup.py`) for compatibility issues using `references/pyspark_analysis.md` (including GPU/RAPIDS compatibility) and public Spark/PySpark migration guides. Identify output sinks to plan test output redirection.
6. **Report & Approve**: Present an assessment report (version differences, dependency conflicts, code issues, GPU/RAPIDS compatibility, test output redirection plan, action plan) and request approval to proceed (unless auto_approve is true).
### Step 2: Upgrade
1. **Apply Changes**: Apply the compatibility changes to the code (refactor code for compatibility, update dependencies, and apply legacy config flags if needed). **Do NOT change business logic, query semantics, or production data paths.**
2. **Verify Syntax**: Run `python3 -m py_compile <script>.py`.
### Step 3: Verify
1. **Approval**: Request approval to run test job (costs apply). Confirm test Project/Region/Network and the Temporary Test Output GCS location. Skip if auto_approve.
2. **Test Job**: Perform verification steps by referring to `references/cluster_verifications.md` (handles standard images, custom images, GPU/RAPIDS configurations, and temporary output redirection). While doing verification, create a cluster configuration that matches the original job's requirements, prioritizing cost-effective minimal hardware for functional verification as detailed in `references/cluster_verifications.md`.
3. **Debug**: If job fails, analyze logs (check for ClassNotFound, AnalysisException, Serialization, GPU driver/RAPIDS errors). Search Spark/Hadoop Jira or web if cause is unclear. Apply fixes and retry (max 3 times).
### Step 4: Handover
1. **Restore Original Production Paths**: Verify that any temporary test paths or test overrides are completely reverted back to the original production locations in the final upgraded script. Confirm that no functional logic was modified.
2. **Report & Deliver**: Store the final upgraded code (with original paths) and create `migration_report.md` detailing versions, changes, test logs, recommended production configs, and deployment instructions in the target GCS bucket.
## Definition of Done
- [ ] All inputs (Analysis inputs: Dataproc Job ID, Target image version, Source code location(s). Execution inputs: Project ID, Region, Subnet, Custom image URI, Temporary staging Location, Target GCS bucket) explicitly supplied and validated.
- [ ] Code/dependencies migrated to target Spark/Dataproc version with zero functional/business logic alterations.
- [ ] Code passes syntax checks.
- [ ] Verification job run successfully on target version with output safely isolated to temporary location.
- [ ] All temporary test paths/overrides reverted to original production values in the final migrated code.
- [ ] Temporary test resources (clusters) are deleted.
- [ ] Comprehensive migration report provided and final artifacts uploaded to target GCS bucket.
## IAM Requirements
The user (or service account running the job) needs:
* `roles/dataproc.worker`: Spark cluster creation and Job execution
* `roles/storage.objectUser`: Read/write GCSFrom googlecloudplatform/data-agent-kit-plugin at 0dd8034, shown as plain text under its license: Apache-2.0 (permissive). The license text is in skills/gcp-managed-spark-upgrades/SKILL.md.
View SKILL.md on GitHub at 0dd8034Files
- SKILL.md7.4 KB · 7ca451b53527
- references/
- cluster_input_validations.md15 KB · c23d1587ac6a
- cluster_verifications.md3.7 KB · 5eb33f62a0ab
- pyspark_analysis.md11 KB · 04c7559ba0b7
- spark_migration_reference.md2.6 KB · 37c773058297
- scripts/
- cluster_resolve_version.py11 KB · 0b896155f760
6 files, 51 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at 0dd8034More from Google
skill-creator
This skill guides agents through creating new skills that extend Gemini CLI with specialized knowledge, workflows, and tool integrations.
Contains scripts
Gemini CLI · about 5K tokens · pinned 7 days ago
chrome-devtools-cli
This skill enables agents to automate browser interactions and inspect web pages using Chrome DevTools via command-line interface.
Claude Code, Codex, Cursor +4 · about 2.9K tokens · pinned 7 days ago
cloud-run-basics
Deploys and manages Google Cloud Run services, jobs, and worker pools for running containerized applications or source code.
Claude Code, Codex, Cursor +4 · about 3.9K tokens · pinned 7 days ago
retail-virtual-tryon
Creates virtual try-on agents on Google Cloud using Gemini image models and Veo video generation, supporting static image try-ons and catwalk animations.
Contains scripts
Claude Code, Codex, Cursor +3 · about 3.3K tokens · pinned 7 days ago
site-md
This skill analyzes project briefs and generates a .stitch/SITE.md constitution file that documents the project's identity, visual direction, architecture…
Claude Code, Codex, Cursor +4 · about 730 tokens · pinned 7 days ago
stitch::code-to-design
This skill converts existing frontend code (React, Vue, Angular, etc.) into a Stitch Design by extracting HTML, analyzing design systems, and uploading both…
Claude Code, Codex, Cursor +4 · about 760 tokens · pinned 7 days ago
Related in Cloud and DevOps
architect-for-startups
Provides stage-appropriate AWS architecture guidance for startups from pre-revenue through Series B+, considering runway, team size, and AWS credits.
by Amazon (AWS)Official publisher
Claude Code, Codex, Cursor +4 · about 3.4K tokens · pinned 7 days ago
azure-to-aws
This skill guides agents through migrating Azure workloads to AWS across six phases: discovering Azure resources from Terraform, live CLI, app code, and…
by Amazon (AWS)Official publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 4.3K tokens · pinned 7 days ago
gcp-to-aws
Migrates workloads from Google Cloud Platform to AWS, including AI and agentic applications from any provider.
by Amazon (AWS)Official publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 14.3K tokens · pinned 7 days ago
heroku-to-aws
This skill guides migration of applications and databases from Heroku to AWS services like Elastic Beanstalk, RDS, ElastiCache, and MSK.
by Amazon (AWS)Official publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 7K tokens · pinned 7 days ago
prompt-library-for-startups
Provides searchable copy-paste prompts and installable agents for AWS tasks including MVP scaffolding, RAG chatbots with Bedrock, security evaluation, cost…
by Amazon (AWS)Official publisher
Claude Code, Codex, Cursor +4 · about 2.7K tokens · pinned 7 days ago
start-building-for-startups
This skill runs an interactive discovery workflow to understand a user's AWS project goals, constraints, and preferences through picker-based questions, then…
by Amazon (AWS)Official publisher
Claude Code · about 5.9K tokens · pinned 7 days ago
Open roles at Google
No open roles at Google on the Agent Native jobs board right now.
Browse the jobs board