Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1514600 - unclear release flag error
Summary: unclear release flag error
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Extensions
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: 5.0
Assignee: Jeff Fearn 🐞
QA Contact: Jeff Fearn 🐞
URL:
Whiteboard:
Depends On: 1284342
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-17 20:54 UTC by Ken Dreyer (Red Hat)
Modified: 2018-12-09 06:29 UTC (History)
2 users (show)

Fixed In Version: 5.0.4-rh2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-18 10:14:54 UTC


Attachments (Terms of Use)

Description Ken Dreyer (Red Hat) 2017-11-17 20:54:05 UTC
Description of problem:
When I call the XML-RPC call Releases.getReleaseComponents with a "release" parameter of "ceph-1.3.z", I get an error:

<Fault 32000: 'No data given on release name invalid.'>

I think this might have been intended to be "No data given *or* release name invalid"?

It's still cryptic even when I try to understand it. I've tried posting other release values like the empty string "", or bogus flags "ceph-foobar", and those both have a slightly different error message, so I'm confused what this particular release_invalid_flag_name error means here.

I'm not in the "editrelease" BZ group so I can't see what exactly is different about our ceph-1.3.z release versus our other ones. ceph-1.3.0, ceph-2.y, ceph-3.0 all return fine. It's only this one that gives me this strange error from the API.

Version-Release number of selected component (if applicable):
4.4.12074.2

How reproducible:
always

Steps to Reproduce:
1. Set up a XML-RPC payload:

$ cat xmlrpc
<?xml version='1.0'?>
<methodCall>
<methodName>Releases.getReleaseComponents</methodName>
<params>
<param>
 <value>
  <struct>
   <member>
    <name>release</name>
    <value><string>ceph-1.3.z</string></value>
   </member>
   <member>
    <name>Bugzilla_token</name>
    <value><string>MYTOKENHERE</string></value>
   </member>
  </struct>
  </value>
 </param>
</params>
</methodCall>

2. POST that to the server:
curl -H "Content-Type: text/xml" -d @xmlrpc https://bugzilla.redhat.com/xmlrpc.cgi | tidy -q -xml -i

Actual results:
"No data given on release name invalid."

Expected results:
A clearer error message about what I've done wrong for ceph-1.3.z

Additional info:
I am using the Releases.getReleaseComponents API endpoint as part of our release readiness checklist an upcoming RHCEPH 1.3 release.

Comment 1 Ken Dreyer (Red Hat) 2017-11-17 20:55:22 UTC
Adding anharris@redhat.com (Ceph Program Manager) to the CC for more background on ceph-1.3.z's settings.

Comment 2 Jeff Fearn 🐞 2017-11-20 01:52:17 UTC
ceph-1.3.z isn't set up correctly, it doesn't actually have any of the release content set-up, it's just flagged as a release.

The error message should be more informative, but it will have to wait for the review, which is blocked on PDC working fully.

Comment 3 Ken Dreyer (Red Hat) 2017-11-20 22:34:14 UTC
Thanks Jeff!

What is the exact nature of the blocker with PDC? Is there a Jira ticket?

Incidentally, is there any way to make the getRelease XML-RPC API available to the "redhat" group as well as the "editrelease" group? That would make it easier for developers to diagnose what is going wrong with a release.

Comment 4 Jeff Fearn 🐞 2017-11-21 00:07:11 UTC
(In reply to Ken Dreyer (Red Hat) from comment #3)
> Thanks Jeff!
> 
> What is the exact nature of the blocker with PDC? Is there a Jira ticket?

I don't have any details, we where just told, quite a while ago, not to work on any of this stuff in Bugzilla because it'll all be done in PDC and to wait for that.

> Incidentally, is there any way to make the getRelease XML-RPC API available
> to the "redhat" group as well as the "editrelease" group? That would make it
> easier for developers to diagnose what is going wrong with a release.

You'd have to get to get the program management team to request this, they own that extension and we implement it to their specification. It's unlikely this would get done in Bugzilla 4 if they did sign off on it as BZ4 is in maintenance mode pending the BZ5 upgrade.

Comment 6 Ken Dreyer (Red Hat) 2017-11-21 15:39:28 UTC
(In reply to Jeff Fearn from comment #4)
> You'd have to get to get the program management team to request this, they
> own that extension and we implement it to their specification.

Thanks. Who should I contact specifically about this?

What do you think about the following change for master?

diff --git a/extensions/Releases/lib/WebService.pm b/extensions/Releases/lib/WebService.pm
index 51893b3ad..fd53b2084 100644
--- a/extensions/Releases/lib/WebService.pm
+++ b/extensions/Releases/lib/WebService.pm
@@ -260,8 +260,8 @@ sub getRelease {
 
     my $dbh = Bugzilla->dbh;
 
-    Bugzilla->user->in_group('editrelease')
-        || ThrowUserError("auth_failure", { group  => "editrelease",
+    Bugzilla->user->in_group('redhat')
+        || ThrowUserError("auth_failure", { group  => "redhat",
                                             action => "edit",
                                             object => "release"});
 

The code looks similar on the devel-5.0 branch, except the getRelease API group is currently "program_management" instead of "editrelease", so I think the patch would be almost the same, right?

Comment 7 Jeff Fearn 🐞 2018-04-11 09:49:24 UTC
Message is now:

RPC Fault: The flag name supplied is either not a valid release flag name or the flag is not configured correctly.

Comment 8 Jeff Fearn 🐞 2018-04-18 10:14:54 UTC
This bug has been resolved in Red Hat Bugzilla 5 and can be tested on https://beta-bugzilla.redhat.com

If there are any issues, do not reopen this bug. Instead, you should create a new bug and reference this bug.


Note You need to log in before you can comment on or make changes to this bug.