-
Notifications
You must be signed in to change notification settings - Fork 738
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 more granular upload-to-blob functions, refactor u2b code #2498
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.
I've left a few comments.
One interesting architectural change would be to add a way to extract the URI/SAS token (constructed now internally) that could be then passed to an external Azure Blob SDK (C++ or other tool such as the high-perf az_copy
CLI tool).
...ples/iothub_client_sample_upload_to_blob_custom/iothub_client_sample_upload_to_blob_custom.c
Outdated
Show resolved
Hide resolved
@@ -355,7 +355,10 @@ extern "C" | |||
* This function is expected to be used along with: | |||
* `IoTHubDeviceClient_CreateUploadContext` | |||
* `IoTHubDeviceClient_AzureStoragePutBlock` | |||
* `IoTHubDeviceClient_AzureStoragePutBlockList` |
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 would rather move the list of how-to things either in the DevDoc or in a header (a single block, instead of copy/pasting everything) then referencing that doxygen block.
iothub_client/samples/iothub_client_sample_upload_to_blob_custom/CMakeLists.txt
Outdated
Show resolved
Hide resolved
...ples/iothub_client_sample_upload_to_blob_custom/iothub_client_sample_upload_to_blob_custom.c
Outdated
Show resolved
Hide resolved
...ples/iothub_client_sample_upload_to_blob_custom/iothub_client_sample_upload_to_blob_custom.c
Outdated
Show resolved
Hide resolved
...ples/iothub_client_sample_upload_to_blob_custom/iothub_client_sample_upload_to_blob_custom.c
Outdated
Show resolved
Hide resolved
...ples/iothub_client_sample_upload_to_blob_custom/iothub_client_sample_upload_to_blob_custom.c
Outdated
Show resolved
Hide resolved
...ples/iothub_client_sample_upload_to_blob_custom/iothub_client_sample_upload_to_blob_custom.c
Outdated
Show resolved
Hide resolved
...ples/iothub_client_sample_upload_to_blob_custom/iothub_client_sample_upload_to_blob_custom.c
Outdated
Show resolved
Hide resolved
...ples/iothub_client_sample_upload_to_blob_custom/iothub_client_sample_upload_to_blob_custom.c
Outdated
Show resolved
Hide resolved
...ples/iothub_client_sample_upload_to_blob_custom/iothub_client_sample_upload_to_blob_custom.c
Outdated
Show resolved
Hide resolved
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 observations about enhancing documentation.
The E2E code has some odd for loop that runs once: I assume that needs to be removed although the comment states otherwise.
...ples/iothub_client_sample_upload_to_blob_custom/iothub_client_sample_upload_to_blob_custom.c
Outdated
Show resolved
Hide resolved
...ples/iothub_client_sample_upload_to_blob_custom/iothub_client_sample_upload_to_blob_custom.c
Outdated
Show resolved
Hide resolved
...ples/iothub_client_sample_upload_to_blob_custom/iothub_client_sample_upload_to_blob_custom.c
Outdated
Show resolved
Hide resolved
|
||
attemptCount = 1; | ||
|
||
while (true) |
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.
❤️
Checklist
devdoc
folder and added or modified requirements.main
branch.main
branch prior to submission and re-merged as needed after I took any feedback.Reference/Link to the issue solved with this PR (if any)
Description of the problem
Customers cannot retry notifying Azure IoT Hub of upload completion if any failure on that step occurs.
Also adding a retry mechanism hidden in our code would not allow customers to tailor the retry to their specific needs.
Description of the solution
Expose functions in Azure IoT C SDK for customers directly create, upload and notify completion as they need.