Closed ralphbean closed 8 years ago
OH.... I think this is because that entry has 'pypi' as its backend value in the DB... but only 'PyPI' is a valid value. Perhaps we need a db upgrade script to update old entries like this?
iirc the backend used when searching the new version is case insensitive, so checking new version should work, only the drop-down is indeed not behaving as desired.
Has this issue been fixed, I've followed the following steps but was unable to reproduce the issue:
Add project
pypi
based project successfully and then clicked on edit
I get the following screens with PyPi already selected.Is this still valid ? I believe its working fine. or have I gone wrong somewhere in the steps to reproduce this bug ?
Yes it's still valid as it refers to project that were created with the old case. So if you create a project with a pypi
backend that later got renamed to PyPI
, then the workflow you have described won't work anymore and that's the source of the report here.
I'm looking at the DB right now:
SELECT DISTINCT projects.backend FROM projects ORDER BY projects.backend;
backend
----------------
BitBucket
CPAN (perl)
custom
Debian project
Drupal6
Drupal7
folder
Freshmeat
GitHub
GNOME
GNU project
Google code
Hackage
Launchpad
Maven Central
npmjs
pagure
Pear
PEAR
PECL
pypi
PyPI
Rubygems
Sourceforge
Stackage
So look at this I see two "problematic" backends: pypi
and Pear
.
Some stats:
SELECT COUNT(projects.id) FROM projects WHERE projects.backend = 'pypi';
count
-------
337
(1 row)
SELECT COUNT(projects.id) FROM projects WHERE projects.backend = 'PyPI';
count
-------
307
SELECT COUNT(projects.id) FROM projects WHERE projects.backend = 'Pear';
count
-------
8
SELECT COUNT(projects.id) FROM projects WHERE projects.backend = 'PEAR';
count
-------
2
Problem fixed:
UPDATE projects SET backend='PEAR' WHERE backend='Pear';
UPDATE 8
UPDATE projects SET backend='PyPI' WHERE backend='pypi';
UPDATE 337
:)
Take this one for example. See the backend is PyPI? Click 'edit' and you'll see that "Bitbucket" is pre-selected in the form. If people don't pay attention and reset it to PyPI, that could lead to lots of misconfigured entries down the road.
We should update that form so that it has the current value you (PyPI) pre-selected.