Skip to content

Preserve source_registration_id when restoring flowfile snapshots#334

Merged
Edwardvaneechoud merged 1 commit intofeauture/kernel-implementationfrom
claude/fix-flow-restore-error-HplSa
Feb 11, 2026
Merged

Preserve source_registration_id when restoring flowfile snapshots#334
Edwardvaneechoud merged 1 commit intofeauture/kernel-implementationfrom
claude/fix-flow-restore-error-HplSa

Conversation

@Edwardvaneechoud
Copy link
Owner

Summary

This PR adds support for preserving the source_registration_id field when restoring a flowfile from a snapshot, similar to how the flow_id is already preserved.

Key Changes

  • Added source_registration_id field to FlowfileSettings schema as an optional integer
  • Modified restore_from_snapshot() to preserve the original source_registration_id before restoring flow settings, and restore it if the snapshot doesn't contain a value
  • Updated get_flowfile_data() to include source_registration_id when serializing flow settings
  • Updated _flowfile_data_to_flow_information() to include source_registration_id when converting snapshot data to flow information

Implementation Details

The source_registration_id is 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 a source_registration_id, the original value is preserved rather than being lost.

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
@Edwardvaneechoud Edwardvaneechoud merged commit 63f174a into feauture/kernel-implementation Feb 11, 2026
@Edwardvaneechoud Edwardvaneechoud deleted the claude/fix-flow-restore-error-HplSa branch February 11, 2026 18:10
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