Add hybrid device type and mutable_variable_regex field#63
Open
FabianoEger wants to merge 3 commits into
Open
Conversation
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.
Summary
Adds the
hybriddevice storage type and itsmutable_variable_regexfield to the device create/edit/info types (and theDataStorageTypeliteral), matching backend tago-io/server#1644. Hybrid combines immutable telemetry (chunked, with retention) and editable mutable variables in one device, routed per-variable by the regex. Also corrects a long-standing typo in the immutable device type.Changes
DeviceCreateInfoBasicHybrid/DeviceCreateInfoHybridadded; extended theDeviceCreateInfoalias.mutable_variable_regexadded toDeviceEditInfoandDeviceInfo;"hybrid"added toDataStorageType.mutable_variable_regexrejects match-everything / match-nothing patterns (the server rejects.*,^$, etc.; use a mutable or immutable device for those cases).type: Literal["imutable"]->Literal["immutable"], and renamed the classDeviceCreateInfoBasicImutable->DeviceCreateInfoBasicImmutable(with its alias reference and the Sphinx docs). The literal was wrong against the API (which usesimmutable), so this corrects broken typing rather than changing working behavior. The class is not part of the package__all__; the public aliasDeviceCreateInfoImmutableis unchanged.Test plan
uv run ruff check srccleanuv run ruff formatclean (changed files)uv run pytest tests/green (199 passed)Risk (CIA)
Likelihood: 🟢 Low | Impact: 🟢 Low | Exposure: 🟢 Low
Additive type definitions plus a typo correction to a non-exported class; no runtime behavior change.
Related