Skip to content

Revert "Make deploy workflow idempotent for PyPI release reruns" - #6

Merged
SpriteMisaka merged 1 commit into
mainfrom
revert-5-copilot/fix-deploy-github-actions-job
Aug 27, 2026
Merged

Revert "Make deploy workflow idempotent for PyPI release reruns"#6
SpriteMisaka merged 1 commit into
mainfrom
revert-5-copilot/fix-deploy-github-actions-job

Conversation

@SpriteMisaka

@SpriteMisaka SpriteMisaka commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Sourcery 总结

CI:

  • 恢复 PyPI 发布行为:当尝试上传已存在的软件包版本时失败。
Original summary in English

Summary by Sourcery

CI:

  • Restore PyPI publish behavior that fails when attempting to upload an already-existing package version.

Copilot AI lite review requested due to automatic review settings August 27, 2026 01:44
@sourcery-ai

sourcery-ai Bot commented Aug 27, 2026

Copy link
Copy Markdown
审查者指南(小型 PR 中折叠显示)

审查者指南

通过移除 skip-existing,部署工作流恢复为之前的 PyPI 发布行为。因此,当软件包版本已经存在时,重新运行发布流程将会失败,而不是将上传视为成功。

PyPI 发布重新运行行为的时序图

sequenceDiagram
    participant GitHubActions
    participant PyPI

    GitHubActions->>PyPI: Upload package
    alt Package version is new
        PyPI-->>GitHubActions: Upload succeeds
    else Package version already exists
        PyPI-->>GitHubActions: Upload fails
    end
Loading

文件级变更

变更 详细信息 文件
恢复幂等的 PyPI 上传行为,使重复的发布尝试不再被静默跳过。
  • 从 PyPI 发布操作中移除 skip-existing 选项,使已发布的软件包再次上传时恢复失败。
.github/workflows/python-publish.yml

提示和命令

与 Sourcery 交互

  • 触发新的审查: 在拉取请求中评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审查评论。
  • 从审查评论创建 GitHub issue: 回复审查评论,请 Sourcery 根据该评论创建 issue。你也可以使用 @sourcery-ai issue 回复审查评论,以根据该评论创建 issue。
  • 生成拉取请求标题: 在拉取请求标题的任意位置输入 @sourcery-ai,即可随时生成标题。你也可以在拉取请求中评论 @sourcery-ai title,以随时生成或重新生成标题。
  • 生成拉取请求摘要: 在拉取请求正文中你希望显示摘要的任意位置输入 @sourcery-ai summary,即可随时生成 PR 摘要。你也可以在拉取请求中评论 @sourcery-ai summary,以随时生成或重新生成摘要。
  • 生成审查者指南: 在拉取请求中评论 @sourcery-ai guide,即可随时生成或重新生成审查者指南。
  • 解决所有 Sourcery 评论: 在拉取请求中评论 @sourcery-ai resolve,即可解决所有 Sourcery 评论。如果你已经处理完所有评论且不想再看到它们,这一功能会很有用。
  • 忽略所有 Sourcery 审查: 在拉取请求中评论 @sourcery-ai dismiss,即可忽略所有现有的 Sourcery 审查。如果你想通过新的审查重新开始,这一功能尤其有用——别忘了评论 @sourcery-ai review 来触发新的审查!

自定义你的使用体验

访问你的控制面板以:

  • 启用或停用审查功能,例如 Sourcery 生成的拉取请求摘要、审查者指南等。
  • 更改审查语言。
  • 添加、删除或编辑自定义审查说明。
  • 调整其他审查设置。

获取帮助

Original review guide in English
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The deploy workflow is reverted to its previous PyPI publishing behavior by removing skip-existing, so rerunning a release will fail when the package version already exists instead of treating the upload as successful.

Sequence diagram for PyPI release rerun behavior

sequenceDiagram
    participant GitHubActions
    participant PyPI

    GitHubActions->>PyPI: Upload package
    alt Package version is new
        PyPI-->>GitHubActions: Upload succeeds
    else Package version already exists
        PyPI-->>GitHubActions: Upload fails
    end
Loading

File-Level Changes

Change Details Files
Revert idempotent PyPI upload behavior so duplicate release attempts are no longer silently skipped.
  • Remove the skip-existing option from the PyPI publishing action, restoring upload failures for already-published distributions.
.github/workflows/python-publish.yml

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The workflow change is minimal, YAML-valid, and matches the stated intent to fail on attempts to republish an existing version.

Pull request overview

This PR reverts a previous change to the PyPI publish GitHub Actions workflow, restoring the behavior where publishing fails if the package version already exists on PyPI (i.e., non-idempotent release reruns).

Changes:

  • Removed the skip-existing: true option from the PyPI publish action configuration to ensure uploads of an existing version fail.
File summaries
File Description
.github/workflows/python-publish.yml Removes skip-existing from the publish step to restore failure-on-duplicate PyPI upload behavior.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

你好——我已经审阅了你的更改,整体看起来很棒!


Sourcery 对开源项目免费——如果你喜欢我们的评审,欢迎分享 ✨
请帮我变得更有用!请在每条评论上点击 👍 或 👎,我会利用这些反馈来改进评审。
Original comment in English

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@SpriteMisaka
SpriteMisaka merged commit c154795 into main Aug 27, 2026
2 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.

2 participants