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

[BUG] server/tests/lib/nl/bad_words_test.py::TestBadWords::test_validate_prod fails for non-ACL'd users #4574

Open
wittrock opened this issue Aug 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@wittrock
Copy link
Contributor

Describe the bug

Running test_validate_prod fails if a user isn't ACL'd to gs://datcom-website-config

To Reproduce

Steps to reproduce the behavior:

  1. clone datacommonsorg/website, don't log into gcloud
  2. ./run_tests.sh --setup_python
  3. ./run_tests.sh -a
  4. observe test failure:
E           google.api_core.exceptions.Forbidden: 403 GET https://storage.googleapis.com/storage/v1/b/datcom-website-config/o?projection=noAcl&prefix=nl_bad_words.txt&prettyPrint=false: [email protected] does not have storage.objects.list access to the Google Cloud Storage bucket. Permission 'storage.objects.list' denied on resource (or it may not exist).

.env/lib/python3.11/site-packages/google/cloud/_http/__init__.py:494: Forbidden

I notice that gsutil acl get returns the same:

wittrock@wittrock3 datacommons/website (master *) » gsutil acl get gs://datcom-website-config
AccessDeniedException: 403 [email protected] does not have storage.buckets.get access to the Google Cloud Storage bucket. Permission 'storage.buckets.get' denied on resource (or it may not exist).

Expected behavior

Tests should all pass, or be skipped if not applicable.

Screenshots

Additional context

Should gs://datcom-website-config be world-readable? The description it has (This is a global config bucket shared by all website instances.) makes it seem like it should be. If it shouldn't be world-readable, would you take a PR to skip the test for non-ACL'd users?

@wittrock wittrock added the bug Something isn't working label Aug 23, 2024
@wittrock wittrock changed the title [BUG] test_validate_prod fails for non-ACL'd users [BUG] server/tests/lib/nl/bad_words_test.py::TestBadWords::test_validate_prod fails for non-ACL'd users Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant