Skip to content

v3.0.0

Latest

Choose a tag to compare

@b-Tomas b-Tomas released this 27 May 13:55
· 8 commits to main since this release
ee6fa8d

Breaking Changes

1. account_id parameter removed (#97)

RobotSession and RobotSessionModel no longer accept account_id. The account ID is now lazily fetched from the REST API via GET /user and cached.

  • RobotSession(..., account_id="xxx") -- removed
  • New method: RobotSession.get_account_id() -- fetches and caches automatically
  • apply_footprint() now resolves the account ID internally

2. Environment variables renamed (#96)

The old INORBIT_API_URL was ambiguous (meant config endpoint in some places, REST API in others). New naming:

Old New Purpose
INORBIT_API_URL INORBIT_CONNECTION_CONFIG_URL MQTT configuration endpoint
INORBIT_REST_API_URL INORBIT_API_URL REST API endpoint

Module constant INORBIT_REST_API_URL renamed to INORBIT_DEFAULT_API_URL.

No fallback to old names -- setting the old env vars has no effect.

3. Deprecated APIs removed (#98)

Removed Deprecated since Replacement
with_counter_metric_async() v2.0.2 with_counter_metric() (auto-detects async)
RobotSessionPool.register_command_callback() v1.7.2 RobotSessionFactory.register_command_callback()

The deprecated package is no longer a dependency.

Migration Guide

Step 1: Remove account_id usage

# Before (v2.x)
session = RobotSession(robot_id="r1", robot_name="R1", api_key="key", account_id="acct123")

# After (v3.0)
session = RobotSession(robot_id="r1", robot_name="R1", api_key="key")
# account_id is fetched automatically when needed (e.g. apply_footprint)

If using RobotSessionModel, remove the account_id field.

Step 2: Update environment variables

# Before (v2.x)
export INORBIT_API_URL="https://custom-config.example.com/cloud_sdk_robot_config"
export INORBIT_REST_API_URL="https://custom-api.example.com"

# After (v3.0)
export INORBIT_CONNECTION_CONFIG_URL="https://custom-config.example.com/cloud_sdk_robot_config"
export INORBIT_API_URL="https://custom-api.example.com"

Step 3: Replace removed functions

# Before
@with_counter_metric_async(my_metric)
async def my_func(): ...

# After
@with_counter_metric(my_metric)
async def my_func(): ...
# Before
pool.register_command_callback(cb)

# After
pool.robot_session_factory.register_command_callback(cb)