Skip to content

Conversation

@heavyscientist
Copy link
Contributor

Pull Request Description

Retry file downloads 3 times, exit 1 on failure

Changes Made

Describe the changes you've made in this pull request. What does this PR do?

  • if something fails to download, it will try up to 3 times backing off for 5 seconds.
  • failing to download exits execution with status code 1

Motivation and Context

Why is this change required? What problem does it solve?

  • makes the cli more robust for automation

Type of Change

Please check the options that are relevant:

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • This change requires a documentation update

Testing Performed

Describe the tests you ran to verify your changes:

  • local testing

Screenshots (if appropriate)

Add screenshots to help explain your changes.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@github-actions
Copy link

badge

Code Coverage Summary

Filename                    Stmts    Miss  Cover    Missing
------------------------  -------  ------  -------  ------------------------------------------------------------------------------
rustmaps.go                     1       0  100.00%
pkg/api/generate.go            98      37  62.24%   65, 72, 92-93, 115, 125-138, 156, 163, 173-174, 183-184, 191-205, 210, 221-226
pkg/api/limits.go              27      10  62.96%   50-51, 60-61, 70-71, 78-79, 84-85
pkg/api/main.go                11       0  100.00%
pkg/api/status.go              41       6  85.37%   90, 99-100, 109-110, 119
pkg/rustmaps/auth.go           15       4  73.33%   26-27, 34-35
pkg/rustmaps/getters.go         5       0  100.00%
pkg/rustmaps/import.go         98      13  86.73%   34, 45, 50, 106-107, 159-160, 166-167, 179-180, 187-188
pkg/rustmaps/setters.go         3       0  100.00%
pkg/rustmaps/main.go           43       4  90.70%   52, 70, 111-112
pkg/rustmaps/config.go         13       3  76.92%   25-27, 34
pkg/rustmaps/download.go       95      22  76.84%   52-54, 79-81, 87-91, 133-134, 138, 156-157, 161-162, 170-171, 174-175, 178-179
pkg/rustmaps/generate.go       29       5  82.76%   25, 29, 35-36, 51
pkg/rustmaps/helpers.go        21       0  100.00%
pkg/types/main.go              38       2  94.74%   106, 114
TOTAL                         538     106  80.30%

Results for commit: 0e023fb

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@nvgscientist nvgscientist self-assigned this Feb 18, 2025
@nvgscientist nvgscientist self-requested a review February 18, 2025 02:51
Copy link
Contributor

@nvgscientist nvgscientist left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

@heavyscientist heavyscientist merged commit 25ad390 into main Feb 18, 2025
3 checks passed
@heavyscientist heavyscientist deleted the safer-downloads branch February 18, 2025 02:53
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.

3 participants