Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package openQA for openSUSE:Factory checked in at 2025-09-22 19:29:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openQA (Old) and /work/SRC/openSUSE:Factory/.openQA.new.27445 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openQA" Mon Sep 22 19:29:18 2025 rev:753 rq:1306574 version:5.1758551670.e3aa50f9 Changes: -------- --- /work/SRC/openSUSE:Factory/openQA/openQA.changes 2025-09-22 16:39:17.912448859 +0200 +++ /work/SRC/openSUSE:Factory/.openQA.new.27445/openQA.changes 2025-09-22 19:29:21.950065075 +0200 @@ -1,0 +2,10 @@ +Mon Sep 22 15:12:15 UTC 2025 - [email protected] + +- Update to version 5.1758551670.e3aa50f9: + * Don't redirect screenshots, thumbs and needles to files_domain + * Cleanup .gitignore files + * Update Dockerfile to setup proxy via script/configure-web-proxy + * Redirect test assets to file_domain if configured + * Make sure assets are generated before listing them + +------------------------------------------------------------------- Old: ---- openQA-5.1758307053.75367131.obscpio New: ---- openQA-5.1758551670.e3aa50f9.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openQA-client-test.spec ++++++ --- /var/tmp/diff_new_pack.mJqDXt/_old 2025-09-22 19:29:23.302122013 +0200 +++ /var/tmp/diff_new_pack.mJqDXt/_new 2025-09-22 19:29:23.302122013 +0200 @@ -18,7 +18,7 @@ %define short_name openQA-client Name: %{short_name}-test -Version: 5.1758307053.75367131 +Version: 5.1758551670.e3aa50f9 Release: 0 Summary: Test package for %{short_name} License: GPL-2.0-or-later ++++++ openQA-devel-test.spec ++++++ --- /var/tmp/diff_new_pack.mJqDXt/_old 2025-09-22 19:29:23.326123024 +0200 +++ /var/tmp/diff_new_pack.mJqDXt/_new 2025-09-22 19:29:23.326123024 +0200 @@ -18,7 +18,7 @@ %define short_name openQA-devel Name: %{short_name}-test -Version: 5.1758307053.75367131 +Version: 5.1758551670.e3aa50f9 Release: 0 Summary: Test package for %{short_name} License: GPL-2.0-or-later ++++++ openQA-test.spec ++++++ --- /var/tmp/diff_new_pack.mJqDXt/_old 2025-09-22 19:29:23.354124203 +0200 +++ /var/tmp/diff_new_pack.mJqDXt/_new 2025-09-22 19:29:23.354124203 +0200 @@ -18,7 +18,7 @@ %define short_name openQA Name: %{short_name}-test -Version: 5.1758307053.75367131 +Version: 5.1758551670.e3aa50f9 Release: 0 Summary: Test package for openQA License: GPL-2.0-or-later ++++++ openQA-worker-test.spec ++++++ --- /var/tmp/diff_new_pack.mJqDXt/_old 2025-09-22 19:29:23.378125214 +0200 +++ /var/tmp/diff_new_pack.mJqDXt/_new 2025-09-22 19:29:23.382125382 +0200 @@ -18,7 +18,7 @@ %define short_name openQA-worker Name: %{short_name}-test -Version: 5.1758307053.75367131 +Version: 5.1758551670.e3aa50f9 Release: 0 Summary: Test package for %{short_name} License: GPL-2.0-or-later ++++++ openQA.spec ++++++ --- /var/tmp/diff_new_pack.mJqDXt/_old 2025-09-22 19:29:23.410126562 +0200 +++ /var/tmp/diff_new_pack.mJqDXt/_new 2025-09-22 19:29:23.410126562 +0200 @@ -99,7 +99,7 @@ %define devel_requires %devel_no_selenium_requires chromedriver Name: openQA -Version: 5.1758307053.75367131 +Version: 5.1758551670.e3aa50f9 Release: 0 Summary: The openQA web-frontend, scheduler and tools License: GPL-2.0-or-later ++++++ openQA-5.1758307053.75367131.obscpio -> openQA-5.1758551670.e3aa50f9.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1758307053.75367131/.gitignore new/openQA-5.1758551670.e3aa50f9/.gitignore --- old/openQA-5.1758307053.75367131/.gitignore 2025-09-19 20:37:33.000000000 +0200 +++ new/openQA-5.1758551670.e3aa50f9/.gitignore 2025-09-22 16:34:30.000000000 +0200 @@ -1,4 +1,3 @@ -logs/*.tar.* etc/mine/ # Devel::Cover /cover_db* @@ -6,51 +5,31 @@ /test-results/ # CircleCI cache /logs/ -temp -/testresults -/t/data/openqa/webui/cache -/t/data/openqa/db/db.lock -/t/data/openqa/testresults -/t/data/openqa/share/tests -/t/data/7da661d0c3faf37d49d33b6fc308f2.png -/factory -/public/packed/ -/public/sass/bootstrap.scss -testrun-cron -testrun-manual -archive -backlog -video +# Editor files *.swp -.sass-cache/ -www/htdocs/includes/knownissues.html *~ -mojoResults.png -openqa.log -t/data/openqa/factory/hdd/00099963-hdd_image2.qcow2 -t/data/openqa/factory/hdd/hdd_image.qcow2 -t/diagram-v*.png +# docs +docs/build/ +docs/vendor/ +**/openqa-in-5-minutes.gif +**/openqa-in-5-minutes.webm +# Development +.sass-cache/ +.tidyall.d/ assets/cache/ assets/assetpack.db +docker.env +node_modules nytprof/ +/public/packed/ +/public/sass/bootstrap.scss +# Tests .prove -t/cache.d/ -t/data/openqa/pool/ -t/data/openqa/share/factory/hdd/00099963-hdd_image2.qcow2 -t/data/openqa/share/factory/hdd/hdd_image.qcow2 +/t/cache.d/ +/t/data/openqa/webui/cache +/t/data/openqa/db/db.lock +/t/data/openqa/testresults +/t/data/openqa/share/tests/opensuse/needles t/data/openqa/share/factory/iso/Core-7.2.iso -t/data/openqa/share/factory/iso/test2.iso -t/data/openqa/share/factory/iso/test3.iso t/log_chromedriver -docker.env container/webui/workdir -base_state.json -job.json -node_modules -.tidyall.d/ -openqa-documentation.html -docs/build/ -docs/vendor/ -# docs -**/openqa-in-5-minutes.gif -**/openqa-in-5-minutes.webm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1758307053.75367131/Makefile new/openQA-5.1758551670.e3aa50f9/Makefile --- old/openQA-5.1758307053.75367131/Makefile 2025-09-19 20:37:33.000000000 +0200 +++ new/openQA-5.1758551670.e3aa50f9/Makefile 2025-09-22 16:34:30.000000000 +0200 @@ -92,13 +92,16 @@ clean: -rm -r build -.PHONY: install-generic -install-generic: +.PHONY: generate-assets +generate-assets: ./tools/generate-packed-assets for i in lib public script templates assets; do \ mkdir -p "$(DESTDIR)"/usr/share/openqa/$$i ;\ cp -a $$i/* "$(DESTDIR)"/usr/share/openqa/$$i ;\ done + +.PHONY: install-generic +install-generic: generate-assets for f in $(shell perl -Ilib -mOpenQA::Assets -e OpenQA::Assets::list); do \ install -m 644 -D --target-directory="$(DESTDIR)/usr/share/openqa/$${f%/*}" "$$f";\ done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1758307053.75367131/container/webui/Dockerfile new/openQA-5.1758551670.e3aa50f9/container/webui/Dockerfile --- old/openQA-5.1758307053.75367131/container/webui/Dockerfile 2025-09-19 20:37:33.000000000 +0200 +++ new/openQA-5.1758551670.e3aa50f9/container/webui/Dockerfile 2025-09-22 16:34:30.000000000 +0200 @@ -23,12 +23,8 @@ zypper in -y ca-certificates-mozilla curl openQA-local-db apache2 apache2-utils hostname which w3m 'rubygem(sass)>=3.7.4' && \ zypper clean && \ gensslcert && \ - a2enmod headers && \ - a2enmod proxy && \ - a2enmod proxy_http && \ - a2enmod proxy_wstunnel && \ + /usr/share/openqa/script/configure-web-proxy && \ a2enmod ssl && \ - a2enmod rewrite && \ a2enflag SSL COPY openqa-ssl.conf openqa.conf /etc/apache2/vhosts.d/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1758307053.75367131/lib/OpenQA/WebAPI/Controller/File.pm new/openQA-5.1758551670.e3aa50f9/lib/OpenQA/WebAPI/Controller/File.pm --- old/openQA-5.1758307053.75367131/lib/OpenQA/WebAPI/Controller/File.pm 2025-09-19 20:37:33.000000000 +0200 +++ new/openQA-5.1758551670.e3aa50f9/lib/OpenQA/WebAPI/Controller/File.pm 2025-09-22 16:34:30.000000000 +0200 @@ -64,7 +64,7 @@ push @{$self->static->paths}, $needledir; # name is an URL parameter and can't contain slashes, so it should be safe - return $self->_serve_static($name . $format); + return $self->_serve_static($name . $format, 1); } sub _needle_by_id_and_extension ($self, $extension) { @@ -101,6 +101,11 @@ return $self->_serve_static($self->param('filename')); } +sub test_image ($self) { + return $self->reply->not_found unless $self->_set_test; + return $self->_serve_static($self->param('filename'), 1); +} + sub download_asset ($self) { # we handle this in apache, but need it in tests for asset cache # so minimal security is good enough @@ -138,11 +143,16 @@ if ($path =~ /\/\.\./ || $path =~ /\.\.\//); # map to URL - mojo will canonicalize - $path = $self->url_for('download_asset', assetpath => $path); - $self->app->log->debug("redirect to $path"); + my $url = $self->url_for('download_asset', assetpath => $path); + + # redirect to file domain if configured + my $file_domain = $self->app->config->{global}->{file_domain}; + $url->host($file_domain) if ($file_domain); + + $self->app->log->debug("redirect to $url"); # pass the redirect to the reverse proxy - might come back to use # in case there is no proxy (e.g. in tests) - return $self->redirect_to($path); + return $self->redirect_to($url); } sub _set_headers ($self, $path) { @@ -182,7 +192,7 @@ return 1; } -sub _serve_static ($self, $asset) { +sub _serve_static ($self, $asset, $noredirect = 0) { my $static = $self->static; my $log = $self->log; @@ -191,8 +201,10 @@ return $self->reply->not_found unless $asset; $log->debug('found ' . pp($asset)); - my $is_text = blessed $asset && $asset->isa('Mojo::Asset::File') && $self->_set_headers($asset->path); - return 1 if $self->_redirect_if_configured($is_text); + unless ($noredirect) { + my $is_text = blessed $asset && $asset->isa('Mojo::Asset::File') && $self->_set_headers($asset->path); + return 1 if $self->_redirect_if_configured($is_text); + } $static->serve_asset($self, $asset); return !!$self->rendered; @@ -203,7 +215,7 @@ return $self->reply->not_found unless $self->_set_test; my $asset = $self->static->file('.thumbs/' . $self->param('filename')); - return $self->_serve_static($asset); + return $self->_serve_static($asset, 1); } # this is the agnostic route to images - usually served by apache directly @@ -212,7 +224,7 @@ # name is an URL parameter and can't contain slashes, so it should be safe my $dir = $self->param('md5_dirname') || ($self->param('md5_1') . '/' . $self->param('md5_2')); - return $self->_serve_static("$dir/.thumbs/" . $self->param('md5_basename')); + return $self->_serve_static("$dir/.thumbs/" . $self->param('md5_basename'), 1); } 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1758307053.75367131/lib/OpenQA/WebAPI.pm new/openQA-5.1758551670.e3aa50f9/lib/OpenQA/WebAPI.pm --- old/openQA-5.1758307053.75367131/lib/OpenQA/WebAPI.pm 2025-09-19 20:37:33.000000000 +0200 +++ new/openQA-5.1758551670.e3aa50f9/lib/OpenQA/WebAPI.pm 2025-09-22 16:34:30.000000000 +0200 @@ -162,7 +162,7 @@ $test_r->get('/edit')->name('edit_test')->to('running#edit'); $test_r->get('/badge')->name('test_result_badge')->to('test#badge'); - $test_r->get('/images/#filename')->name('test_img')->to('file#test_file'); + $test_r->get('/images/#filename')->name('test_img')->to('file#test_image'); $test_r->get('/images/thumb/#filename')->name('test_thumbnail')->to('file#test_thumbnail'); $test_r->get('/file/#filename')->name('test_file')->to('file#test_file'); $test_r->get('/settings/:dir/*link_path')->name('filesrc')->to('test#show_filesrc'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openQA-5.1758307053.75367131/t/ui/07-file.t new/openQA-5.1758551670.e3aa50f9/t/ui/07-file.t --- old/openQA-5.1758307053.75367131/t/ui/07-file.t 2025-09-19 20:37:33.000000000 +0200 +++ new/openQA-5.1758551670.e3aa50f9/t/ui/07-file.t 2025-09-22 16:34:30.000000000 +0200 @@ -147,6 +147,16 @@ $config->{file_domain} = 'openqa-files'; $t->get_ok('/assets/repo/testrepo/README.html')->status_is(302); $t->header_like(Location => qr|^http://openqa-files(:\d+)?/assets/repo/testrepo/README.html$|); + + $t->get_ok('/tests/99961/asset/repo/testrepo/README')->status_is(302); + $t->header_like(Location => qr|^//openqa-files(:\d+)?/assets/repo/testrepo/README$|); + + # no redirect for images and thumbs + $t->get_ok('/tests/99938/images/logpackages-1.png')->status_is(200)->content_type_is('image/png') + ->header_is('Content-Length' => '48019'); + $t->get_ok('/tests/99938/images/thumb/logpackages-1.png')->status_is(200)->content_type_is('image/png') + ->header_is('Content-Length' => '6769'); + $t->get_ok('/image/347/da6/.thumbs/61d0c3faf37d49d33b6fc308f2.png')->status_is(200)->content_type_is('image/png'); }; done_testing(); ++++++ openQA.obsinfo ++++++ --- /var/tmp/diff_new_pack.mJqDXt/_old 2025-09-22 19:29:41.042869119 +0200 +++ /var/tmp/diff_new_pack.mJqDXt/_new 2025-09-22 19:29:41.046869287 +0200 @@ -1,5 +1,5 @@ name: openQA -version: 5.1758307053.75367131 -mtime: 1758307053 -commit: 75367131d478f753cd146b6896a6344256e81f59 +version: 5.1758551670.e3aa50f9 +mtime: 1758551670 +commit: e3aa50f91baae0e6206d129dec44dd12cc012b0b
