Project

General

Profile

Actions

action #107719

closed

o3 logreports - Could not render a response

Added by mkittler over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Regressions/Crashes
Target version:
Start date:
2022-03-01
Due date:
% Done:

0%

Estimated time:

Description

We see the following warnings/errors on o3:

[2022-02-28T16:33:43.718187Z] [error] [hzTerrCHXye9] Could not render a response at /usr/share/openqa/script/../lib/OpenQA/WebAPI.pm line 170.

This error message is actually logged by Mojolicious (Mojolicious/Controller.pm):

  # Maybe no 404
  return defined $output ? Mojo::ByteStream->new($output) : undef if $ts;
  return $maybe          ? undef : Carp::croak("Could not render a response") unless defined $output;

Not sure whether there's something we can do about it. It could actually be a problem on our side, e.g. a controller (likely the one of the logfile route) that unexpectedly doesn't render anything.

Actions #2

Updated by mkittler over 2 years ago

  • Description updated (diff)
Actions #3

Updated by tinita over 2 years ago

It comes from /tests/123/logfile? with no filename parameter.

WebAPI.pm:
$test_r->get('/logfile' => sub ($c) { $c->render('test/logfile') })->name('logfile');

line 1 in templates/webapi/test/logfile.html.ep

% return unless my $filename = param 'filename'; # return 404 unless filename query parameter specified

Maybe @kraih knows how to return a 404 from a template.

Actions #4

Updated by mkittler over 2 years ago

  • Assignee set to mkittler

I suppose I know so I'll give it a try :-)

Actions #5

Updated by mkittler over 2 years ago

  • Status changed from New to In Progress
Actions #6

Updated by mkittler over 2 years ago

  • Status changed from In Progress to Feedback

Unfortunately this needs an extra helper, otherwise it can't be helped it after all. PR: https://github.com/os-autoinst/openQA/pull/4539

Actions #7

Updated by mkittler over 2 years ago

  • Status changed from Feedback to Resolved

The PR has been merged and deployed and the workaround reverted.

Actions

Also available in: Atom PDF