Skip to content

How to restore a project to functionality after pushing a branch with non-ASCII UTF-8 characters #2632

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

Closed
adamnovak opened this issue Feb 7, 2017 · 3 comments
Labels
Bug A bug Needed: more information A reply from issue author is required

Comments

@adamnovak
Copy link

Our project had some UTF-8 characters in branch names. Since according to #1822, these aren't allowed in branch names, I've removed them. But even after running a new build of my project, the Versions page remains inaccessible and Admin -> Versions still features the old, removed, UTF-8 branch.

This is not a duplicate of #1410; that issue deals with proper support for UTF-8 characters in branch names, while this issue deals with the correct recovery procedure for fixing a project that has had unsupported UTF-8 characters in its branch names.

Details

Expected Result

New branches should show up under Admin -> Versions immediately after the next successful build, now that no branch names on the Github repo contain UTF-8 characters. Also, the main "Versions" button for the project should return a page full of versions.

Actual Result

New branches are still not appearing under Admin -> Versions after a successful build, and the old, invalidly-named branches are still there. The main "Versions" page still just has an error message saying "Fail. Check back in a bit!".

@adamnovak adamnovak changed the title How to restore a project to functionality after pushing a branch with UFT-8 Characters How to restore a project to functionality after pushing a branch with UFT-8 characters Feb 7, 2017
@ericholscher
Copy link
Member

I fixed this for your project by deleting the version, but the issue seems to be in the packaging library we're using for version comparison. Full traceback:

Traceback (most recent call last):
File "/home/docs/bin/gunicorn", line 11, in <module>
File "/home/docs/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
File "/home/docs/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 185, in run
File "/home/docs/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 71, in run
File "/home/docs/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 176, in run
File "/home/docs/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 477, in manage_workers
File "/home/docs/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 541, in spawn_workers
File "/home/docs/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker
File "/home/docs/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 120, in init_process
File "/home/docs/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 44, in run
File "/home/docs/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 93, in handle
File "/home/docs/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 139, in handle_request
File "/home/docs/local/lib/python2.7/site-packages/newrelic-2.76.0.55/newrelic/api/web_transaction.py", line 738, in __iter__
File "/home/docs/local/lib/python2.7/site-packages/newrelic-2.76.0.55/newrelic/api/web_transaction.py", line 1114, in __call__
File "/home/docs/local/lib/python2.7/site-packages/newrelic-2.76.0.55/newrelic/api/web_transaction.py", line 1242, in _nr_wsgi_application_wrapper_
File "/home/docs/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 189, in __call__
File "/home/docs/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
File "/home/docs/local/lib/python2.7/site-packages/newrelic-2.76.0.55/newrelic/hooks/framework_django.py", line 503, in wrapper
File "/home/docs/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
File "/home/docs/local/lib/python2.7/site-packages/rest_framework/viewsets.py", line 85, in view
File "/home/docs/local/lib/python2.7/site-packages/newrelic-2.76.0.55/newrelic/hooks/component_djangorestframework.py", line 27, in _nr_wrapper_APIView_dispatch_
File "/home/docs/local/lib/python2.7/site-packages/rest_framework/views.py", line 407, in dispatch
File "/home/docs/local/lib/python2.7/site-packages/rest_framework/views.py", line 404, in dispatch
File "/home/docs/checkouts/readthedocs.org/readthedocs/restapi/views/model_views.py", line 112, in sync_versions
File "/home/docs/checkouts/readthedocs.org/readthedocs/projects/version_handling.py", line 169, in determine_stable_version
File "/home/docs/checkouts/readthedocs.org/readthedocs/projects/version_handling.py", line 144, in sort_versions
File "/home/docs/checkouts/readthedocs.org/readthedocs/projects/version_handling.py", line 110, in parse_version_failsafe
File "/home/docs/local/lib/python2.7/site-packages/packaging/version.py", line 212, in __init__

@agjohnson agjohnson added the Bug A bug label Feb 15, 2017
@stsewd
Copy link
Member

stsewd commented Jan 10, 2018

Hi, I just tested this on my local instance, when creating a branch like tílde or 😁-happy, the build fails immediately, no versions are created/updated (but I can access to versions or admin -> versions normally), when removing the branches and building again, everything is fine, if I add new valid branches these are listed.

So, was this problem fixed at some point?

@adamnovak adamnovak changed the title How to restore a project to functionality after pushing a branch with UFT-8 characters How to restore a project to functionality after pushing a branch with non-ASCII UTF-8 characters Jan 11, 2018
@RichardLitt RichardLitt added the Needed: more information A reply from issue author is required label Jan 11, 2018
@agjohnson
Copy link
Contributor

It sounds like the original issue was resolved. I think we have some more work to do on git parsing of this information though. Closing this issue as we have a few already around utf8 support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug Needed: more information A reply from issue author is required
Projects
None yet
Development

No branches or pull requests

5 participants