Bug 1455495 - Replace apache with Mojolicious#517
Bug 1455495 - Replace apache with Mojolicious#517dylanwh merged 31 commits intomozilla-bteam:masterfrom dylanwh:mojo-poc
Conversation
|
This looks great to me. How about some fingers-and-toes tests too? |
|
@mohawk2 not sure I understand fingers and toes tests? |
|
@dylanwh Sorry to be unclear. The analogy is the most basic of testing, to "count the fingers and toes" are the correct number. If you tell me the I see the CI |
|
Uh oh, still failing CI :-( |
|
Paging @mohawk2, your review of Bugzilla/Quantum/CGI.pm's _STDIN() method and related code would be valuable. :-) |
| ); | ||
| $ses_auth->any('/index.cgi')->to('SES#main'); | ||
|
|
||
| $r->any('/:REWRITE_itrequest' => [REWRITE_itrequest => qr{form[\.:]itrequest}])->to( |
There was a problem hiding this comment.
Perhaps I should add a hook and move these to the BMO extension?
@globau ?
There was a problem hiding this comment.
i agree; these belong in the bmo ext. this needn't block the initial release however.
| ); | ||
| $ses_auth->any('/index.cgi')->to('SES#main'); | ||
|
|
||
| $r->any('/:REWRITE_itrequest' => [REWRITE_itrequest => qr{form[\.:]itrequest}])->to( |
There was a problem hiding this comment.
i agree; these belong in the bmo ext. this needn't block the initial release however.
| SCRIPT_NAME => "$prefix$script_name", | ||
| SERVER_NAME => hostname, | ||
| SERVER_PORT => $tx->local_port, | ||
| SERVER_PROTOCOL => $req->is_secure ? 'HTTPS' : 'HTTP', # TODO: Version is missing |
| sub _file_to_method { | ||
| my ($name) = @_; | ||
| $name =~ s/\./_/s; | ||
| $name =~ s/\W+/_/gs; |
There was a problem hiding this comment.
no need to replace periods separately, \W will match
| return $self->template->process($file, $vars, $output); | ||
| } | ||
| else { | ||
| die __PACKAGE__ . '->process() called with too many arguments'; |
There was a problem hiding this comment.
it's a bit odd to see the length of @_ being used to see if vars are set.
i suspect this check is useful only during the development of the mojo transition; it would be much clearer if you just did if (!defined $output) { ... } else { ... }
| return $self->SUPER::redirect(@_); | ||
| } | ||
|
|
||
| use Bugzilla::Logging; |
There was a problem hiding this comment.
this should be at the top of the file
| # && $ENV{'HTTP_USER_AGENT'} !~ /(?:WebKit|Trident|KHTML)/ | ||
| # && !$agent | ||
| # && !defined($cgi->param('serverpush')) | ||
| # || $cgi->param('serverpush'); |
There was a problem hiding this comment.
is serverpush a TODO item, or is it being dropped by this change?
if it's being dropped you should remove all related code.
| ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Shield', 'format' => 'shield-studies' } ); | ||
| $r->any( '/:REWRITE_client_bounty' => [ REWRITE_client_bounty => qr{form[\.:]client[\.:]bounty} ] ) | ||
| ->to( 'CGI#enter_bug_cgi' => { 'product' => 'Firefox', 'format' => 'client-bounty' } ); | ||
| } |
There was a problem hiding this comment.
this is very hard to read, and repetitive.
how about defining these aliases in a hash, and building the routes dynamically from that?
| @@ -1,72 +0,0 @@ | |||
| # This Source Code Form is subject to the terms of the Mozilla Public | |||
There was a problem hiding this comment.
what's happing here?
if the shutdownhtml is no longer supported then all the related code should be removed.
if it is still supported then this test should remain.
|
|
||
| sub cmd_test_selenium { | ||
| my $conf = require $ENV{BZ_QA_CONF_FILE}; | ||
| $ENV{HTTP_BACKEND} = 'simple'; |
There was a problem hiding this comment.
perhaps it would be better to run tests under the same backend as prod?
There was a problem hiding this comment.
The selenium tests don't run with any level of concurrency and haven't for a long time.
For apache the number of workers as also limited. I'm confident hypnotoad and the simple httpd are close enough for this.
| # | ||
| # | ||
| # | ||
| ### END INIT INFO |
There was a problem hiding this comment.
i've been using systemd for so long i forgot how horrible init.d scripts are
|
Hi! Bug 1355476 was duped to bug 1455495, however I don't see any reference to |
I gave a talk about this, and the slides are available here:
https://dylanhardison.files.wordpress.com/2018/09/bugzilla-on-mojolicious.pdF