Skip to content

chore: conditionally process data address on resume flow#64

Closed
ronjaquensel wants to merge 1 commit intoeclipse-dataplane-core:mainfrom
FraunhoferISST:chore/data-address-handling-for-resume
Closed

chore: conditionally process data address on resume flow#64
ronjaquensel wants to merge 1 commit intoeclipse-dataplane-core:mainfrom
FraunhoferISST:chore/data-address-handling-for-resume

Conversation

@ronjaquensel
Copy link
Copy Markdown
Contributor

Adds checks in the dataplane's resume method to

  • only read a data address from the DataFlowResumeMessage when one should be expected (provider for push transfers, consumer for pull transfers)
  • only return a data address in the response to a DataFlowResumeMessage when one should be provided (provider for pull transfers, consumer for push transfers)

Depending on the control plane implementation, this may not be necessary, as e.g. a superfluous data address in the response may simply be ignored, but like this we can ensure that the dataplane handles data addresses in the resume flow as defined in the specification.

@ronjaquensel ronjaquensel requested a review from ndr-brt March 27, 2026 12:52
@ronjaquensel ronjaquensel self-assigned this Mar 27, 2026
@ronjaquensel ronjaquensel added the enhancement New feature or request label Mar 27, 2026
Comment on lines +206 to +208
var shouldReceiveDataAddress = (PROVIDER.equals(dataFlow.getType()) && dataFlow.isPush()) ||
(CONSUMER.equals(dataFlow.getType()) && dataFlow.isPull());
if (shouldReceiveDataAddress) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this check, wouldn't the non null one already covering these cases? If the data plane receives a data address, it updates it, otherwise it uses the original one, unless there's a specific use case that we should avoid (eventually demonstrated by a test) I'd just leave the loose non-null check

Comment on lines +217 to +220
var shouldProvideDataAddress = (PROVIDER.equals(dataFlow.getType()) && dataFlow.isPull()) ||
(CONSUMER.equals(dataFlow.getType()) && dataFlow.isPush());
var dataAddress = shouldProvideDataAddress ? dataFlow.getDataAddress() : null;
var response = new DataFlowStatusMessage(id, flowId, dataFlow.getState().name(), dataAddress, null);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, I think this is excessively defensive, unless there's a specific case for which the data address shouldn't be sent back, eventually let's try to describe it through a test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants