Skip to content

Conversation

@dragomirp
Copy link
Contributor

@dragomirp dragomirp commented Aug 25, 2025

Handle empty region when creating backups.

Checklist

  • I have added or updated any relevant documentation.
  • I have cleaned any remaining cloud resources from my accounts.

@codecov
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

❌ Patch coverage is 78.57143% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.57%. Comparing base (6f84cce) to head (6caae64).
⚠️ Report is 4 commits behind head on 16/edge.

Files with missing lines Patch % Lines
src/backups.py 78.57% 2 Missing and 1 partial ⚠️

❌ Your project status has failed because the head coverage (64.57%) is below the target coverage (70.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           16/edge    #1117      +/-   ##
===========================================
- Coverage    64.57%   64.57%   -0.01%     
===========================================
  Files           17       17              
  Lines         4325     4327       +2     
  Branches       667      668       +1     
===========================================
+ Hits          2793     2794       +1     
  Misses        1351     1351              
- Partials       181      182       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dragomirp dragomirp added the bug Something isn't working as expected label Aug 25, 2025
else:
if return_code != 0:
logger.error(stderr)
logger.error(f"Failed to run pgbackrest: {stderr}")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add more context so we have an idea where the error happened.

# If the check command doesn't succeed, remove the stanza name
# and rollback the configuration.
logger.exception(e)
logger.exception("Failed to initialise stanza:")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exception context will be logged automatically by logger.exception.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't create a bucket, so that we can test bucket creation.

@dragomirp dragomirp requested review from a team, marceloneppel and taurus-forever and removed request for a team September 4, 2025 14:57
"bucket": "data-charms-testing",
"path": f"/postgresql-k8s/{uuid.uuid1()}",
"region": "",
"region": "us-east-1",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

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

Can you please update PR description for the future (answering how we are handling it better).

Q: is region mandatory on GCP? If so, how users are informed about missing region? The exception says nothing about missing region.

Do I miss something here? Tnx!

@dragomirp dragomirp marked this pull request as ready for review September 9, 2025 19:15
@dragomirp dragomirp merged commit f8cfb96 into 16/edge Sep 10, 2025
157 of 162 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants