-
Notifications
You must be signed in to change notification settings - Fork 189
feat: integrate automated PyPI oldest-release cleanup into wheels publishing workflow #364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Excellencedev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Omar8345 This looks good but:
- I think the workflow is supposed to use mediar-ai/workflow for the workflow instead of chromium etc
- The workflow should have different steps in different files
Hiya @Excellencedev! Thanks for the review! The |
Excellencedev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
no i didnt ask for playwright ... missign the whole point, use terminator / workflow sdk |
@Omar8345 I was right |
@louis030195 but that can't run on GH actions, can it? can you provide me with a more technical approach and what is exactly to be done, the issue doesn't have enough info so I should create a new use case in the examples folder, like #360 |
|
gh action have UI |
|
@Omar8345 check this too to see if it is working in github actions https://github.com/nektos/act |
thanks!
should i use like browser extension or do ? maybe can u give me general approach i can move on |
|
gm @louis030195 and @Excellencedev While working on the PR, I faced this issue that it can't run on Linux: execute: async ({ desktop, input, logger }: any) => {
logger.info("🔐 Logging into PyPI...");
try {
await desktop.navigateBrowser("https://pypi.org/account/login/");
await desktop.wait(2000);
// ...are we supposed to have a macos/windows image on the GitHub actions workflow instead? Or write a script that simulates the login form and CSRF tokens manually, which is more brittle and will be a mess in maintenance. |
@Omar8345 is it in ci or locally ? |
|
@Excellencedev i tried locally on my macOS M2 using the tool you shared, but it didn't work since there is no build for Linux nor even for my M2 (ARM). The error shared was on Linux (GH Actions) |
It's an issue with them. Right now, you have to
|
|
|
Hey @louis030195 — quick update so we stay aligned: I’ve switched the implementation to the Terminator Workflow SDK, but the workflow cannot run on Linux because the SDK currently has no Linux implementation. I also tried testing on my local macOS M2 machine, but the workflow binaries aren’t available for ARM either — so I cannot test locally. (maybe I missed something to install, if it works with ARM, please let me know to check the method once more, but we are thinking more of GitHub Actions compatibility right now) I’ve put a lot of work into getting this running properly, and I want to avoid any delays with the bounty, so here are the practical options now:
I’m committed to finishing this professionally — just let me know which direction you prefer, and I’ll update the PR right away. 🙏 |
|
@Omar8345 only Windows runners like |
|
@louis030195 @Excellencedev @divanshu-go Hi all, I discovered a new issue, due to GitHub CI logging in from unknown IPs, PyPI tends to send emails to open link to allow access even though 2FA is enabled and passed, should this be done manually or what? |
@Omar8345 disable 2FA on your pypi account |
really, man i only got one question, what will we have if we remove it, you can't publish pkgs without it, its mandatory, 2FA isn't the problem, that's fixed, the issue is, even if you supplied 2FA code, it sends email |
|
@Omar8345 test it yourself and see |
|
@Omar8345 you hae already enabled 2FA before. It sais once it is enabled, it cannot be disabled |
i beg u pls read |
|
Give me the link |
|
issue is that link for auth needs to somehow get to the CI vm |
@Omar8345 as you can see, 2FA is NOT enabled on my account |
try publishing a throwaway package |
|
sorry @Omar8345 |
|
does it work, why there is 100000 comments |
|
mind reading for once? we got it to work, partially, the only problem we face right now even after doing 2FA successfully, it asks for email verification to continue, idk what do u think |
|
@Omar8345 Could you please run the workflow locally (not through GitHub workflows) and provide a short recording demonstrating it functioning end-to-end? This will give us clear verification of the implementation and help move the review forward efficiently. |
|
Just an update: I hit a hard blocker with PyPI’s email-verification step, which still triggers even after bypassing 2FA. That makes the workflow impossible to automate as-is, and I’m waiting for clear instructions on how you want this handled. Two options from my side:
Either way, we do need reliable cookies — one approach or the other. Alternatively, we can automate email handling using one of these approaches:
There’s also the option of a dedicated dummy PyPI account (with permission to delete releases) tied to whichever email solution we choose, so the workflow can fully automate verification and release deletion. Pick one or specify another direction; otherwise I’m stuck here. |
@m13v @louis030195 pls read and reply in addition, please check screenpipe/screenpipe#1970 its been like 2 months |
|
hm? fine. TL;DR: The whole workflow is stuck on PyPI’s email-verification step. To unblock this, we need an automated way to read the verification emails. Options:
Pick one so I can finally move forward. |
|
@louis030195 @m13v if you dont want the PR at least say so and tip me for my effort |
|
@m13v @louis030195 you closed issue as completed? and when I got a blockage when I was 90% of the way you ignore and don't reply? this is not fair at all? like you didn't apologize or give me a reply or neither compensate me not even partially? this just doesn't feel fair, if you think everything's normal, i'm telling you it is the opposite 👍 |






Description
This PR adds an automated cleanup step to the existing
ci-wheels.ymlworkflow to ensure PyPI does not hit its version limit during publishing.The cleanup script (Mediar Workflow) logs into PyPI's web UI and deletes the oldest release right before the terminator package is published. This prevents failed uploads when too many versions accumulate.
Key changes
.github/scripts/pypi-cleanupci-wheels.ymlAdded required GitHub Actions secrets
PYPI_UI_USERNAME— PyPI account username for UI loginPYPI_UI_PASSWORD— PyPI account passwordPYPI_UI_COOKIES— Cookies from a 2FA authenticated session withRemember meon (must be updated every 30d)example:
Video Demo
PyPI.Cleanup.TS.Workflow.Demo.mov
AI Review & Code Quality
Checklist
Additional Notes
/claim #357
Closes #357
cc @louis030195 for review 🙏