-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix: use non-batch APIs at the edge #281
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.
My many comments are mostly stylistic, but one or two more substantial things.
Overall I think the approach looks reasonable!
@njvrzm Thank you for the early review! I noticed most of your feedback is on the *_batch.go files, which is not new code. Those files are simply renamed to distinguish from the non-batch API variants. Do we need to address the issues you identified for the existing code in this PR? |
Indeed, my apologies, it was only towards the end of reviewing that I saw that most of the code is just moved 😅 I generally try to "leave it better" but that doesn't really apply here, and no, you don't need to address most of my feedback in this PR. I'll resolve some of my comments and maybe come back to them later myself. |
No worries! Thank you for clarifying! |
a1ee132
to
1dd1f9e
Compare
Hi @tracy-french, I think it makes sense to rename the files, but it could create problems down the line when we lose their entire source control history. Would it be possible for you to redo this PR in a way that preserves those files' history by renaming them with |
@idastambuk For sure! I'll make that change. |
1dd1f9e
to
cb6dc35
Compare
@idastambuk I renamed the files with |
Hey @tracy-french, thanks for addressing the review feedback so far. |
pkg/framer/property_value_history.go
Outdated
valueField, | ||
qualityField) | ||
|
||
frame := data.NewFrame(*property.AssetName, timeField, valueField, qualityField) |
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.
Should we call getFrameName()
here instead of *property.AssetName? I remember fixing this for "raw" queries here, I assume it also applies for non-batch queries
Hi @tracy-french, yes, I noticed the same, I think it might be because the original files were renamed, but they were replaced with files with the same name (property_values_non_batch.go became the original property_values.go). I overlooked that when I suggested the solution, sorry about that! |
cb6dc35
to
53fa7ae
Compare
@idastambuk @njvrzm Feedback addressed! Thank you! |
53fa7ae
to
496e457
Compare
Hi @tracy-french it looks like backend tests are failing, can you take a look? If you need help running them locally, let us know! |
496e457
to
6a619f5
Compare
@idastambuk Sorry about that! It looks like a forgot a file when creating the commit. Working on resolving now! |
@idastambuk @njvrzm Could we please merge this change in? Thank you! :) |
What this PR does / why we need it: IoT SiteWise BatchGet* APIs are not available at the edge. This change utilizes the non-batch variants of the APIs when at the edge.
Which issue(s) this PR fixes: #161