USP record version discordancy in code
Closed this issue · 1 comments
XYuhan8600 commented
Hello,
I noticed that the USP record version is "0.1" in oktopus/backend/services/controller/internal/usp/usp_utils/utils.go line 11:
func NewUspRecord(p []byte, toId string) usp_record.Record {
return usp_record.Record{
Version: "0.1",
ToId: toId,
FromId: "oktopusController",
PayloadSecurity: usp_record.Record_PLAINTEXT,
RecordType: &usp_record.Record_NoSessionContext{
NoSessionContext: &usp_record.NoSessionContextRecord{
Payload: p,
},
},
}
}
However, the USP record version is "1.0" in oktopus/backend/services/mtp/adapter/internal/usp/usp.go line 9:
const VERSION = "1.0"
func NewUspRecord(p []byte, toId, fromId string) usp_record.Record {
return usp_record.Record{
Version: VERSION,
ToId: toId,
FromId: fromId,
PayloadSecurity: usp_record.Record_PLAINTEXT,
RecordType: &usp_record.Record_NoSessionContext{
NoSessionContext: &usp_record.NoSessionContextRecord{
Payload: p,
},
},
}
}
I am wandering if this is a bug or it's designed to be so? If it's meant to be like this, may I ask why? If this is a bug, could you please repair it? It seems that local changement of code on my PC doesn't work.
Thank you so much for your amazing project and your time!
leandrofars commented
Hello @XYuhan8600 , thanks for your feedback.
It's a bug, have no impact at the messages flow, but don't follow a correct pattern.
I'll push a commit to fix this problem.
Thanks!