Preserve source_registration_id when restoring flowfile snapshots#334
Merged
Edwardvaneechoud merged 1 commit intofeauture/kernel-implementationfrom Feb 11, 2026
Conversation
When a flow is restored (undo/redo or loaded from YAML/JSON), the source_registration_id was not included in the FlowfileSettings serialization schema. This caused publish_global to fail with "source_registration_id is required" because the kernel received None instead of the catalog registration ID. Changes: - Add source_registration_id to FlowfileSettings schema - Include source_registration_id in get_flowfile_data() serialization - Include source_registration_id in _flowfile_data_to_flow_information() deserialization - Preserve source_registration_id in restore_from_snapshot() so undo/redo doesn't lose it even when the snapshot predates the registration https://claude.ai/code/session_01Cb7j4ci4mK24yMwG1JB25v
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
This PR adds support for preserving the
source_registration_idfield when restoring a flowfile from a snapshot, similar to how theflow_idis already preserved.Key Changes
source_registration_idfield toFlowfileSettingsschema as an optional integerrestore_from_snapshot()to preserve the originalsource_registration_idbefore restoring flow settings, and restore it if the snapshot doesn't contain a valueget_flowfile_data()to includesource_registration_idwhen serializing flow settings_flowfile_data_to_flow_information()to includesource_registration_idwhen converting snapshot data to flow informationImplementation Details
The
source_registration_idis now treated as a persistent identifier that survives snapshot restoration, allowing workflows to maintain their registration context across save/restore cycles. If a restored snapshot doesn't specify asource_registration_id, the original value is preserved rather than being lost.