Skip to content

feat(integrations): Add startup/checkin endpoints + tooling fixes - #2832

Draft
vikramlc-cognite wants to merge 1 commit into
integrations-g5-actionsfrom
integrations-g6-startup-checkin
Draft

vikramlc-cognite wants to merge 1 commit into
integrations-g5-actionsfrom
integrations-g6-startup-checkin

Conversation

@vikramlc-cognite

Copy link
Copy Markdown
Contributor

Summary

Adds the extractor self-registration/heartbeat protocol (startup, checkin) now that cognitedata/service-contracts PR #3378 removed their ifdef: internal marking, plus the retry-idempotency registration and codespell config needed to support the "checkin" identifier. Builds on the Actions sub-resource from #2831 — this is the final PR in the stack; once merged, the IntegrationsAPI surface is complete.

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

  • New cognite/client/data_classes/integrations/checkin.py: TaskUpdate, ErrorWithTask, StartupRequest, CheckinRequest, CheckinResponse.
  • New IntegrationsAPI.startup() and IntegrationsAPI.checkin() methods, POST-ing to /integrations/startup and /integrations/checkin respectively with the same beta header as the rest of the module.
  • Added integrations/checkin and integrations/startup to the non-idempotent POST pattern list in utils/_url.py, with matching cases in test_api_client.py.
  • .pre-commit-config.yaml: added --ignore-words-list=checkin to the codespell hook args, since "checkin" is the API's real operationId/URL segment and can't be reworded to "check-in" without diverging from the actual wire contract. Passed as a hook arg rather than pyproject.toml's [tool.codespell] because reading TOML config requires tomli/tomllib, which isn't guaranteed available in the hook's isolated environment on Python <3.11.
  • New tests: test_startup/test_checkin in test_api/test_integrations/test_integrations.py, and round-trip tests for all 5 new data classes in test_data_classes/test_integrations.py.

Why it changed

What to focus on during review

  • startup()/checkin() are explicitly documented (Note: in the docstring) as normally only called by extractor implementations as part of the integrations protocol, not typical SDK consumers.
  • The codespell hook fix: an earlier attempt via pyproject.toml's [tool.codespell] worked locally but silently failed in CI (Python 3.10 in the hook's isolated venv couldn't parse the TOML without tomli) — this PR's .pre-commit-config.yaml args-based fix is the one that's CI-verified.

Test evidence

  • pytest tests/tests_unit/ -q → 6,708 passed, 8 failed (pre-existing, unrelated: missing geopandas/sympy in the local dev environment — confirmed via git stash/pop A-B testing that these fail identically on master), 6 skipped
  • python scripts/sync_client_codegen/main.py verify → sync mirrors up to date
  • ruff check / ruff format --check → clean (550 files)
  • mypy → no issues (550 source files)
  • Confirmed this branch reconstructs the original unsplit branch byte-for-byte (git diff against it is empty)

Risks and unknowns

  • startup/checkin are part of an extractor-facing heartbeat protocol rather than typical end-user SDK surface — low usage risk for most SDK consumers, but worth a sanity check from someone on the extractors side that the request/response shapes match what real extractors send.

Rollout and rollback

  • Same beta FeaturePreviewWarning gating as the rest of the module. No migrations. Revert is a straight revert of this commit.

Checklist

  • Self-reviewed the diff
  • Tests added or updated (or N/A with reason)
  • Docs updated (or N/A) — N/A, no public docs page exists yet for this beta API
  • No secrets, credentials, or PII committed
  • Breaking changes called out above and communicated to affected teams — N/A, no breaking changes

@vikramlc-cognite
vikramlc-cognite force-pushed the integrations-g6-startup-checkin branch from 0296eaf to 5176538 Compare September 16, 2026 05:50
Adds the extractor self-registration/heartbeat protocol (startup,
checkin) now that service-contracts PR #3378 removed their
ifdef: internal marking, plus the retry-idempotency registration and
codespell config needed to support the "checkin" identifier.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vikramlc-cognite
vikramlc-cognite force-pushed the integrations-g6-startup-checkin branch from 5176538 to 2956434 Compare September 16, 2026 07:15

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants