Skip to content
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

Publishing fails if dist/ folder contains a subfolder #193

Closed
ssbarnea opened this issue Nov 22, 2023 · 4 comments
Closed

Publishing fails if dist/ folder contains a subfolder #193

ssbarnea opened this issue Nov 22, 2023 · 4 comments
Labels
invalid This doesn't seem right

Comments

@ssbarnea
Copy link

I observed a bug in publishing, basically presence of folders inside dist/ breaks the publishing:

Checking dist/ansible_dev_tools-0.2.0a0-py3-none-any.whl: PASSED
Checking dist/ansible-dev-tools-0.2.0a0.tar.gz: PASSED
Checking dist/test: ERROR    InvalidDistribution: Unknown distribution format: 'test'

That happened because dist/test/ exists.

ssbarnea added a commit to ansible/ansible-dev-tools that referenced this issue Nov 22, 2023
ssbarnea added a commit to ansible/ansible-dev-tools that referenced this issue Nov 22, 2023
@woodruffw
Copy link
Member

This is probably happening because of twine check: twine's assumption is that everything under dist/* is either an uploadable distribution or some kind of sidecar file that the index supports (historically, things like PGP .asc signatures).

ref: https://github.com/pypa/twine/blob/96674dbb359b0121b1d0aaa908c93dc11344c2f7/twine/package.py#L104-L106

TL;DR: This is twine's behavior, not this workflow's, so this issue might be better suited for them 🙂. But it's also (I believe) long-standing behavior, so they may not want to change it.

@woodruffw
Copy link
Member

Just noticed that this workflow will skip twine check if verify-metadata: false is passed.

@ssbarnea can you see if that silences the error for you? I suspect that it might not, since twine upload will also perform the same check anyways.

@webknjaz
Copy link
Member

FWIW, I'm not sure if I'd want to support this in the action. A folder with uploadables has always been the interface for feeding stuff into the action (short of the inputs). Besides, it's intentionally not doing many things, offloading everything possible to the underlying tools.

@webknjaz webknjaz added the invalid This doesn't seem right label Nov 29, 2023
@webknjaz
Copy link
Member

Duplicate of #148

@webknjaz webknjaz marked this as a duplicate of #148 Nov 29, 2023
@webknjaz webknjaz closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants