Skip to content

Conversation

@JAVGan
Copy link
Collaborator

@JAVGan JAVGan commented Oct 6, 2025

WIP

Summary by Sourcery

Enhancements:

  • Retry the _publish method on ConflictError with exponential backoff between 1 minute and 1 week for up to 3 attempts

@sourcery-ai
Copy link

sourcery-ai bot commented Oct 6, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Added automatic retry logic to the Azure _publish method, handling ConflictError with exponential backoff and a limited number of attempts.

Sequence diagram for retry logic in Azure _publish method

sequenceDiagram
    participant Caller
    participant "AzurePublisher (_publish)"
    participant "Azure API"
    Caller->>"AzurePublisher (_publish)": Call _publish(push_item)
    loop Up to 3 attempts
        "AzurePublisher (_publish)"->>"Azure API": Publish push_item
        alt ConflictError occurs
            "AzurePublisher (_publish)"-->>Caller: Wait (exponential backoff)
            Note right of "AzurePublisher (_publish)": Retry _publish
        else Success
            "AzurePublisher (_publish)"-->>Caller: Return result
        end
    end
    alt All attempts fail
        "AzurePublisher (_publish)"-->>Caller: Raise ConflictError
    end
Loading

File-Level Changes

Change Details Files
Introduced retry mechanism for publishing conflicts
  • Decorate _publish with retry_if_exception_type(ConflictError)
  • Configure exponential backoff: multiplier=1, min=60s, max=7 days
  • Limit retries to 3 attempts and reraise on failure
src/pubtools/_marketplacesvm/cloud_providers/ms_azure.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

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