Mailinglist Archive: opensuse-buildservice (266 mails)

< Previous Next >
Re: [opensuse-buildservice] Remote OBS: build fails with 400 remote error: remote error Bad request
On Mon, Jan 28, 2013 at 11:34:24AM +0100, Michael Schroeder wrote:
It already splits the download into chunks of 50 packages, but there's
a request to get the state of the binaries done at the beginning
of the worker_getbinaries function that may result in a too bug
URL. There's an easy way to fix this: we can simply ask for all the
binaries if the list is too big (untested diff):

--- bs_srcserver.orig 2013-01-21 12:12:58.000000000 +0100
+++ bs_srcserver 2013-01-28 11:31:38.049503000 +0100
@@ -6718,7 +6718,10 @@
'uri' => "$remoteurl/build/$remoteprojid/$repoid/$arch/_repository",
'proxy' => $remoteproxy,
};
- my $binarylistcpio = BSWatcher::rpc($param, $BSXML::binarylist,
"view=names", map {"binary=$_"} @binaries);
+ my @binaryfilter = @binaries;
+ # don't filter if too many binaries are used
+ @binaryfilter = () if length(join(',binary=', @binaries)) > 1024;
+ my $binarylistcpio = BSWatcher::rpc($param, $BSXML::binarylist,
"view=names", map {"binary=$_"} @binaryfilter);
return undef if $BSStdServer::isajax && !$binarylistcpio;
$binarylist = {};
for my $b (@{$binarylistcpio->{'binary'} || []}) {

Does that fix your problem?

Darix just mentioned to me that we could also change the method
to a POST to fix it, which may be the cleaner fix.

Cheers,
Michael.

--
Michael Schroeder mls@xxxxxxx
SUSE LINUX Products GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >