From nobody Tue Apr 23 11:20:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1663578026; cv=none; d=zohomail.com; s=zohoarc; b=cIqZxEzAz9Wlc3EEDm1aRraJByjt1iCY/3SASnuoUA9CeIbNkmWKxZYt/sz/+vtjaw4ixlMZ1oMJoG4P/fsE9qtVLJ7tnI7uTMJHeCTpecrw9XCj+5uv6j2ZuNq4Q18+b7UAT50QBd5aVGGq83mUOZ0C2uHbjjhkMhmtXomtBMw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663578026; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=FHnZ8uQ2Q+Y7zXdAxM4SHO1pI4OXPvReYnhOFkZFJhk=; b=Qr61ZOD8FivD73MAD4j1PxDKrX05Sm/HdYkNYRCJJ1+CCiTMElyEoLJ60cN4aL4ofGRcaio3I1isTlQ71m+6DaWHBUYnxefZ7EmNbH4fD8OLvh3dpQkDFVRkcwUoij4mUyDahlIrmJDuupKdAy3AgOZ/2YswOffUBrdKwefhbpk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1663578026778413.67289569059824; Mon, 19 Sep 2022 02:00:26 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-500-Pj8OVMhWPpe6oF7R-WoNMg-1; Mon, 19 Sep 2022 05:00:24 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6D9BD185A794; Mon, 19 Sep 2022 09:00:23 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 664F717583; Mon, 19 Sep 2022 09:00:23 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 455F91946594; Mon, 19 Sep 2022 09:00:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6965D1946586 for ; Mon, 19 Sep 2022 09:00:22 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 4E86340C6EC4; Mon, 19 Sep 2022 09:00:22 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3BC3D40C6EC2 for ; Mon, 19 Sep 2022 09:00:22 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 20A9C101AA66 for ; Mon, 19 Sep 2022 09:00:22 +0000 (UTC) Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-612-Gmj3T0MXNxWJD_HKW6wohw-1; Mon, 19 Sep 2022 05:00:20 -0400 Received: by mail-wm1-f69.google.com with SMTP id r65-20020a1c4444000000b003b3309435a9so4367046wma.6 for ; Mon, 19 Sep 2022 02:00:19 -0700 (PDT) Received: from goa-sendmail ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id l7-20020adffe87000000b00228da396f9dsm12949612wrr.84.2022.09.19.02.00.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 02:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663578025; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=FHnZ8uQ2Q+Y7zXdAxM4SHO1pI4OXPvReYnhOFkZFJhk=; b=hiLRt+C/5JPP2am19jFRHY8AQP054zpJMNCsuCcfbsDKYe1cBqGmJgqnux44YnoPe8hEJK dW8700lpc0R5TrJIsFMnpHqPI9rGW/lIV/cOqk/K5lLrgtZ1GB1dWw75fEO3hm5q82Xmif HeikwclHXioRnYBTt9wJCHLEIABdvZQ= X-MC-Unique: Pj8OVMhWPpe6oF7R-WoNMg-1 X-Original-To: patchew-devel@listman.corp.redhat.com X-MC-Unique: Gmj3T0MXNxWJD_HKW6wohw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date; bh=FcIdvPGHjVwEgAnHIVeMo3A1M4lu8aULoEKwH73CRTc=; b=yIwncknfK10h+mWy9i54iB8trAeznLEVC9xhjw/P1UiZu60UllBxeIw/3PgLA/qIg4 zlUf2kpIkG4oybgc2U1si2JnjkFlpvoUUbjtWc053dDSi+RJQoPMQNjnvOAUQhrTYhE/ lJF97ZbebD+sN9VXhCuvm2tD0igKOTATu0L0FVnI89PCdGsjsbi+CzbngfgWTWNmxbBt rhbjGuEZoxBpRaditBLR2tM4QeoiSvYZoda2dSMLs6EtNOPZA8PvgT14g3Dq4wQyjj1y /6todFlyaC/SemN2m2m9lmrfAZTNi6M4Umzk/SdemVUmdKFtS5/pfaVjvebrU8UcnYz2 9W+g== X-Gm-Message-State: ACrzQf2uon+joX5hMSsHt0NttHwI49KNpGprnYpKE2VKlwb+one5Rxba 4UABkLVX89eq8IHYjQxRYSYNt7LvbXP3kbfupXN/emZHovcvFJtzLMWqz64Hk5ea1wuUp0XXKmu SB30sQuwpt65+Y3uiCYwibGSUWE6ge1YTgG5zbWvs8k19sUIPfnFHmo+rpds87DZWqCGl78JNSg == X-Received: by 2002:a05:6000:887:b0:21e:24a0:f302 with SMTP id ca7-20020a056000088700b0021e24a0f302mr9690016wrb.466.1663578018740; Mon, 19 Sep 2022 02:00:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7RGiMNXe25h4KHW+FQM3kqxffbUkKt4ufNT3vmm48GNLmOMKQp2ZpokBUAi69kivt14OErHQ== X-Received: by 2002:a05:6000:887:b0:21e:24a0:f302 with SMTP id ca7-20020a056000088700b0021e24a0f302mr9689988wrb.466.1663578018361; Mon, 19 Sep 2022 02:00:18 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Mon, 19 Sep 2022 11:00:17 +0200 Message-Id: <20220919090017.17466-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Subject: [Patchew-devel] [PATCH] git: shut down old applier API, at least for now X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchew-devel-bounces@redhat.com Sender: "Patchew-devel" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1663578027322100001 Content-Type: text/plain; charset="utf-8" Inefficiency in the applier-get queries is bringing down patchew completely. Since the appliers that are not running on next.patchew.org are still using the old API, shut them down by removing the endpoints. Signed-off-by: Paolo Bonzini --- mods/git.py | 80 ----------------------------------------------------- 1 file changed, 80 deletions(-) diff --git a/mods/git.py b/mods/git.py index 4273c48..5b3dddc 100644 --- a/mods/git.py +++ b/mods/git.py @@ -306,40 +306,6 @@ class GitModule(PatchewModule): return q =20 =20 -class ApplierGetView(APILoginRequiredView): - name =3D "applier-get" - allowed_groups =3D ["importers"] - - def handle(self, request, target_repo=3DNone): - m =3D _instance.pending_series(target_repo).first() - if not m: - return None - - response =3D prepare_series( - request, - m, - fields=3D["project", "message-id", "patches", "properties", "t= ags"], - ) - - po =3D m.project - config =3D _instance.get_project_config(po) - for k, v in config.items(): - response["git." + k] =3D v - base =3D _instance.get_base(m) - if base: - response["git.repo"] =3D base.data["repo"] - response["git.base"] =3D base.data["tag"] - response["project.git"] =3D po.git - response["mbox_uri"] =3D rest_framework.reverse.reverse( - "series-mbox", - kwargs=3D{"projects_pk": m.project_id, "message_id": m.message= _id}, - request=3Drequest, - ) - response["result_uri"] =3D reverse_detail(m.git_result, request) - response["git.push_options"] =3D m.git_result.data.get("git.push_o= ptions") - return response - - class UnappliedSeriesSerializer(SeriesSerializer): class Meta: model =3D Message @@ -373,49 +339,3 @@ class UnappliedSeriesView(generics.ListAPIView): def get_queryset(self): target_repo =3D self.request.query_params.get("target_repo") return _instance.pending_series(target_repo) - - -class ApplierReportView(APILoginRequiredView): - name =3D "applier-report" - allowed_groups =3D ["importers"] - - def handle( - self, - request, - project, - message_id, - tag, - url, - base, - repo, - failed, - log, - maintainers=3D[], - ): - p =3D Project.objects.get(name=3Dproject) - r =3D ( - Message.objects.series_heads() - .get(project=3Dp, message_id=3Dmessage_id) - .git_result - ) - r.log =3D log - r.message.maintainers =3D maintainers - r.message.save() - data =3D {} - if failed: - r.status =3D Result.FAILURE - else: - data["repo"] =3D repo - data["tag"] =3D "refs/tags/" + tag - if url: - data["url"] =3D url - elif tag: - config =3D _instance.get_project_config(p) - url_template =3D config.get("url_template") - if url_template: - data["url"] =3D url_template.replace("%t", tag) - if base: - data["base"] =3D base - r.status =3D Result.SUCCESS - r.data =3D data - r.save() --=20 2.37.2 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://listman.redhat.com/mailman/listinfo/patchew-devel