https://progress.opensuse.org/https://progress.opensuse.org/themes/openSUSE/favicon/favicon.ico?15829177842021-04-12T12:05:43ZopenSUSE Project Management ToolopenQA Project - action #91004: Treat '--apibase /' argument for openqa-client as errorhttps://progress.opensuse.org/issues/91004?journal_id=3967222021-04-12T12:05:43Zokurzokurz@suse.com
<ul><li><strong>Related to</strong> <i><a class="issue tracker-4 status-3 priority-4 priority-default closed behind-schedule" href="/issues/90818">action #90818</a>: [openqa][tool] Not able to get group_overview json output.</i> added</li></ul> openQA Project - action #91004: Treat '--apibase /' argument for openqa-client as errorhttps://progress.opensuse.org/issues/91004?journal_id=3967462021-04-12T13:00:41Zmkittlermarius.kittler@suse.com
<ul></ul><p>I'd rather make it a warning or at least allow forcing the API-base via an environment variable.</p>
openQA Project - action #91004: Treat '--apibase /' argument for openqa-client as errorhttps://progress.opensuse.org/issues/91004?journal_id=3967672021-04-12T14:01:23Zlivdywanliv.dywan@suse.com
<ul></ul><p>mkittler wrote:</p>
<blockquote>
<p>I'd rather make it a warning or at least allow forcing the API-base via an environment variable.</p>
</blockquote>
<p>Warning against what?</p>
<p>I was asking this in the original ticket: Can't we require that whatever the path is actually is openQA API? Regardless if it's / or v15 or whatever</p>
openQA Project - action #91004: Treat '--apibase /' argument for openqa-client as errorhttps://progress.opensuse.org/issues/91004?journal_id=3968242021-04-13T03:02:17Zxlaixlai@suse.com
<ul></ul><p><a class="user active user-mention" href="https://progress.opensuse.org/users/17668">@okurz</a> <a class="user active user-mention" href="https://progress.opensuse.org/users/22072">@mkittler</a> @cdywan </p>
<p><strong>As a user, I hope some soft handling way can be used, rather than direct error and stops further handling.</strong></p>
<p>Please let me share my personal opinion, but due to limited understanding of openqa, I can be wrong at some points, please correct me.</p>
<p>In the original ticket <a href="https://progress.opensuse.org/issues/90818#note-14" class="external">https://progress.opensuse.org/issues/90818#note-14</a>, I asked "What is the intended web api(restapi) that client script supports to get group overview json format output?" and oliver replied "There is none.". <br>
My understanding of restapi is that a web application that follows restapi conventions well should provide restful api for any route, so for openqa, eg group_overview, it should also provide a restful api for it, rather than what currently it is in <a href="https://openqa.nue.suse.com/what_are_supported_api_routes" class="external">https://openqa.nue.suse.com/what_are_supported_api_routes</a> that only those under /api/v1 is the restful api while /group_overview/<a href="groupid:num" class="external">groupid:num</a> is not(but it is supported route also). However, the command line tool of openqa, openqa-client(and the new openqa-cli) which is designed to use restful apis to perform web similar operations, has no way to query group_overview json output. That means the command line tool is even more limited than web, but IMHO command line tool should be more powerful. </p>
<p><strong>So as a user, I would suggest that the command line tool openqa-client(and the new openqa-cli) can be made capable to perform all supported routes in <a href="https://openqa.nue.suse.com/what_are_supported_api_routes" class="external">https://openqa.nue.suse.com/what_are_supported_api_routes</a>, no matter it is restful or not, rather than report errors to stop further actions.</strong></p>
openQA Project - action #91004: Treat '--apibase /' argument for openqa-client as errorhttps://progress.opensuse.org/issues/91004?journal_id=3969142021-04-13T08:45:45Zmkittlermarius.kittler@suse.com
<ul></ul><blockquote>
<p>Warning against what?</p>
</blockquote>
<p>Obviously that one would get a warning when accessing a non-API route instead of just completely preventing it.</p>
<hr>
<p><a class="user active user-mention" href="https://progress.opensuse.org/users/22250">@xlai</a> In openQA we differentiate between routes providing the web GUI and routes of the REST-API. The web GUI's routes return HTML content, CSS, SVG, JavaScript and various other formats. They return what's necessary to provide the GUI. The REST-API routes on the other hand return only JSON documents and only routes under <code>/api</code> belong to the REST-API. Note that the <code>.json</code> versions which are provided by some of the web GUI routes should <em>not</em> be considered a stable API. You can use them but you'll have to expect that their structure might change at any time.</p>
<p>If some required information is only exposed through the web GUI and not the REST-API we might want to extend the REST-API.</p>
openQA Project - action #91004: Treat '--apibase /' argument for openqa-client as errorhttps://progress.opensuse.org/issues/91004?journal_id=3979412021-04-15T16:14:07Zlivdywanliv.dywan@suse.com
<ul></ul><p>mkittler wrote:</p>
<blockquote>
<p>If some required information is only exposed through the web GUI and not the REST-API we might want to extend the REST-API.</p>
</blockquote>
<p>Yeah, that's what I'm also thinking now. The REST API <em>should</em> support all of the use cases. If it doesn't support a case I'd consider that internal/legacy.</p>
<p>In the sense that <em>openqa-client</em> should support this <strong>use case</strong> I agree with <a class="user active user-mention" href="https://progress.opensuse.org/users/22250">@xlai</a> although I think it means we need to add a new route.</p>
openQA Project - action #91004: Treat '--apibase /' argument for openqa-client as errorhttps://progress.opensuse.org/issues/91004?journal_id=3979652021-04-15T19:46:59Zokurzokurz@suse.com
<ul><li><strong>Priority</strong> changed from <i>Normal</i> to <i>Low</i></li><li><strong>Target version</strong> changed from <i>Ready</i> to <i>future</i></li></ul><p>Well, I guess after all this isn't that clear and maybe also not that important.</p>