yetus-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ajay Yadava (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YETUS-446) releasedocmaker not handling 0 version in a range correctly?
Date Fri, 26 Aug 2016 17:47:20 GMT

    [ https://issues.apache.org/jira/browse/YETUS-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15439453#comment-15439453
] 

Ajay Yadava commented on YETUS-446:
-----------------------------------

h5. Preliminary Analysis:
When giving range, the endpoints of the range are not validated to be valid fixVersions(release
version) and are always added to the list of fixVersions for which JIRA issues will be queried.


For example, if we assume that Falcon project has 1.4 and 1.5 only as valid fixVersions the
following command
{code}
releasedocmaker --project FALCON --outputdir FALCON --projecttitle 'Apache Falcon' --version
1 --version 2 --range --index --license
{code}

will look for JIRA issues for versions : {{\[1, 1.4, 1.5, 2 \]}} Though as per our assumption,
1 and 2 are not valid fixVersions, when querying for issues with 1/2 as fixVersion([query
url for issues with fixVersion 1 | https://issues.apache.org/jira/rest/api/2/search?jql=project+in+%28%27FALCON%27%29+and++++++++++++++++fixVersion+in+%28%271%27%29+and++++++++++++++++resolution+%3D+Fixed&startAt=0&maxResults=100
], [query url for issues with fixVersion 2 | https://issues.apache.org/jira/rest/api/2/search?jql=project+in+%28%27FALCON%27%29+and++++++++++++++++fixVersion+in+%28%272%27%29+and++++++++++++++++resolution+%3D+Fixed&startAt=0&maxResults=100])
JIRA api doesn't throw a bad request and returns a response as below:
{code}
{"startAt":0,"maxResults":100,"total":0,"issues":[]}
{code}

This is handled by [this fragment | https://github.com/apache/yetus/blob/master/release-doc-maker/releasedocmaker.py#L726]
of the code where it prints a message and moves on to next fixVersion. 

However, interestingly if we [query for fixVersion "0" |https://issues.apache.org/jira/rest/api/2/search?jql=project+in+%28%27FALCON%27%29+and++++++++++++++++fixVersion+in+%28%270.0%27%29+and++++++++++++++++resolution+%3D+Fixed&startAt=0&maxResults=100],
JIRA api returns an error code of 400(Bad Request) with following response:
{code}
{"errorMessages":["The value '0.0' does not exist for the field 'fixVersion'."],"errors":{}}
{code}








> releasedocmaker not handling 0 version in a range correctly?
> ------------------------------------------------------------
>
>                 Key: YETUS-446
>                 URL: https://issues.apache.org/jira/browse/YETUS-446
>             Project: Yetus
>          Issue Type: Bug
>          Components: Release Doc Maker
>    Affects Versions: 0.4.0
>            Reporter: Allen Wittenauer
>            Assignee: Ajay Yadava
>
> Playing around this morning, I seem to have hit an interesting bug.
> {code}
> releasedocmaker --project FALCON --outputdir FALCON --projecttitle 'Apache Falcon' --version
0 --version 1 --range --index --license
> {code}
> results in this URL getting generated:
> {code}
> https://issues.apache.org/jira/rest/api/2/search?jql=project+in+%28%27FALCON%27%29+and++++++++++++++++fixVersion+in+%28%270.0%27%29+and++++++++++++++++resolution+%3D+Fixed&startAt=0&maxResults=100
> {code}
> A completely valid URL.  However,  RDM reports on the screen:
> {code}
> JIRA returns HTTP error 400: Bad Request. Aborting.
> Please make sure the specified projects are correct.
> {code}
>  whereas JIRA spits back
> {code}
> {"errorMessages":["The value '0.0' does not exist for the field 'fixVersion'."],"errors":{}}
> {code}
> So somewhere we are generating an invalid version and not verifying it with JIRA. Additionally,
our error message is wrong which isn't going to help the user at all.  :(



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message