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

Allow constructing messages for Job status updates with received blocks #101

Closed
priyamourya25 opened this issue Jun 13, 2024 · 3 comments
Closed
Labels
enhancement New feature or request

Comments

@priyamourya25
Copy link

Allow constructing messages for Job status updates with additional details like number of downloaded blocks or additional string.

Considering a download of 100 blocks in a OTA file, it would be beneficial as a user to know the progress of the job. In older OTA agent, there was a mechanism to construct a message with number of downloaded blocks and total blocks expected in the file.

An example of such a message is:
{"status":"IN_PROGRESS","statusDetails":{"receive":"12/100"}}
which shows that 12 blocks are received among the 100 blocks.

This allows to track the OTA progress on the job execution when a OTA is in progress. Without regular updates, the job creater has no idea what is happening with the blocks and how far the download has been done.

@rawalexe rawalexe added the enhancement New feature or request label Jun 13, 2024
@rawalexe
Copy link
Member

Thank you for your suggestion, I'll forward this to the team

@kstribrnAmzn
Copy link
Member

This request seems like the superset of your other request. This would be a perfect time for function overloading but unfortunately C doesn't support that. The next closest option is a variadic functions but this isn't a great solution either as the function signature would get ugly as more and more key-value pairs are added.

For both simplicity and ease of development, I'll put together a PR which takes in a JSON string for the StatusDetails field. Then as the user you can add whatever you want, as long as its valid JSON.

@kstribrnAmzn
Copy link
Member

Closing as #105 is merged. This change allows you to provide a JSON key-value structure with any arbitrary number of key-value pairs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants