oraclecloud-upgrade-migration
Safely upgrade OCI Python SDK and Terraform provider — version pinning, breaking change detection, and rollback. Use when upgrading oci pip packages, updating the Terraform OCI provider, or debugging post-upgrade failures. Trigger with "oraclecloud upgrade", "oci sdk upgrade", "oci terraform provider update", "oci version migration".
What this skill does
# Oracle Cloud Upgrade & Migration
## Overview
OCI Terraform provider and Python SDK break backwards compatibility more often than AWS equivalents. The Terraform provider has had provider crashes on `terraform plan` after upgrades, deprecated resource types removed without migration paths, and schema changes that silently alter behavior. The Python SDK has had memory leak fixes that changed object lifecycle semantics and authentication class renames between minor versions. This skill tracks known breaking changes and provides safe upgrade patterns with version pinning, pre-upgrade testing, and rollback procedures.
**Purpose:** Upgrade OCI Python SDK and Terraform provider versions safely, detect breaking changes before they hit production, and roll back cleanly if an upgrade fails.
## Prerequisites
- **Python 3.8+** with the current OCI SDK installed — `pip show oci`
- **Terraform 1.5+** with the OCI provider — `terraform version`
- **OCI CLI** installed — `oci --version`
- **Git** for version control of infrastructure code
- **A test environment** — never upgrade directly in production
- Current `~/.oci/config` validated (see `oraclecloud-install-auth`)
## Instructions
### Step 1: Audit Current Versions
```bash
# Python SDK version
pip show oci | grep -E "^(Name|Version|Location)"
# Example: Version: 2.125.0
# OCI CLI version
oci --version
# Example: 3.41.0
# Terraform provider version
grep -A2 'oracle/oci' .terraform.lock.hcl 2>/dev/null || echo "No lock file found"
terraform providers
# Example: oracle/oci v5.46.0
```
```python
import oci
print(f"OCI SDK version: {oci.__version__}")
```
### Step 2: Check for Known Breaking Changes
**Python SDK known breaking changes:**
| Version | Breaking Change | Impact | Mitigation |
|---------|----------------|--------|------------|
| 2.120.0+ | `oci.retry` module refactored | Custom retry strategies may break | Update to `oci.retry.retry.RetryStrategyBuilder` |
| 2.115.0+ | `oci.config.validate_config()` stricter | Rejects configs with extra fields | Remove non-standard fields from `~/.oci/config` |
| 2.105.0+ | Composite operations return type changed | `.data` attribute structure changed | Check `.data` type assertions in your code |
| 2.90.0+ | `wait_for_state` deprecated on some clients | Direct `get_*` polling required | Use `oci.wait_until()` helper instead |
**Terraform provider known breaking changes:**
| Version | Breaking Change | Impact | Mitigation |
|---------|----------------|--------|------------|
| 5.40.0+ | `oci_core_instance` schema change | `source_details` block restructured | Run `terraform plan` before apply to detect drift |
| 5.30.0+ | Deprecated `oci_core_virtual_network` removed | Must use `oci_core_vcn` | Search-and-replace in all `.tf` files |
| 5.20.0+ | Provider crashes on `terraform plan` with certain instance configs | Segfault in provider binary | Pin to 5.19.x until hotfix release |
| 5.0.0 | Major version bump — multiple resources renamed | State file references break | Use `terraform state mv` for renamed resources |
### Step 3: Python SDK Safe Upgrade
```bash
# Step 3a: Pin current version as fallback
pip freeze | grep ^oci > requirements-oci-backup.txt
echo "Current version saved to requirements-oci-backup.txt"
# Step 3b: Create an isolated branch
git checkout -b upgrade/oci-sdk-$(date +%Y%m%d)
# Step 3c: Upgrade with version constraint
pip install --upgrade "oci>=2.125.0,<2.130.0" # Constrain to minor range
pip show oci | grep Version
```
```python
# Step 3d: Run validation script
import oci
config = oci.config.from_file("~/.oci/config")
oci.config.validate_config(config)
# Test core client instantiation
identity = oci.identity.IdentityClient(config)
compute = oci.core.ComputeClient(config)
network = oci.core.VirtualNetworkClient(config)
storage = oci.object_storage.ObjectStorageClient(config)
database = oci.database.DatabaseClient(config)
monitoring = oci.monitoring.MonitoringClient(config)
# Verify each client can make a basic call
identity.list_regions()
print("IdentityClient: OK")
compute.list_instances(compartment_id=config["tenancy"], limit=1)
print("ComputeClient: OK")
network.list_vcns(compartment_id=config["tenancy"], limit=1)
print("VirtualNetworkClient: OK")
namespace = storage.get_namespace().data
print(f"ObjectStorageClient: OK (namespace={namespace})")
print(f"\nAll clients validated on oci=={oci.__version__}")
```
### Step 4: Terraform Provider Safe Upgrade
```bash
# Step 4a: Record current state
terraform version > terraform-version-backup.txt
cp .terraform.lock.hcl .terraform.lock.hcl.backup
# Step 4b: Pin provider version in required_providers
```
```hcl
# versions.tf — pin to specific minor version
terraform {
required_providers {
oci = {
source = "oracle/oci"
version = "~> 5.46.0" # Allows 5.46.x patches only
}
}
}
```
```bash
# Step 4c: Upgrade provider
terraform init -upgrade
# Step 4d: Run plan to detect breaking changes (NEVER skip this)
terraform plan -out=upgrade-plan.tfplan 2>&1 | tee upgrade-plan.log
# Step 4e: Check for unexpected changes
grep -E "(must be replaced|forces replacement|will be destroyed)" upgrade-plan.log
# If any resources are being replaced unexpectedly, STOP and investigate
```
### Step 5: Deprecation Detection Script
Scan your codebase for deprecated OCI resource types and SDK patterns:
```bash
#!/bin/bash
echo "=== Deprecated Terraform Resources ==="
grep -rn "oci_core_virtual_network" *.tf 2>/dev/null && echo " DEPRECATED: Use oci_core_vcn" || echo " None found"
grep -rn "oci_core_security_list" *.tf 2>/dev/null && echo " WARNING: Prefer oci_core_network_security_group" || echo " None found"
echo ""
echo "=== Deprecated Python SDK Patterns ==="
grep -rn "from oci.core import" *.py 2>/dev/null | grep -v "ComputeClient\|VirtualNetworkClient\|BlockstorageClient" && echo " Check for deprecated imports" || echo " None found"
grep -rn "wait_for_state" *.py 2>/dev/null && echo " DEPRECATED: Use oci.wait_until() instead" || echo " None found"
```
### Step 6: OCI CLI Upgrade
```bash
# Check current version
oci --version
# Upgrade via pip (OCI CLI is a Python package)
pip install --upgrade oci-cli
# Verify CLI still works after upgrade
oci iam region list --output table && echo "CLI upgrade: OK" || echo "CLI upgrade: FAILED"
# If CLI breaks, rollback
pip install oci-cli==3.41.0 # Replace with your backup version
```
### Step 7: Rollback Procedures
**Python SDK rollback:**
```bash
# Restore pinned version
pip install -r requirements-oci-backup.txt
pip show oci | grep Version
```
**Terraform provider rollback:**
```bash
# Restore lock file
cp .terraform.lock.hcl.backup .terraform.lock.hcl
terraform init
# Verify state is intact
terraform plan # Should show no changes
```
**Git-level rollback:**
```bash
# Discard upgrade branch entirely
git checkout main
git branch -D upgrade/oci-sdk-$(date +%Y%m%d)
```
## Output
Successful completion produces:
- Version audit showing current OCI SDK, CLI, and Terraform provider versions
- Breaking change assessment against the known issues table
- Upgraded Python SDK with all core clients validated (Identity, Compute, Network, Storage, Database, Monitoring)
- Upgraded Terraform provider with a clean `terraform plan` showing no unexpected resource replacements
- Deprecation scan results for both Terraform resources and Python SDK patterns
- Backup files for rollback (`requirements-oci-backup.txt`, `.terraform.lock.hcl.backup`)
## Error Handling
| Error | Code | Cause | Solution |
|-------|------|-------|----------|
| `ModuleNotFoundError: oci` | — | SDK uninstalled during upgrade | `pip install oci` — start upgrade process over |
| Terraform provider crash (segfault) | — | Known provider bug in certain versions | Pin to last known good version (check Terraform registry issues) |
| `terraform plan` shows unexpected replacements | — | Schema change in provider | Review the plan carefully; use `terraform stateRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.