Skip to content

Return error if AZURE_ACCOUNT_NAME not set#5141

Merged
MichaelEischer merged 2 commits intorestic:masterfrom
richgrov:missing-azure-env-error
Dec 1, 2024
Merged

Return error if AZURE_ACCOUNT_NAME not set#5141
MichaelEischer merged 2 commits intorestic:masterfrom
richgrov:missing-azure-env-error

Conversation

@richgrov
Copy link
Copy Markdown
Contributor

@richgrov richgrov commented Nov 15, 2024

What does this PR change? What problem does it solve?

Due to AZURE_ACCOUNT_NAME not being set, this error can occur when trying to reach a repository:

$ restic -r azure:repo:/ stats
Fatal: unable to open config file: blob.GetProperties: Head "https://.blob.core.windows.net/repo/config": dial tcp: lookup .blob.core.windows.net: no such host
Is there a repository at the following location?
azure:repo:/

Was the change previously discussed in an issue or on the forum?

This is not tied to a previous issue, as it is a simple fix. An explicit check is added which now produces a message like this:

Fatal: unable to open repository at azure:repo:/: Fatal: unable to open Azure backend: Account name ($AZURE_ACCOUNT_NAME) is empty

Checklist

  • I have added tests for all code changes.
  • I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I'm done! This pull request is ready for review.

@richgrov
Copy link
Copy Markdown
Contributor Author

@MichaelEischer hate to bother you, but is there anything else I need to do before this can be reviewed?

Copy link
Copy Markdown
Member

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@MichaelEischer hate to bother you, but is there anything else I need to do before this can be reviewed?

No, I just haven't found time for a PR review. I just too busy finally finishing one of my massive fs refactoring PRs.

@MichaelEischer MichaelEischer merged commit 2f0049c into restic:master Dec 1, 2024
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