Skip to main content
This guide helps you migrate between major versions of Oso Cloud SDKs. Each major version introduces breaking changes that improve the developer experience, add new features, and enhance type safety.

General Migration Strategy

For all SDKs, follow this general approach when migrating:
  1. Update imports and package references
  2. Convert fact representations to new format
  3. Replace bulk operations with batch API
  4. Migrate query calls to QueryBuilder API
  5. Update wildcard usage to explicit patterns
  6. Test thoroughly with new API patterns

Node.js Migration (v1 → v2)

The v2 release represents a significant rethinking of the developer experience. The biggest new feature is generating TypeScript types from your Polar policy. Key Changes:
  • Minimum Node.js version: 14 → 16
  • Centralized authorization data API: 6 methods → 4 methods
  • New QueryBuilder API replaces Query API
  • TypeScript type generation from policies

Breaking Changes

New Features

Python Migration (v1 → v2)

The v2 release represents a significant rethinking of the developer experience with changes to fact representation and input types. Key Changes:
  • Facts now represented as tuples instead of dicts
  • Arguments as Value objects instead of dicts
  • Input types changed from Value/Fact to IntoValue/IntoFact
  • Management API condensed from 6 methods to 4

Breaking Changes

New Features

Go Migration (v1 → v2)

The v2 release represents a significant rethinking of the developer experience with structural changes and new APIs. Key Changes:
  • Import path changed to include /v2
  • Instance struct replaced with Value struct
  • Separate FactPattern type for patterns
  • Helper functions for ergonomic construction
  • API condensed from 6 methods to 4

Breaking Changes

New Features

Java Migration (v0 → v1)

The v1 release represents a significant rethinking of the developer experience with the new Query Builder API and consolidated packages. Key Changes:
  • Public API consolidated under com.osohq.oso_cloud package
  • Explicit wildcard behavior with ValuePattern types
  • New QueryBuilder API with fluent interface
  • Enhanced type safety with FactPattern

Breaking Changes

New Features

Migration Testing

After completing your migration:
  1. Run your existing tests to ensure functionality is preserved
  2. Test edge cases with wildcards and batch operations
  3. Verify performance with the new QueryBuilder API
  4. Check type safety if using TypeScript or other typed languages
  5. Update documentation to reflect new API patterns