From patchwork Tue Feb 26 02:38:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Donnellan X-Patchwork-Id: 1048060 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 447jgQ4YGKz9s5c for ; Tue, 26 Feb 2019 13:38:58 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=au1.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 447jgQ3QhjzDqL7 for ; Tue, 26 Feb 2019 13:38:58 +1100 (AEDT) X-Original-To: snowpatch@lists.ozlabs.org Delivered-To: snowpatch@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=au1.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=andrew.donnellan@au1.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=au1.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 447jgL0ZfPzDqJV for ; Tue, 26 Feb 2019 13:38:52 +1100 (AEDT) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1Q2YEmC098273 for ; Mon, 25 Feb 2019 21:38:49 -0500 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0b-001b2d01.pphosted.com with ESMTP id 2qvt51wws5-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 25 Feb 2019 21:38:49 -0500 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 26 Feb 2019 02:38:48 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 26 Feb 2019 02:38:47 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1Q2ckjr56557642 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 26 Feb 2019 02:38:46 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3DD9DA404D for ; Tue, 26 Feb 2019 02:38:46 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E19EBA4040 for ; Tue, 26 Feb 2019 02:38:45 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP for ; Tue, 26 Feb 2019 02:38:45 +0000 (GMT) Received: from intelligence.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 64F50A0129 for ; Tue, 26 Feb 2019 13:38:44 +1100 (AEDT) From: Andrew Donnellan To: snowpatch@lists.ozlabs.org Date: Tue, 26 Feb 2019 13:38:38 +1100 X-Mailer: git-send-email 2.11.0 X-TM-AS-GCONF: 00 x-cbid: 19022602-4275-0000-0000-00000313ED30 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19022602-4276-0000-0000-000038222B03 Message-Id: <20190226023838.23818-1-andrew.donnellan@au1.ibm.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-02-26_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902260017 Subject: [snowpatch] [PATCH] patchwork: Increase number of items returned per page to 500 X-BeenThere: snowpatch@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Continuous Integration for patch-based workflows List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: snowpatch-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "snowpatch" This is needed at least while pagination is still broken to decrease the likelihood that we miss patches when large series are sent. One day we might be able to get rid of it, but in any case fetching 500 at a time is likely to be more efficient. Co-authored-by: Russell Currey [ajd: format as patch, add commit message] Signed-off-by: Andrew Donnellan --- Already applied, for information only --- src/patchwork.rs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/patchwork.rs b/src/patchwork.rs index 1c2d3821300b..8f01186084d5 100644 --- a/src/patchwork.rs +++ b/src/patchwork.rs @@ -39,7 +39,7 @@ use utils; // TODO: more constants. constants for format strings of URLs and such. pub static PATCHWORK_API: &'static str = "/api/1.0"; -pub static PATCHWORK_QUERY: &'static str = "?order=-id"; +pub static PATCHWORK_QUERY: &'static str = "?order=-id&count=500"; #[derive(Deserialize, Clone)] pub struct SubmitterSummary { @@ -243,7 +243,8 @@ impl PatchworkServer { format!( "Basic {}", base64::encode(&format!("{}:{}", username, password)) - ).parse() + ) + .parse() .unwrap(), ); } @@ -310,15 +311,15 @@ impl PatchworkServer { fn get_next_link(&self, _resp: &Response) -> Option { /* - let next = resp.headers().get(LINK)?; - for val in next.values() { - if let Some(rel) = val.rel() { - if rel.iter().any(|reltype| reltype == &RelationType::Next) { - return Some(val.link().to_string()); + let next = resp.headers().get(LINK)?; + for val in next.values() { + if let Some(rel) = val.rel() { + if rel.iter().any(|reltype| reltype == &RelationType::Next) { + return Some(val.link().to_string()); + } + } } - } - } -*/ + */ None }