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

SNOW-1460707: Fix permission error when there is no permission on the parent directory of config file path #1965

Merged
merged 3 commits into from
Jun 5, 2024

Conversation

sfc-gh-jdu
Copy link
Collaborator

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes SNOW-1460707: Erroneously Looking for Config.toml File when using DATABASES dictionary in settings.py #1959

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency
  3. Please describe how your code solves the related issue.

    path.exists will raise a PermissionError if there is no permission on the parent directory of config file path

@sfc-gh-jdu sfc-gh-jdu merged commit 6f8c455 into main Jun 5, 2024
89 of 92 checks passed
@sfc-gh-jdu sfc-gh-jdu deleted the jdu-SNOW-1460707-config-perm branch June 5, 2024 21:29
@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2024
if not filep.exists():
continue
except PermissionError:
LOGGER.debug(
Copy link
Collaborator

@sfc-gh-mkeller sfc-gh-mkeller Jun 11, 2024

Choose a reason for hiding this comment

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

Why did you add a debug log for failing to read a configuration file.
I do not think that's an appropriate logging level for such a case.

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.

SNOW-1460707: Erroneously Looking for Config.toml File when using DATABASES dictionary in settings.py
3 participants