Repository navigation
Conversation
| "already_present": result["alreadyPresent"], | ||
| } | ||
| if "updated" in result: | ||
| mapped["updated"] = result["updated"] |
Contributor
There was a problem hiding this comment.
The return shape now changes with the server response. updated is present only when the server sends it. The same applies to changed_count, discarded_updates, and changed_episode_count. A caller who writes result["updated"] gets a KeyError when the server omits the field, for example for an org that does not have annotations enabled.
When does the server omit these fields? If an omitted field means zero, set a default so that callers get one shape:
"updated": result.get("updated", 0),If the omission has a different meaning, document it in the docstring.
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.
Changelog
None. Episode annotations remain behind the server rollout gate.
Product updates
Python callers can now read a specific episode version, inspect version history, set or remove TEXT and URI labels, and change ranges or recording membership. Dataset membership accepts explicit episode versions. An exported committed dataset keeps each episode's pinned version even after that episode changes.
Existing string-ID dataset additions and episode metadata remain supported. Creating an episode version and selecting it in a dataset are separate calls; if pinning fails, the created version remains available for a retry.
Links
Fixes: DC-1873
Backend API: foxglove/app#19987
Implementation details
The client maps version and label responses to snake_case dictionaries and converts URI
content_typeonly at the API boundary. Single and bulk updates preserve structured HTTP errors, while dataset edits continue to stage changes until a separate commit.The exporter captures the committed dataset's member snapshots before transfer, signs each stream with that member's version, and records version and labels in the existing manifest format. It preserves the current selection-digest formula and never fetches URI label targets.
Testing
[ GENERATED BY AI ]