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

botocore.exceptions.ClientError when trying to run integration tests #718

Open
Zvirovyi opened this issue Oct 1, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@Zvirovyi
Copy link
Contributor

Zvirovyi commented Oct 1, 2024

Steps to reproduce

  1. Clone the project
  2. Run the backups integration test: tox -e integration -- tests/integration/test_backups.py::test_backup_aws --keep-models
  3. Encounter botocore.exceptions.ClientError error

Expected behavior

Test to successfully complete.

Actual behavior

Test fails with ERROR tests/integration/test_backups.py::test_backup_aws - botocore.exceptions.ClientError: An error occurred (SignatureDoesNotMatch) when calling the ListObjects operation: Access denied.

Versions

Operating system: Ubuntu 24.04.1 LTS

Juju CLI: 3.5.3-genericlinux-amd64 (also tried 3.4.x, but same result)

Juju agent: 3.5.3 (also tried 3.4.x, but same result)

Charm revision: 5a89a40 (latest commit). Also tried rev371 as of 30.08.2024, but same result.

microk8s: MicroK8s v1.31.1 revision 7234 (tried 1.30, 1.29 with the same result)

Log output

Juju debug log: k8s_SignatureDoesNotMatch.log

Additional context

Same issue on the VM: canonical/postgresql-operator#635.

@Zvirovyi Zvirovyi added the bug Something isn't working label Oct 1, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/DPE-5593.

This message was autogenerated

@marceloneppel
Copy link
Member

marceloneppel commented Oct 3, 2024

Hi, @Zvirovyi! Thanks for the report.

The issue is caused by the GCP credentials not being present in the SECRETS_FROM_GITHUB environment variable; the test teardown code is trying to list objects from GCS (as well as from AWS) at

for bucket_object in bucket.objects.filter(Prefix=config["path"].lstrip("/")):
, but there are no credentials to access the bucket/path.

One possible solution is to check whether the credentials are available in the test teardown code before trying to list the objects from GCS.

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

2 participants