Skip to main content
Available on the Enterprise plan. Contact sales to learn more.
Upgrade the SDK package and update your code in the same change. SDK versions 1.x are not drop-in compatible with versions 0.x. The migration does not change Ona resources or invalidate personal access tokens. If your application pins a 0.x version, migrate its code before upgrading the SDK dependency to 1.x. The distribution names remain gitpod-sdk, @gitpod/sdk, and github.com/gitpod-io/gitpod-sdk-go. Imports, environment variables, request types, responses, and error types change. Use the examples shipped in the Python source distribution, TypeScript package, or public Go module mirror. Do not use examples from the former language-specific SDK repositories.

Review the breaking changes

Find SDK 0.x usage

Search the application before changing dependencies:
Also inspect wrapper modules, dependency lockfiles, deployment secrets, retry configuration, and tests that mock 0.x response or error types. Keep this list as the migration checklist for the application.

Upgrade the package

Upgrade the package and commit the resulting lockfile or module changes:
Do not upgrade a production dependency before the matching code changes are ready. The new release replaces classes and types under the existing distribution names.

Rename authentication variables

Rename GITPOD_API_KEY to ONA_API_KEY in deployment configuration, local environment files, and secret stores:
During a staged rollout, you can expose the same personal access token under both names. Remove GITPOD_API_KEY after every workload uses an SDK version 1.x. For an organization with a custom management-plane domain, set the API URL explicitly:
The default is https://app.ona.com/api.

Replace client construction and environment workflows

Move environment lifecycle and environment operations to the high-level resource clients. These workflows replace manual environment-class selection, polling helpers, and command helpers used with SDK versions 0.x.
Replace Gitpod or AsyncGitpod with create_client_from_env:
Create an environment and run a command through the returned handle:
The Python SDK version 1.x is synchronous. In an asynchronous application, call it through a worker thread instead of importing AsyncGitpod:
High-level create calls wait for the environment to run. stop waits for the environment to stop, and delete cleans it up. Remove 0.x polling utilities that duplicate this behavior.

Migrate direct API calls to Connect

Use generated protobuf messages and Connect clients for API methods that the high-level workflows do not cover. Request fields now follow the public protobuf schema instead of the parameter objects from versions 0.x.
Authenticated synchronous service clients are available through ona.services:
Generated responses are protobuf messages, not Pydantic models. Replace helpers such as to_dict() and to_json() with protobuf-aware serialization where needed.
See the API reference for the current public services and fields.

Update pagination, timeouts, and errors

Replace 0.x runtime helpers with their 1.x equivalents:
  • Pagination: High-level environment lists still fetch pages lazily. Iterate the Python generator, TypeScript async generator, or Go iter.Seq2. For direct RPCs, send PaginationRequest.token from the previous PaginationResponse.next_token.
  • Timeouts: Use timeout in Python, an AbortSignal or defaultTimeoutMs in TypeScript, and context.Context deadlines in Go.
  • Errors: Catch typed SDKError subclasses for high-level workflows. Direct calls use the language’s Connect error type. Replace checks for 0.x types such as APIStatusError, APIConnectionError, and gitpod.Error.
  • Retries: Add retries at your application boundary only for operations that are safe to repeat. Do not assume the 0.x default of two retries still applies.

Test the migrated application

Before deploying:
  1. Run the language type checker, compiler, and tests.
  2. Test authentication with ONA_API_KEY.
  3. Create, use, and delete a disposable environment.
  4. Test expected error branches, timeouts, and pagination.
  5. Test ONA_BASE_URL if the organization uses a custom domain.
  6. Remove 0.x-only imports, helpers, error types, and the old GITPOD_API_KEY setting.
Use the Ona SDK guide for current installation and workflow examples.

Troubleshooting

The application still uses a 0.x import. Python code should import from ona_sdk, TypeScript should use named exports such as createClientFromEnv, and Go workflow code should import the sdk package.
The Python SDK version 1.x is synchronous. Run SDK calls in a worker thread with asyncio.to_thread, or move the SDK work to a synchronous worker process.
Build the request with the generated protobuf type for that RPC. In TypeScript, use create(RequestSchema, fields). In Python and Go, instantiate the generated request message. Check the API reference because 0.x parameter names and helper types do not carry over.
Confirm that the process receives ONA_API_KEY, not only GITPOD_API_KEY. For custom domains, also confirm that ONA_BASE_URL uses the management-plane domain and ends in /api.