-
Notifications
You must be signed in to change notification settings - Fork 10
addidng sender in place of history api #1017
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments
@@ -191,7 +190,6 @@ public Optional<PartnerMetadata> getMetadata(String receivedSubmissionId) | |||
var ourStatus = ourStatusFromReportStreamStatus(rsStatus); | |||
|
|||
logger.logInfo("Updating metadata with receiver {} and status {}", receiver, ourStatus); | |||
partnerMetadata = partnerMetadata.withReceiver(receiver).withDeliveryStatus(ourStatus); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to remove .withDeliveryStatus(ourStatus)
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, added it back
@@ -375,7 +373,7 @@ PartnerMetadataStatus ourStatusFromReportStreamStatus(String rsStatus) { | |||
} | |||
|
|||
private boolean metadataIsStale(PartnerMetadata partnerMetadata) { | |||
return partnerMetadata.receiver() == null | |||
return partnerMetadata.receivingFacilityDetails().namespace() == null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to check for universalId
instead of namespace
, as the id is always required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
new DbColumn("receiver", metadata.receiver(), true, Types.VARCHAR), | ||
new DbColumn( | ||
"sender", | ||
metadata.sendingFacilityDetails().namespace(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the namespace is the right thing to store here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
.add(createInformationIssueComponent("receiver name", metadata.receiver())); | ||
.add( | ||
createInformationIssueComponent( | ||
"sender name", metadata.sendingFacilityDetails().namespace())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. We should probably either have all properties in MessageHdDataType
, or use universalId
. The name should also probably change to either sender
or sender id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
.getIssue() | ||
.add( | ||
createInformationIssueComponent( | ||
"receiver name", metadata.receivingFacilityDetails().namespace())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as with sender name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
.filter(metadata -> metadata.sender().equals(sender)) | ||
.filter( | ||
metadata -> | ||
metadata.sendingFacilityDetails().namespace().equals(sender)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comparison should probably be with universalId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
|
Closing this PR as the code has been merged using this other PR. |
Add a PR title
Describe what changed in this PR at a high level.
Issue
Add a link to the issue here. Consider using
closing keywords
if the this PR isn't for a story (stories will be closed through different means).
Checklist
Note: You may remove items that are not applicable