Remove 'presentation' from version string - #179
Conversation
Otherwise it is misinterpreted as a pre-release. Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
This should fix the handling of https://www.wikidata.org/wiki/Q47007505. |
|
Can you say more about the specific example and how it fails? |
|
It fails to accept valid releases: With increased logging, the reason for the failing releases is shown: The failing releases have names which start with "Kitodo.Presentation". This string includes "pre" which is interpreted as a pre-release, therefore 'unstable', although all these releases are normal stable releases. |
|
@konstin, even with my patch, the script still fails, but with a different error ("Session lost (assertbotfailed)"): Do you have an idea what could cause this failure? |
|
Note that this patch fixes 40 of 41 invalid releases, but there remains this "invalid" release: Here the conflict is caused by '3.0.0-beta.1' != '3.0.0-Beta.1'. Maybe such minor mismatches should be accepted. |
|
To solve this case, we should match with the project name, instead of replacing specific strings, which only handle this project. |
|
"Presentation" can be part of any project name and included in their release strings, so this PR is not project specific. But of course there might be more strings in release name which include "pre" and which are not pre-releases. A complete run on all projects with debug output enabled would show all cases. |
|
I'd like to avoid maintaining a list of specific strings; Can we find a way to fix this misdetection by changing the string processing heuristics instead? |
|
Instead of removing "presentation", we could remove any "pre" which is either followed by a letter or which follows a letter", because in these cases it is likely not an indication of a pre-release. |
|
But do you have an idea why the script reports "Session lost (assertbotfailed), re-logging in" and finally fails? |
The code assumes a bot account to ensure that the bot gets logged in again after timing out, instead of running into API errors for anonymous users, that can be disabled by removing the bot assertion:
Can you explain why e.g. the existing name removal heuristic doesn't work? When changing the heuristics, we need to ensure that we have the broadest heuristic possible (for maintainability, to avoid having to change it again and again for mostly similar problems) and to make reasonable sure that there are no regressions where we break cases that used to work. |
Otherwise it is misinterpreted as a pre-release.