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

net: lib: aws_fota: Improve error handling for FOTA jobs #11995

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

fnawratil
Copy link
Contributor

  • Improves error handling by providing more fine grained errors on job parsing.

  • Jobs are now marked as failed if document is invalid but the job id could be parsed.

  • A new error state is introduced to enableretries for marking jobs as failed.

  • Additionally, the job update accepted/rejected topics are no longer subscribed to, as this is not necessary to receive the respective messages and thus adds unnecessary overhead.

@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Aug 9, 2023
@fnawratil fnawratil marked this pull request as ready for review August 10, 2023 08:09
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Aug 10, 2023

Test specification

CI/Jenkins/NRF

  • Integration Platforms

CI/Jenkins/integration

Test Module File based changes Manually selected West overwrite
test-ci-nrfconnect-boot-fw-update X

Detailed information of selected test modules

Note: This message is automatically posted and updated by the CI

@fnawratil fnawratil force-pushed the fota-error-handling branch 2 times, most recently from 049c480 to bd2739f Compare August 10, 2023 13:02
@github-actions github-actions bot added doc-required PR must not be merged without tech writer approval. and removed changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Aug 10, 2023
@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

Copy link
Contributor

@simensrostad simensrostad left a comment

Choose a reason for hiding this comment

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

Overall looks good, few nits.

subsys/net/lib/aws_fota/include/aws_fota_json.h Outdated Show resolved Hide resolved
subsys/net/lib/aws_fota/src/aws_fota.c Show resolved Hide resolved
subsys/net/lib/aws_fota/src/aws_fota.c Outdated Show resolved Hide resolved
subsys/net/lib/aws_fota/src/aws_fota.c Outdated Show resolved Hide resolved
subsys/net/lib/aws_fota/src/aws_fota.c Outdated Show resolved Hide resolved
subsys/net/lib/aws_fota/src/aws_fota.c Show resolved Hide resolved
subsys/net/lib/aws_fota/src/aws_fota.c Outdated Show resolved Hide resolved
subsys/net/lib/aws_fota/src/aws_fota.c Outdated Show resolved Hide resolved
subsys/net/lib/aws_fota/src/aws_fota.c Outdated Show resolved Hide resolved
@fnawratil fnawratil force-pushed the fota-error-handling branch 2 times, most recently from b03d3a6 to 47fa2a9 Compare August 16, 2023 11:00
Copy link
Contributor

@jtguggedal jtguggedal left a comment

Choose a reason for hiding this comment

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

Sorry about the late review, slipped through the cracks..

subsys/net/lib/aws_fota/src/aws_fota.c Show resolved Hide resolved
subsys/net/lib/aws_fota/src/aws_fota.c Show resolved Hide resolved
subsys/net/lib/aws_fota/src/aws_fota.c Show resolved Hide resolved
subsys/net/lib/aws_fota/src/aws_fota.c Show resolved Hide resolved
subsys/net/lib/aws_fota/src/aws_fota.c Show resolved Hide resolved
Copy link
Contributor

@simensrostad simensrostad left a comment

Choose a reason for hiding this comment

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

LGTM 🐶

Improves error handling by providing more fine grained
errors on job parsing. Jobs are now marked as failed
if document is invalid but the job id could be parsed.
A new error state is introduced to enable
retries for marking jobs as failed.
Additionally, the job update accepted/rejected topics
are now longer subscribed to, as this is not necessary
to receive the respective messages and thus adds
unnecessary overhead.

Signed-off-by: Fabian Nawratil <fabian.nawratil@nordicsemi.no>
@rlubos rlubos merged commit ad95d4d into nrfconnect:main Aug 17, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-required PR must not be merged without tech writer approval.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants