feat(connectors-sdk): expose live stream recovery params in BaseStreamConnectorConfig (#7590) - #7694
Merged
Thibaut Rouxel (throuxel) merged 1 commit intoSep 17, 2026
Conversation
Copilot started reviewing on behalf of
Thibaut Rouxel (throuxel)
September 15, 2026 12:50
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR exposes live-stream recovery settings in the SDK base configuration with validation and pycti-specific serialization.
Changes:
- Adds recovery timestamp and ISO date fields.
- Validates millisecond timestamps.
- Adds serialization, default, rejection, and schema tests.
Review findings:
- Critical (3 votes): Preserve existing
noandnonerecovery sentinels. - Nit (2 votes): Add coverage for
Trueserialization returningNone.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Summary |
|---|---|
connectors-sdk/tests/test_settings/test_base_settings.py |
Tests recovery defaults, validation, serialization, and schema exposure. |
connectors-sdk/connectors_sdk/settings/base_settings.py |
Defines and validates recovery configuration fields and serialization. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Thibaut Rouxel (throuxel)
force-pushed
the
feat/7590/connectors-sdk-stream-recovery-params
branch
from
September 15, 2026 13:06
94dcb50 to
0d7bc27
Compare
…mConnectorConfig (#7590)
Thibaut Rouxel (throuxel)
force-pushed
the
feat/7590/connectors-sdk-stream-recovery-params
branch
from
September 15, 2026 13:11
0d7bc27 to
2c824f0
Compare
Helene Nguyen (helene-nguyen)
self-requested a review
September 17, 2026 06:12
Helene Nguyen (helene-nguyen)
approved these changes
Sep 17, 2026
Helene Nguyen (helene-nguyen)
left a comment
Member
There was a problem hiding this comment.
Thibaut Rouxel (@throuxel) All good to me, thanks !
Thibaut Rouxel (throuxel)
deleted the
feat/7590/connectors-sdk-stream-recovery-params
branch
September 17, 2026 07:53
Helene Nguyen (helene-nguyen)
pushed a commit
to helene-nguyen/opencti-connectors
that referenced
this pull request
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
BaseStreamConnectorConfigso it is generated in every SDK-based stream connector's config schema (previously only settable via raw env vars, invisible in the UI / XTM Composer). New fields:live_stream_start_timestamp(int) — stream position to start from, as epoch milliseconds; afield_validatorenforces 13 digits so a seconds value raises aValidationErrorinstead of silently replaying the whole stream from the beginning.live_stream_recover(bool, defaulttrue) — whether to replay historical events (recover/backfill) on first start. Enabled by default (current behaviour: full backfill up to now). Set tofalseto only process new events.live_stream_recover_iso_date(date-time) — optional cutoff date up to which history is replayed when recover is enabled.integer/boolean/string+date-time), noanyOf.pyctivia a scoped serializer: when serializing for the helper,live_stream_recover=falsemapslive_stream_recover_iso_dateto thenonekeyword pycti expects (disables?recover=); otherwise the date (or nothing) is passed through. Non-pycti dumps keep the raw values (fidelity / round-trip safe).none, date serialization, schema exposure).Related issues
Checklist
Further comments
These variables are read directly by
pycti(opencti_connector_helper.py) but were not declared in the SDK, so they were absent from the auto-generatedconnector_config_schema.json. They are only applied on a connector's first run (empty state); afterwardsstart_from/recover_untilare persisted in the connector state.The config schemas of SDK-based stream connectors are intentionally not regenerated here — the CI regenerates them.