Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package MirrorCache for openSUSE:Factory checked in at 2024-03-15 20:30:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/MirrorCache (Old) and /work/SRC/openSUSE:Factory/.MirrorCache.new.1905 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "MirrorCache" Fri Mar 15 20:30:26 2024 rev:39 rq:1158050 version:1.073 Changes: -------- --- /work/SRC/openSUSE:Factory/MirrorCache/MirrorCache.changes 2024-03-07 18:32:21.671533652 +0100 +++ /work/SRC/openSUSE:Factory/.MirrorCache.new.1905/MirrorCache.changes 2024-03-15 20:30:49.271065030 +0100 @@ -1,0 +2,11 @@ +Thu Mar 07 15:21:08 UTC 2024 - Andrii Nikitin <andrii.niki...@suse.com> + +- Update to version 1.073: + * Track mirror propagation using time of job + * Add project propagation details /app/server_rollout/:version + * Do not show projects with negative priority + * Show only relevant mirrors in /report/mirrors/:proj + * fix .mirrorlist doesnt always work for repomd.xml + * ui: add prio column to /app/project + +------------------------------------------------------------------- Old: ---- MirrorCache-1.072.obscpio New: ---- MirrorCache-1.073.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ MirrorCache.spec ++++++ --- /var/tmp/diff_new_pack.DDtlMp/_old 2024-03-15 20:30:50.335104221 +0100 +++ /var/tmp/diff_new_pack.DDtlMp/_new 2024-03-15 20:30:50.339104368 +0100 @@ -22,7 +22,7 @@ %define main_requires %{assetpack_requires} perl(Carp) perl(DBD::Pg) >= 3.7.4 perl(DBI) >= 1.632 perl(DBIx::Class) >= 0.082801 perl(DBIx::Class::DynamicDefault) perl(DateTime) perl(Encode) perl(Time::Piece) perl(Time::Seconds) perl(Time::ParseDate) perl(DateTime::Format::Pg) perl(Exporter) perl(File::Basename) perl(LWP::UserAgent) perl(Mojo::Base) perl(Mojo::ByteStream) perl(Mojo::IOLoop) perl(Mojo::JSON) perl(Mojo::Pg) perl(Mojo::URL) perl(Mojo::Util) perl(Mojolicious::Commands) perl(Mojolicious::Plugin) perl(Mojolicious::Plugin::RenderFile) perl(Mojolicious::Static) perl(Net::OpenID::Consumer) perl(POSIX) perl(Sort::Versions) perl(URI::Escape) perl(XML::Writer) perl(base) perl(constant) perl(diagnostics) perl(strict) perl(warnings) shadow rubygem(sass) perl(Net::DNS) perl(LWP::Protocol::https) perl(Digest::SHA) perl(Config::IniFiles) %define build_requires %{assetpack_requires} rubygem(sass) tidy sysuser-shadow sysuser-tools Name: MirrorCache -Version: 1.072 +Version: 1.073 Release: 0 Summary: WebApp to redirect and manage mirrors License: GPL-2.0-or-later ++++++ MirrorCache-1.072.obscpio -> MirrorCache-1.073.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/assets/javascripts/admintable.js new/MirrorCache-1.073/assets/javascripts/admintable.js --- old/MirrorCache-1.072/assets/javascripts/admintable.js 2024-02-29 12:18:29.000000000 +0100 +++ new/MirrorCache-1.073/assets/javascripts/admintable.js 2024-03-07 16:16:38.000000000 +0100 @@ -395,6 +395,10 @@ var columnDefs = []; var url = $("#admintable_api_url").val() + window.location.search; + if (url == '/rest/rollout_server' && (typeof version !== 'undefined') ) { + url = url + '/' + version; + } + var thElements = $('.admintable thead th').each(function() { var th = $(this); @@ -414,7 +418,7 @@ type: 'empty-string-last', }; if (th.hasClass('col_value')) { - if (columnName == 'hostname') { + if (columnName == 'hostname' || columnName == 'mirror') { columnDef.render = renderAdminTableHostname; } else if (columnName == 'name' && url && url.startsWith('/rest/project')) { columnDef.render = renderAdminTableProjectName; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/assets/javascripts/project.js new/MirrorCache-1.073/assets/javascripts/project.js --- old/MirrorCache-1.072/assets/javascripts/project.js 2024-02-29 12:18:29.000000000 +0100 +++ new/MirrorCache-1.073/assets/javascripts/project.js 2024-03-07 16:16:38.000000000 +0100 @@ -5,7 +5,16 @@ url: '/rest/project/propagation/' + id, }, deferRender: true, - columns: [{data: 'dt'}, {data: 'prefix'}, {data: 'version'}, {data: 'mirrors'}], + columns: [{data: 'dt'}, {data: 'prefix'}, { + data: 'version', + render: function(data, type, row) { + if (type !== 'display') { + return data ? data : ''; + } + return data? '<a href="/app/rollout_server/'+ data +'">' + htmlEscape(data) + '</>' : ''; + } + }, {data: 'mirrors'}], order: [[0, 'desc']], }); } + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/lib/MirrorCache/Datamodule.pm new/MirrorCache-1.073/lib/MirrorCache/Datamodule.pm --- old/MirrorCache-1.072/lib/MirrorCache/Datamodule.pm 2024-02-29 12:18:29.000000000 +0100 +++ new/MirrorCache-1.073/lib/MirrorCache/Datamodule.pm 2024-03-07 16:16:38.000000000 +0100 @@ -614,6 +614,7 @@ $self->agent; # parse headers if ( ( $self->accept_all || !$self->extra ) + && $self->_original_path eq $path && $path =~ m/\/(repodata\/repomd\.xml[^\/]*|media\.1\/(media|products)|content|.*\.sha\d\d\d(\.asc)?|Release(\.key|\.gpg)?|InRelease|Packages(\.gz|\.zst)?|Sources(\.gz|\.zst)?|.*_Arch\.(files|db|key)(\.(sig|tar\.gz(\.sig)?|tar\.zst(\.sig)?))?|(files|primary|other)\.xml\.(gz|zck|zst)|[Pp]ackages(\.[A-Z][A-Z])?\.(xz|gz|zst)|gpg-pubkey.*\.asc|CHECKSUMS(\.asc)?)$/ ) { $self->must_render_from_root(1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/lib/MirrorCache/Schema/Result/Project.pm new/MirrorCache-1.073/lib/MirrorCache/Schema/Result/Project.pm --- old/MirrorCache-1.072/lib/MirrorCache/Schema/Result/Project.pm 2024-02-29 12:18:29.000000000 +0100 +++ new/MirrorCache-1.073/lib/MirrorCache/Schema/Result/Project.pm 2024-03-07 16:16:38.000000000 +0100 @@ -29,6 +29,7 @@ data_type => 'timestamp', is_nullable => 1 }, + prio => { data_type => "integer", is_nullable => 1 }, db_sync_every => { data_type => 'integer', is_nullable => 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/lib/MirrorCache/Schema/ResultSet/Rollout.pm new/MirrorCache-1.073/lib/MirrorCache/Schema/ResultSet/Rollout.pm --- old/MirrorCache-1.072/lib/MirrorCache/Schema/ResultSet/Rollout.pm 2024-02-29 12:18:29.000000000 +0100 +++ new/MirrorCache-1.073/lib/MirrorCache/Schema/ResultSet/Rollout.pm 2024-03-07 16:16:38.000000000 +0100 @@ -79,18 +79,19 @@ } sub add_rollout_server { - my ($self, $rollout_id, $server_id) = @_; + my ($self, $rollout_id, $server_id, $dt) = @_; my $dbh = $self->result_source->schema->storage->dbh; - my $sql = 'insert into rollout_server(rollout_id, server_id, dt) select ?, ?, now()'; + my $sql = 'insert into rollout_server(rollout_id, server_id, dt, scan_dt) select ?, ?, to_timestamp(?), now()'; if ($dbh->{Driver}->{Name} eq 'Pg') { $sql = $sql . ' on conflict do nothing'; } else { + $sql =~ s/to_timestamp/from_unixtime/g; $sql = $sql . ' on duplicate key update server_id = server_id'; } - $dbh->prepare($sql)->execute($rollout_id, $server_id); + $dbh->prepare($sql)->execute($rollout_id, $server_id, $dt); return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/lib/MirrorCache/Task/MirrorScan.pm new/MirrorCache-1.073/lib/MirrorCache/Task/MirrorScan.pm --- old/MirrorCache-1.072/lib/MirrorCache/Task/MirrorScan.pm 2024-02-29 12:18:29.000000000 +0100 +++ new/MirrorCache-1.073/lib/MirrorCache/Task/MirrorScan.pm 2024-03-07 16:16:38.000000000 +0100 @@ -112,10 +112,12 @@ my $count = 0; my $perfect_count = 0; my $proj = $schema->resultset('Rollout')->rollout_file_for_folder($path); - my $proj_rollout_filename = ''; - $proj_rollout_filename = $proj->{filename} if $proj; - $job->note(rollout_filename => $proj_rollout_filename) if $proj_rollout_filename; - $job->note(rollout_id => ($proj->{rollout_id} // 'undef')) if $proj_rollout_filename; + my ($proj_rollout_filename, $rollout_server_dt) = ('', undef); + if ($proj) { + $proj_rollout_filename = $proj->{filename}; + $rollout_server_dt = time; + $job->note(rollout_filename => $proj_rollout_filename, rollout_id => ($proj->{rollout_id} // 'undef'), dt => $rollout_server_dt); + } for my $folder_on_mirror (@$folder_on_mirrors) { my $server_id = $folder_on_mirror->{server_id}; my $url = $folder_on_mirror->{url} . '/'; @@ -161,7 +163,7 @@ my $rollout_res = 0; my $rollout_err; eval { - $rollout_res = $schema->resultset('Rollout')->add_rollout_server($proj->{rollout_id}, $server_id); + $rollout_res = $schema->resultset('Rollout')->add_rollout_server($proj->{rollout_id}, $server_id, $rollout_server_dt); } or $rollout_err = $@ // 'no error'; print STDERR "Rollout error: $rollout_err\n\n" if $rollout_err; $job->note(rollout_err => $rollout_err, at => datetime_now()) if $rollout_err; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/lib/MirrorCache/WebAPI/Controller/App/RolloutServer.pm new/MirrorCache-1.073/lib/MirrorCache/WebAPI/Controller/App/RolloutServer.pm --- old/MirrorCache-1.072/lib/MirrorCache/WebAPI/Controller/App/RolloutServer.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/MirrorCache-1.073/lib/MirrorCache/WebAPI/Controller/App/RolloutServer.pm 2024-03-07 16:16:38.000000000 +0100 @@ -0,0 +1,28 @@ +# Copyright (C) 2024 SUSE LLC +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, see <http://www.gnu.org/licenses/>. + +package MirrorCache::WebAPI::Controller::App::RolloutServer; +use Mojo::Base 'MirrorCache::WebAPI::Controller::App::Table'; + +sub index { + my $c = shift; + my $version = $c->param('version'); + return $c->render(code => 400, text => "Mandatory argument is missing") unless $version; + + $c->stash( version => $version ); + $c->SUPER::admintable('rollout_server'); +} + +1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/lib/MirrorCache/WebAPI/Controller/Rest/RolloutServer.pm new/MirrorCache-1.073/lib/MirrorCache/WebAPI/Controller/Rest/RolloutServer.pm --- old/MirrorCache-1.072/lib/MirrorCache/WebAPI/Controller/Rest/RolloutServer.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/MirrorCache-1.073/lib/MirrorCache/WebAPI/Controller/Rest/RolloutServer.pm 2024-03-07 16:16:38.000000000 +0100 @@ -0,0 +1,43 @@ +# Copyright (C) 2024 SUSE LLC +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, see <http://www.gnu.org/licenses/>. + +package MirrorCache::WebAPI::Controller::Rest::RolloutServer; +use Mojo::Base 'Mojolicious::Controller'; +use Data::Dumper; + +sub list { + my ($self) = @_; + + my $version = $self->param("version"); + + return $self->render(code => 400, text => "Mandatory argument is missing") unless $version; + + my $sql = <<'END_SQL'; +select rollout_id, name as project, version, scan_dt as time, server_id, hostname as mirror +from +rollout +join rollout_server on rollout_id = rollout.id +join project on project_id = project.id +left join server on server_id = server.id +where version = ? +order by scan_dt desc +END_SQL + + my $res = $self->schema->storage->dbh->selectall_arrayref($sql, {Columns => {}}, $version); + + return $self->render(json => { data => $res }); +} + +1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/lib/MirrorCache/WebAPI/Controller/Rest/Table.pm new/MirrorCache-1.073/lib/MirrorCache/WebAPI/Controller/Rest/Table.pm --- old/MirrorCache-1.072/lib/MirrorCache/WebAPI/Controller/Rest/Table.pm 2024-02-29 12:18:29.000000000 +0100 +++ new/MirrorCache-1.073/lib/MirrorCache/WebAPI/Controller/Rest/Table.pm 2024-03-07 16:16:38.000000000 +0100 @@ -40,7 +40,7 @@ }, Project => { keys => [['id'], ['name'],], - cols => ['id', 'name', 'path'], + cols => ['id', 'name', 'path', 'prio'], }, ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/lib/MirrorCache/WebAPI/Plugin/Project.pm new/MirrorCache-1.073/lib/MirrorCache/WebAPI/Plugin/Project.pm --- old/MirrorCache-1.072/lib/MirrorCache/WebAPI/Plugin/Project.pm 2024-02-29 12:18:29.000000000 +0100 +++ new/MirrorCache-1.073/lib/MirrorCache/WebAPI/Plugin/Project.pm 2024-03-07 16:16:38.000000000 +0100 @@ -56,7 +56,7 @@ my @rows = $c->schema->resultset('Project')->search(undef, { order_by => { -desc => [qw/prio name/] } }); # we want to cache it, so move to simpler structure for my $r (@rows) { - my %proj = ( id => $r->id, name => $r->name, path => $r->path, redirect => $r->redirect ); + my %proj = ( id => $r->id, name => $r->name, path => $r->path, redirect => $r->redirect, prio => $r->prio ); push @projects, \%proj; } $wasdberror = 0; @@ -139,7 +139,7 @@ my $alias = $projects_alias{$name}; my $path = $projects_path{$name}; - my %prj = ( id => $p->{id}, name => $name, alias => $alias, path => $path ); + my %prj = ( id => $p->{id}, name => $name, alias => $alias, path => $path, prio => $p->{prio} ); push @res, \%prj; } return \@res; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/lib/MirrorCache/WebAPI.pm new/MirrorCache-1.073/lib/MirrorCache/WebAPI.pm --- old/MirrorCache-1.072/lib/MirrorCache/WebAPI.pm 2024-02-29 12:18:29.000000000 +0100 +++ new/MirrorCache-1.073/lib/MirrorCache/WebAPI.pm 2024-03-07 16:16:38.000000000 +0100 @@ -184,6 +184,7 @@ $rest_r->get('/project/:name/mirror_summary')->to('project#mirror_summary'); $rest_r->get('/project/:name/mirror_list')->to('project#mirror_list'); $rest_r->get('/project/propagation/:project_id')->to('project_propagation#list'); + $rest_r->get('/rollout_server/:version')->to('rollout_server#list'); my $rest_operator_auth; $rest_operator_auth = $rest->under('/')->to('session#ensure_operator'); @@ -237,6 +238,7 @@ $app_r->get('/folder/<id:num>')->name('folder_show')->to('folder#show'); $app_r->get('/project')->name('project')->to('project#index'); $app_r->get('/project/#id')->name('project_show')->to('project#show'); + $app_r->get('/rollout_server/:version')->to('rollout_server#index'); my $admin = $r->any('/admin'); my $admin_auth = $admin->under('/')->to('session#ensure_admin')->name('ensure_admin'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/lib/MirrorCache/resources/migrations/Pg.sql new/MirrorCache-1.073/lib/MirrorCache/resources/migrations/Pg.sql --- old/MirrorCache-1.072/lib/MirrorCache/resources/migrations/Pg.sql 2024-02-29 12:18:29.000000000 +0100 +++ new/MirrorCache-1.073/lib/MirrorCache/resources/migrations/Pg.sql 2024-03-07 16:16:38.000000000 +0100 @@ -407,4 +407,6 @@ dt timestamp, primary key(rollout_id, server_id) ); - +-- 34 up +alter table rollout_server add column if not exists scan_dt timestamp; +create index if not exists rollout_version_inx on rollout(version); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/lib/MirrorCache/resources/migrations/mysql.sql new/MirrorCache-1.073/lib/MirrorCache/resources/migrations/mysql.sql --- old/MirrorCache-1.072/lib/MirrorCache/resources/migrations/mysql.sql 2024-02-29 12:18:29.000000000 +0100 +++ new/MirrorCache-1.073/lib/MirrorCache/resources/migrations/mysql.sql 2024-03-07 16:16:38.000000000 +0100 @@ -419,3 +419,6 @@ add constraint `fk_rollout_server_server` FOREIGN KEY(server_id) references server(id) on delete cascade, add constraint `fk_rollout_server_rollout` FOREIGN KEY(rollout_id) references rollout(id) on delete cascade; +-- 34 up +alter table rollout_server add column if not exists scan_dt timestamp; +create index if not exists i_rollout_version on rollout(version); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/t/environ/03-headquarter-subsidiaries-remote.sh new/MirrorCache-1.073/t/environ/03-headquarter-subsidiaries-remote.sh --- old/MirrorCache-1.072/t/environ/03-headquarter-subsidiaries-remote.sh 2024-02-29 12:18:29.000000000 +0100 +++ new/MirrorCache-1.073/t/environ/03-headquarter-subsidiaries-remote.sh 2024-03-07 16:16:38.000000000 +0100 @@ -62,13 +62,17 @@ hq_interface=127.0.0.10 eu_interface=127.0.0.3 -# repodata/repomd.xml is served from root even when asked from EU +echo repodata/repomd.xml is served from root even when asked from EU curl -si --interface $eu_interface http://$hq_address/download/folder1/repodata/repomd.xml | grep -A20 '200 OK' | grep repomdcontent -# repodata/repomd.xml is served even when DB is down +echo repodata/repomd.xml shows mirrorlist +curl -si --interface $eu_interface http://$hq_address/download/folder1/repodata/repomd.xml.mirrorlist | grep -F '<!DOCTYPE html>' +curl -si --interface $eu_interface -H 'Accept: */*' http://$hq_address/download/folder1/repodata/repomd.xml.mirrorlist | grep -F '<!DOCTYPE html>' +curl -si --interface $eu_interface -H 'Accept: */*, application/xml' http://$hq_address/download/folder1/repodata/repomd.xml.mirrorlist | grep -F '<!DOCTYPE html>' + +echo repodata/repomd.xml is served even when DB is down $mc9/db/stop curl -si --interface $eu_interface http://$hq_address/download/folder1/repodata/repomd.xml | grep -A20 '200 OK' | grep repomdcontent - curl -si --interface $eu_interface http://$hq_address/geoip | grep -A 50 '200 OK' | grep "<host>euaddress.net</host>" curl -si http://$hq_address/geoip | grep -A 50 '200 OK' | grep "<host>naaddress.com</host>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/t/environ/14-project-report.sh new/MirrorCache-1.073/t/environ/14-project-report.sh --- old/MirrorCache-1.072/t/environ/14-project-report.sh 2024-02-29 12:18:29.000000000 +0100 +++ new/MirrorCache-1.073/t/environ/14-project-report.sh 2024-03-07 16:16:38.000000000 +0100 @@ -91,4 +91,19 @@ $mc/curl /report/mirrors | grep 'generated at' +# update priority to negative and make sure it is not in the report any longer +$mc/sql "update project set prio = -1 where name like '2.0%'"; +$mc/stop +$mc/start + +echo check 2.0 is no longer in the report +rc=0 +$mc/curl /report/mirrors | grep -F '2.0' || rc=$? +test $rc -gt 0 + +echo check 2.0 link has no cn server, because it has nothing from 2.0 +rc=0 +$mc/curl /report/mirrors/proj1 | grep -F "$($ap5/print_address)" || rc=$? +test $rc -gt 0 + echo success diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/t/environ/14-project-rollout-repo.sh new/MirrorCache-1.073/t/environ/14-project-rollout-repo.sh --- old/MirrorCache-1.072/t/environ/14-project-rollout-repo.sh 2024-02-29 12:18:29.000000000 +0100 +++ new/MirrorCache-1.073/t/environ/14-project-rollout-repo.sh 2024-03-07 16:16:38.000000000 +0100 @@ -10,8 +10,9 @@ for x in $mc $ap5 $ap4; do mkdir -p $x/dt/project1/repodata - mkdir -p $x/dt/project2/repodata touch $x/dt/project1/repodata/0001-primary.xml.gz + mkdir -p $x/dt/project2/repodata + sleep 1 touch $x/dt/project2/repodata/0001-primary.xml.gz done @@ -41,4 +42,8 @@ $mc/sql_test 2 == 'select count(*) from rollout' $mc/sql_test 100 -lt 'select version from rollout where project_id = 2' +ver="$($mc/sql 'select version from rollout where project_id = 2')" + +$mc/curl /rest/rollout_server/$(echo -n $ver) + echo success diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/templates/app/project/index.html.ep new/MirrorCache-1.073/templates/app/project/index.html.ep --- old/MirrorCache-1.072/templates/app/project/index.html.ep 2024-02-29 12:18:29.000000000 +0100 +++ new/MirrorCache-1.073/templates/app/project/index.html.ep 2024-03-07 16:16:38.000000000 +0100 @@ -17,6 +17,7 @@ <th class="col_value">Id</th> <th class="col_value">Name</th> <th class="col_value">Path</th> + <th class="col_value">Prio</th> <th class="col_action">Actions</th> </tr> </thead> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/templates/app/rollout_server/index.html.ep new/MirrorCache-1.073/templates/app/rollout_server/index.html.ep --- old/MirrorCache-1.072/templates/app/rollout_server/index.html.ep 1970-01-01 01:00:00.000000000 +0100 +++ new/MirrorCache-1.073/templates/app/rollout_server/index.html.ep 2024-03-07 16:16:38.000000000 +0100 @@ -0,0 +1,30 @@ +% layout 'bootstrap'; +% title 'Mirror propagation for ' . $version; + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <style type='text/css'> +table { width:100%%; } +.name { text-align:left; } + </style> +% content_for 'ready_function' => begin + version = "<%= $version %>"; + setupAdminTable(0); +% end +<div class="row"> +<div class="col-sm-12"> + <h3>Propagation on Mirrors</h3> + <table id="rollout_server" class="admintable table table-striped"> + <thead> + <tr> + <th class="col_value">Time</th> + <th class="col_value">Mirror</th> + <th class="col_value">Project</th> + <th class="col_value">Version</th> + </tr> + </thead> + <tbody> + </tbody> + </table> + <input type="hidden" id="admintable_api_url" value="/rest/rollout_server"/> +</div> + +</div> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.072/templates/report/mirrors/index.html.ep new/MirrorCache-1.073/templates/report/mirrors/index.html.ep --- old/MirrorCache-1.072/templates/report/mirrors/index.html.ep 2024-02-29 12:18:29.000000000 +0100 +++ new/MirrorCache-1.073/templates/report/mirrors/index.html.ep 2024-03-07 16:16:38.000000000 +0100 @@ -4,11 +4,13 @@ % # Build Title % my $first_old = ''; % my $first; +% my $single_project_report = 1; % for my $project (@$projects) { % my $name = $project->{name}; % ($first) = split ' ', $name, 2; % if ($first_old && $first_old ne $first) { % $first = ''; +% $single_project_report = 0; % last; % } % $first_old = $first; @@ -34,6 +36,7 @@ % $extra_title = "Leap $first" if 0 == rindex $first, "15.", 0; % $extra_title = "Build Service" if $first eq 'repositories'; % $extra_title = "Tumbleweed" if $first eq 'TW'; +% $extra_title = "Slowroll" if $first eq 'SR'; % my %extra_menu_item = ( title => $extra_title, href => "/report/mirrors?project=$first" ); % push @extra_menu, \%extra_menu_item unless $first_old; @@ -160,10 +163,13 @@ % $first = ''; % for my $project (@$projects) { % my $name = $project->{name}; + % my $prio = $project->{prio}; + % next if $prio && !$single_project_report && $prio < 0; % ($first) = split ' ', $name, 2; % $first = "Leap $first" if 0 == rindex $first, "15.", 0; % $first = "Build Service" if $first eq 'repositories'; % $first = "Tumbleweed" if $first eq 'TW'; + % $first = "Slowroll" if $first eq 'SR'; % if ($first_old ne $first) { % if ($first_old) { </th> @@ -178,6 +184,25 @@ <tbody> % my $prev_region = ''; % for my $m (@$mirrors) { + % if ($single_project_report) { + % # skip mirror unless it has anything to show + % my $nothingtoshow = 1; + % for my $project (@$projects) { + % my $name = $project->{name}; + % my $prio = $project->{prio}; + % next if $prio && !$single_project_report && $prio < 0; + % my $alias = $project->{alias}; + % my $column1 = $alias . "score"; + % my $column2 = $alias . "victim"; + % my ($first, $second) = split ' ', $name; + % my $x = $m->{$column1}; + % if (defined $x) { + % $nothingtoshow = 0; + % last; + % } + % } + % next if $nothingtoshow; + % } % my $region = $m->{region}; % if ($region ne $prev_region) { % my $region_name = region_name($region); @@ -217,6 +242,8 @@ <td> % for my $project (@$projects) { % my $name = $project->{name}; + % my $prio = $project->{prio}; + % next if $prio && !$single_project_report && $prio < 0; % my $alias = $project->{alias}; % my $path = $project->{path}; % my $column1 = $alias . "score"; ++++++ MirrorCache.obsinfo ++++++ --- /var/tmp/diff_new_pack.DDtlMp/_old 2024-03-15 20:30:50.835122638 +0100 +++ /var/tmp/diff_new_pack.DDtlMp/_new 2024-03-15 20:30:50.843122933 +0100 @@ -1,5 +1,5 @@ name: MirrorCache -version: 1.072 -mtime: 1709205509 -commit: b6d60796835350d09623f609678a55f949beb22f +version: 1.073 +mtime: 1709824598 +commit: c8fa8924ad9491ffb16a5c9f988b96a6965bd855