Skip to content

Advise packagers on requesting upload size limit increase #3175

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

Merged
merged 4 commits into from
Mar 8, 2018

Conversation

brainwane
Copy link
Contributor

No description provided.

di
di previously requested changes Mar 8, 2018
limit=file_size_limit // (1024 * 1024),
))
limit=file_size_limit // (1024 * 1024)) +
"See https://pypi.org/help/#file_size_limit",
Copy link
Member

Choose a reason for hiding this comment

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

Instead of hardcoding this link, could you generate it like request.route_url('help', _anchor='file-file-size-limit'), otherwise it will be wrong for TestPyPI.

Copy link
Member

Choose a reason for hiding this comment

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

(Also I realize there are a few other places where this isn't being done... perhaps you'd like to fix those too? 🙂)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AHA. I tried to figure that out - evidently not hard enough. :) Thanks for the tip. Fixing.

@@ -152,6 +154,17 @@ <h2>{{ project_name_claim() }}</h2>
</p>
</section>

<section id="file_size_limit" class="common-question">
Copy link
Member

Choose a reason for hiding this comment

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

I think our frontend generally prefers kebab-case for ids rather than snake_case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it. Fixing.

If you can't upload your release to PyPI because you're hitting the upload file size limit, please <a href="https://github.com/pypa/warehouse/issues/new">file an issue</a> and tell us:</p>
<ul>
<li>The name of the project</li>
<li>The size of your release (example: 300 MB)</li>
Copy link
Member

Choose a reason for hiding this comment

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

300MB is kind of on the larger end of our normal requests. Instead of providing an example we could just say:

The size of your release, in megabytes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it. Fixing.

<ul>
<li>The name of the project</li>
<li>The size of your release (example: 300 MB)</li>
<li>Which index/indexes you need the increase for (PyPI, Test PyPI, or both)</li>
Copy link
Member

@di di Mar 8, 2018

Choose a reason for hiding this comment

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

It's probably also worth adding somewhere (perhaps here) that if they are trying to upload the first release for their project, and that release is larger than the default limit, they need to make an initial release that is smaller than the default limit before we are able to increase the limit for the given name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Fixed.

@brainwane brainwane changed the title Advise packagers on requesting upload size limit increase WIP Advise packagers on requesting upload size limit increase Mar 8, 2018
@brainwane
Copy link
Contributor Author

Failing a test because I am not properly plumbing the route call through Pyramid's URL mapping:

warehouse/forklift/legacy.py:1001: in file_upload
    'help', _anchor='file-size-limit'
../lib/python3.6/site-packages/pyramid/url.py:261: in route_url
    mapper = reg.getUtility(IRoutesMapper)

Looks like we should also fix https://github.com/pypa/warehouse/blob/master/warehouse/forklift/legacy.py#L833 to use URL mapping.

Going to fix after lunch, would welcome tips.

@di
Copy link
Member

di commented Mar 8, 2018

Yes, you'll need to mock out route_url in the test, something like this:

db_request.route_url = pretend.call_recorder(
    lambda route, **kw: "/the/help/url/"
)

@brainwane
Copy link
Contributor Author

@di Thanks for the tip. I have fixed the test for the filesize message, and will look at the other upload error messages that need URL substitution in a separate PR. I believe this is ready to merge.

@brainwane brainwane changed the title WIP Advise packagers on requesting upload size limit increase Advise packagers on requesting upload size limit increase Mar 8, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@di di merged commit aadb7f6 into pypi:master Mar 8, 2018
@brainwane brainwane deleted the filesize branch March 8, 2018 22:38
Mariatta pushed a commit to Mariatta/warehouse that referenced this pull request Mar 9, 2018

Verified

This commit was signed with the committer’s verified signature.
Mariatta Mariatta
* Advise packagers on requesting upload size limit increase

* Add filesize limit help link to error message

* Fix typo in comment
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.

None yet

2 participants