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

fix: retry only reqwest errors #269

Merged
merged 2 commits into from
Aug 16, 2023
Merged

fix: retry only reqwest errors #269

merged 2 commits into from
Aug 16, 2023

Conversation

de-sh
Copy link
Contributor

@de-sh de-sh commented Aug 15, 2023

Closes #

Changes

Why?

Downloader retrying issues related to file-system, the actual file being empty, etc. doesn't make much sense, whereas when it is caused by something related to the HTTP client, retrying could help.

Trials Performed

  1. HTTP error:
  2023-08-15T10:32:25.912726Z  INFO uplink::base::bridge: Action response = ActionResponse { action_id: "1411", device_id: None, sequence: 1, timestamp: 1692095545912, state: "Downloading", progress: 0, errors: [], done_response: None }

  2023-08-15T10:34:36.865645Z ERROR uplink::collector::downloader: Download failed: error sending request for url (https://firmware.stage.bytebeam.io/api/v1/file/0dd74499-4d79-480b-9892-165497654281/artifact): error trying to connect: tcp connect error: Network is unreachable (os error 101)

  2023-08-15T10:35:06.252073Z  WARN uplink::collector::downloader: Retrying download
  1. Non HTTP error:
    2023-08-15T10:23:17.754027Z  INFO uplink::base::bridge: Action response = ActionResponse { action_id: "1406", device_id: None, sequence: 0, timestamp: 1692094997754, state: "Received", progress: 0, errors: [], done_response: None }

    2023-08-15T10:23:17.754167Z  INFO uplink::base::bridge: Action response = ActionResponse { action_id: "1406", device_id: None, sequence: 1, timestamp: 1692094997754, state: "Downloading", progress: 0, errors: [], done_response: None }

    2023-08-15T10:23:18.367453Z  INFO uplink::collector::downloader: Downloading from https://firmware.stage.bytebeam.io/api/v1/firmwares/new firmware/artifact into /media/devdutt/EC6C23BE6C238286/persistence/update_firmware/new firmware

    2023-08-15T10:23:18.367744Z  INFO uplink::base::bridge: Action response = ActionResponse { action_id: "1406", device_id: None, sequence: 2, timestamp: 1692094998367, state: "Failed", progress: 100, errors: ["File io Error: No space left on device (os error 28)"], done_response: None }

@de-sh de-sh self-assigned this Aug 15, 2023
@de-sh de-sh requested a review from amokfa August 15, 2023 10:39
@de-sh de-sh merged commit 3d56136 into main Aug 16, 2023
2 checks passed
@de-sh de-sh deleted the retry branch August 16, 2023 15:40
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.

2 participants