Skip to content

feat(odin): Let Integrations API own the available actions limit - #596

Merged
vikramlc-cognite merged 5 commits into
masterfrom
EDG-1049-raise-available-actions-limit-master
Nov 2, 2026
Merged

vikramlc-cognite merged 5 commits into
masterfrom
EDG-1049-raise-available-actions-limit-master

Conversation

@vikramlc-cognite

@vikramlc-cognite vikramlc-cognite commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Removes the client-side limit of 100 on availableActions in the startup request. Integrations API (Odin) now owns the maximum, so raising it needs no extractor-utils release.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor (no functional change)
  • Documentation update
  • Chore / tooling / CI

What changed

  • unstable/core/_dto.py: AvailableActionList is a plain list[AvailableActionWrite] (was capped at 100).
  • tests/test_unstable/test_dto.py: the max-length test now asserts that 500 available actions are accepted; the action-updates cap test (100) is unchanged.
  • tests/test_unstable/test_action_registration.py: 300 actionable tasks build a startup request with exactly 2 x 300 + the custom actions.
  • CHANGELOG.md: Unreleased entry under Fixed.

Why it changed

Each actionable task costs 2 actions, so the old cap of 100 allowed only 49 actionable tasks while Odin's task_limit is 100. The limit is now defined only in Odin (odin #334), so it is changed in one place.

What to focus on during review

  • With no client check, an over-limit startup is now rejected by Odin (400 with the limit in the message) instead of failing locally. The startup path logs the message at critical level and, with RETRY_STARTUP (default True on Extractor), retries until the limit is raised or the extractor stops; it does not fail fast. Making permanent 4xx startup errors fatal is a follow-up (it touches the check-in error handling that fix(odin): Make check-ins resilient to startup failures and transient network errors (EDG-1032) #588 rewrites).
  • MAX_ACTION_UPDATES_PER_CHECKIN (100) is intentionally unchanged: excess updates carry over to the next check-in.

Test evidence

  • uv run pytest tests/test_unstable/test_dto.py tests/test_unstable/test_action_registration.py -> 72 passed
  • pre-commit run --all-files -> all hooks passed
  • The wider tests/test_unstable suite has the same live-CDF failures/errors as clean master (no COGNITE_DEV_PROJECT locally); needs CI.

Risks and unknowns

  • Against an Odin that still has the old fixed cap of 100, an extractor with more than 100 actions keeps retrying startup (critical log each time). Deploy odin fix(deps): update dependency psutil to v6 #334 first.
  • Before this change an over-limit request failed locally with a validation error; it now retries instead of failing fast (see review focus above).

Rollout and rollback

Checklist

  • Self-reviewed the diff
  • Tests added or updated (or N/A with reason)
  • Docs updated (or N/A) - CHANGELOG only
  • No secrets, credentials, or PII committed
  • Breaking changes called out above and communicated to affected teams - none

🤖 Generated with Claude Code

vikramlc and others added 2 commits October 28, 2026 15:55
…s per task

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request increases the maximum number of available actions sent at startup from 100 to 250 in the unstable package to align with the Odin limit. This allows extractors with up to 100 actionable tasks (each registering a start and stop action) plus custom actions to register. The changes define a MAX_AVAILABLE_ACTIONS constant, update the Pydantic validation limits, and add corresponding unit tests to verify the new limits. I have no feedback to provide as there are no review comments.

@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.16%. Comparing base (e2fe993) to head (fb8b7f8).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #596   +/-   ##
=======================================
  Coverage   84.16%   84.16%           
=======================================
  Files          46       46           
  Lines        4711     4711           
=======================================
  Hits         3965     3965           
  Misses        746      746           
Files with missing lines Coverage Δ
cognite/extractorutils/unstable/core/_dto.py 98.43% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@vikramlc-cognite vikramlc-cognite changed the title feat(unstable): Raise the available actions limit to cover two actions per task feat(unstable): Let Integrations API own the available actions limit Oct 28, 2026
@vikramlc-cognite
vikramlc-cognite marked this pull request as ready for review October 28, 2026 11:10
@vikramlc-cognite
vikramlc-cognite requested a review from a team as a code owner October 28, 2026 11:10
@vikramlc-cognite vikramlc-cognite changed the title feat(unstable): Let Integrations API own the available actions limit feat(odin): Let Integrations API own the available actions limit Oct 28, 2026
@vikramlc-cognite vikramlc-cognite self-assigned this Oct 28, 2026

@Yaseen-A-Khan Yaseen-A-Khan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have some minor comments

Comment thread CHANGELOG.md Resolved
Comment thread CHANGELOG.md Resolved
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@Yaseen-A-Khan Yaseen-A-Khan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vikramlc-cognite vikramlc-cognite added the waiting-for-risk-review Waiting for a member of the risk review team to take an action label Oct 29, 2026
@trygveu trygveu added the risk-review-ongoing Risk review is in progress label Nov 2, 2026
@trygveu trygveu self-assigned this Nov 2, 2026

@trygveu trygveu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦄 This is an improvement, but there might be a couple of issues to think throug. See below.

Comment thread CHANGELOG.md Resolved
@vikramlc-cognite
vikramlc-cognite merged commit 5b7c577 into master Nov 2, 2026
7 checks passed
@vikramlc-cognite
vikramlc-cognite deleted the EDG-1049-raise-available-actions-limit-master branch November 2, 2026 13:49
@vikramlc-cognite vikramlc-cognite mentioned this pull request Nov 4, 2026
6 of 11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk-review-ongoing Risk review is in progress waiting-for-risk-review Waiting for a member of the risk review team to take an action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants