Skip to content

fix: add files to PR and switch reretry with tenacity#119

Open
fgvieira wants to merge 6 commits intosnakemake:mainfrom
fgvieira:deps
Open

fix: add files to PR and switch reretry with tenacity#119
fgvieira wants to merge 6 commits intosnakemake:mainfrom
fgvieira:deps

Conversation

@fgvieira
Copy link
Contributor

@fgvieira fgvieira commented Mar 13, 2026

Summary by CodeRabbit

  • Refactor
    • Switched internal retry handling to a different retry mechanism for more robust retry/backoff behavior.
    • Consolidated and simplified module imports to reduce redundancy and improve internal consistency.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 13, 2026

📝 Walkthrough

Walkthrough

Updated snakedeploy/prs.py to replace the reretry retry decorator with tenacity (retry, stop_after_attempt, wait_exponential), removed the top-level github import in favor of direct Github, GithubException imports, and adjusted retry decorator usage and exception references accordingly.

Changes

Cohort / File(s) Summary
Retry & GitHub import updates
snakedeploy/prs.py
Replaced from reretry import retry with from tenacity import retry, stop_after_attempt, wait_exponential; removed top-level github import and changed exception references to the directly imported GithubException; updated retry decorator arguments to use stop_after_attempt and wait_exponential.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: replacing reretry with tenacity and updating retry decorator usage in the code.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@snakedeploy/prs.py`:
- Line 5: The current import and decorator use reretry-style parameters (tries,
delay) which tenacity doesn't support; update the import to bring in tenacity's
helpers (e.g., from tenacity import retry, stop_after_attempt, wait_fixed) and
replace the decorator usage "@retry(tries=..., delay=...)" with tenacity
equivalents, e.g. "@retry(stop=stop_after_attempt(<tries>),
wait=wait_fixed(<delay_seconds>))" so the retry behavior maps correctly; apply
this change where the `@retry` decorator is used (around line 59) and adjust
numeric values as needed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f8af5ad0-1b26-404f-b662-a90d515dc3ad

📥 Commits

Reviewing files that changed from the base of the PR and between f482e35 and 512b900.

⛔ Files ignored due to path filters (1)
  • pyproject.toml is excluded by !pyproject.toml
📒 Files selected for processing (1)
  • snakedeploy/prs.py

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@snakedeploy/prs.py`:
- Line 5: The import statement in prs.py has a syntax error: "from tenacity
import retry,, stop_after_attempt, wait_exponential" contains a double comma;
open the file and correct the import to list the symbols properly (ensure you
import retry, stop_after_attempt, and wait_exponential from tenacity without the
extra comma) so the module can be parsed and imported successfully.
- Around line 85-87: The except clause currently references
GithubException.UnknownObjectException (invalid attribute); update the handler
in snakedeploy/prs.py so it catches the correct exception: either import
UnknownObjectException and use "except UnknownObjectException as e" (add the
proper import at the top) or change the clause to catch the parent
"GithubException" like the earlier handler; make the rest of the logic (if
e.status != 404: raise e) remain unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e36da201-c827-444d-92ef-1246d00d3420

📥 Commits

Reviewing files that changed from the base of the PR and between 512b900 and f5e99cd.

📒 Files selected for processing (1)
  • snakedeploy/prs.py

fgvieira and others added 2 commits March 13, 2026 14:03
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@fgvieira fgvieira moved this to In review in Snakemake Hackathon 2026 Mar 13, 2026
@fgvieira fgvieira self-assigned this Mar 13, 2026
@fgvieira fgvieira added the bug Something isn't working label Mar 13, 2026
@fgvieira fgvieira changed the title perf: switch reretry with tenacity fix: add files to PR and switch reretry with tenacity Mar 13, 2026
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

Status: In review

Development

Successfully merging this pull request may close these issues.

1 participant