Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add session id to request response #454

Merged

Conversation

kcajmagic
Copy link
Member

No description provided.

if message.Metadata == nil {
message.Metadata = map[string]string{}
}
message.Metadata["partner-ids"] = strings.Join(event.Device.PartnerIDs(), ",")
Copy link
Contributor

Choose a reason for hiding this comment

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

Device.PartnerIDs() came from the device itself, at connection time. If the device didn't send a partner id then, it wouldn't be at this point. This doesn't help the missing partner id problem.

If we want to ensure the partner ids match, which would only be due to a device bug, then we should set message.PartnerIDs to the device's partner ids. Again, I'm not sure what the value of that is.

message.Metadata = map[string]string{}
}
message.Metadata["partner-ids"] = strings.Join(event.Device.PartnerIDs(), ",")
message.Metadata["session-id"] = event.Device.SessionID()
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need this? Remember that metadata is supposed to be for a device's RDK stack to populate. We use this for connect/disconnect events in talaria as hack, since those events don't come from devices.

@codecov-io
Copy link

codecov-io commented Feb 12, 2020

Codecov Report

Merging #454 into master will decrease coverage by 0.05%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #454      +/-   ##
==========================================
- Coverage   86.91%   86.85%   -0.06%     
==========================================
  Files         188      188              
  Lines        8313     8302      -11     
==========================================
- Hits         7225     7211      -14     
- Misses        886      890       +4     
+ Partials      202      201       -1
Impacted Files Coverage Δ
device/listener.go 100% <ø> (ø) ⬆️
device/transactions.go 90.65% <ø> (ø) ⬆️
device/handlers.go 88.37% <ø> (ø) ⬆️
device/manager.go 56.37% <0%> (-2.52%) ⬇️
device/device.go 68.85% <0%> (-3.28%) ⬇️
device/drain/drainer.go 98.48% <0%> (+1.51%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ee59de3...25e5bcd. Read the comment docs.

@kcajmagic kcajmagic requested a review from johnabass February 13, 2020 00:44
@johnabass johnabass merged commit cd57c2d into xmidt-org:master Feb 13, 2020
@kcajmagic kcajmagic deleted the feature/sessionidinrequestresponse branch February 13, 2020 17:56
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.

4 participants