Skip to content

Conversation

@vincentpierre
Copy link
Contributor

Proposed change(s)

Raising errors better when something goes wrong when trying to download

Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)

Types of change(s)

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Other (please describe)

Checklist

  • Added tests that prove my fix is effective or that my feature works
  • Updated the changelog (if applicable)
  • Updated the documentation (if applicable)
  • Updated the migration guide (if applicable)

Other comments

@vincentpierre vincentpierre self-assigned this Jun 4, 2020
logger.debug(
f"Attempt {attempt + 1} / {NUMBER_ATTEMPTS} : Failed to download"
)
except Exception: # pylint: disable=W0702
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a particular exception that is given here when it fails to download?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A lot of things could go wrong : Could have internet problems, zip extraction problems, permission issues, IOErrors...

Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose ideally we only retry certain things, specifically internet/download problems. But that seems more difficult than it's worth

Copy link
Contributor

@ervteng ervteng Jun 4, 2020

Choose a reason for hiding this comment

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

Maybe we can just change the message to "Failed to download and extract". I also think it should be a warning and not a debug message.

Copy link
Contributor

@ervteng ervteng left a comment

Choose a reason for hiding this comment

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

👍 - one comment but looks good overall

@vincentpierre vincentpierre merged commit 03e488b into master Jun 4, 2020
@delete-merged-branch delete-merged-branch bot deleted the develop-registry-error branch June 4, 2020 23:24
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants