Skip to content

fix(db): apply abspath to logged path in _safe_url()#148

Merged
GeiserX merged 1 commit intomainfrom
fix/safe-url-abspath
May 7, 2026
Merged

fix(db): apply abspath to logged path in _safe_url()#148
GeiserX merged 1 commit intomainfrom
fix/safe-url-abspath

Conversation

@GeiserX
Copy link
Copy Markdown
Owner

@GeiserX GeiserX commented May 7, 2026

Summary

  • Adds os.path.abspath() to the path reconstructed in _safe_url() before logging, matching the same resolution done in _build_database_url()
  • Without this, relative paths (e.g. ./backups/telegram_backup.db) would appear in logs while the actual DB connection uses the absolute path

Fixes CodeRabbit review comment from PR #147.

Test plan

  • CI passes (lint + tests)
  • Verify logged path matches the connection path when using relative BACKUP_PATH

Without this, _safe_url() could log a relative path while the actual
connection uses the absolute one (resolved in _build_database_url).
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Warning

Rate limit exceeded

@GeiserX has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 49 minutes and 30 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f165a0ec-0e75-4d8e-83e0-c1f3e32fe0b5

📥 Commits

Reviewing files that changed from the base of the PR and between 1cac350 and b2bf1b1.

📒 Files selected for processing (1)
  • src/db/base.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/safe-url-abspath

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

🐳 Dev images published!

  • drumsergio/telegram-archive:dev
  • drumsergio/telegram-archive-viewer:dev

The dev/test instance will pick up these changes automatically (Portainer GitOps).

To test locally:

docker pull drumsergio/telegram-archive:dev
docker pull drumsergio/telegram-archive-viewer:dev

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.06%. Comparing base (1cac350) to head (b2bf1b1).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #148   +/-   ##
=======================================
  Coverage   94.06%   94.06%           
=======================================
  Files          21       21           
  Lines        6136     6137    +1     
=======================================
+ Hits         5772     5773    +1     
  Misses        364      364           
Files with missing lines Coverage Δ
src/db/base.py 97.94% <100.00%> (+0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GeiserX GeiserX merged commit 9e01475 into main May 7, 2026
10 checks passed
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.

1 participant