Re: [iola-conversion-tool] Bug when Adding a document to the tracker

Ole Laursen <olau@iola.dk> Wed, 22 February 2012 20:53 UTC

Return-Path: <olau@iola.dk>
X-Original-To: iola-conversion-tool@ietfa.amsl.com
Delivered-To: iola-conversion-tool@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BE7AD21F864A for <iola-conversion-tool@ietfa.amsl.com>; Wed, 22 Feb 2012 12:53:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.155
X-Spam-Level:
X-Spam-Status: No, score=-2.155 tagged_above=-999 required=5 tests=[AWL=-0.378, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, J_CHICKENPOX_32=0.6, J_CHICKENPOX_35=0.6, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3RHY3C0JuM0f for <iola-conversion-tool@ietfa.amsl.com>; Wed, 22 Feb 2012 12:53:01 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by ietfa.amsl.com (Postfix) with ESMTP id 6E53521E800F for <iola-conversion-tool@ietf.org>; Wed, 22 Feb 2012 12:52:58 -0800 (PST)
Received: by vbbfr13 with SMTP id fr13so401072vbb.31 for <iola-conversion-tool@ietf.org>; Wed, 22 Feb 2012 12:52:57 -0800 (PST)
Received-SPF: pass (google.com: domain of olau@iola.dk designates 10.220.142.5 as permitted sender) client-ip=10.220.142.5;
Authentication-Results: mr.google.com; spf=pass (google.com: domain of olau@iola.dk designates 10.220.142.5 as permitted sender) smtp.mail=olau@iola.dk
Received: from mr.google.com ([10.220.142.5]) by 10.220.142.5 with SMTP id o5mr20026579vcu.68.1329943977384 (num_hops = 1); Wed, 22 Feb 2012 12:52:57 -0800 (PST)
Received: by 10.220.142.5 with SMTP id o5mr16212339vcu.68.1329943977211; Wed, 22 Feb 2012 12:52:57 -0800 (PST)
MIME-Version: 1.0
Received: by 10.52.96.130 with HTTP; Wed, 22 Feb 2012 12:52:37 -0800 (PST)
In-Reply-To: <4F453B60.6010406@nostrum.com>
References: <4F4415E7.9080608@nostrum.com> <CANb2OvKXRUarNY-Vp+CkA+7P5FZ1=_OfqyO67gOnKfx2bAARCQ@mail.gmail.com> <4F453B60.6010406@nostrum.com>
From: Ole Laursen <olau@iola.dk>
Date: Wed, 22 Feb 2012 21:52:37 +0100
Message-ID: <CANb2OvK6o0X58YmRM-JPMOA-L12ZqpCxu8jp+YDYTswvFeL0ag@mail.gmail.com>
To: Robert Sparks <rjsparks@nostrum.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Gm-Message-State: ALoCoQmiNIfRSrbh2YUgolN3j6kFOVTL2TAqlkNefqEhAjTvkHXLv0i5LTPc1tX3aJbDMNyjFwAT
Cc: iola-conversion-tool@ietf.org
Subject: Re: [iola-conversion-tool] Bug when Adding a document to the tracker
X-BeenThere: iola-conversion-tool@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Discussion of the IOLA / DB Schema Conversion Tool Project <iola-conversion-tool.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/iola-conversion-tool>, <mailto:iola-conversion-tool-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/iola-conversion-tool>
List-Post: <mailto:iola-conversion-tool@ietf.org>
List-Help: <mailto:iola-conversion-tool-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/iola-conversion-tool>, <mailto:iola-conversion-tool-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Feb 2012 20:53:03 -0000

2012/2/22 Robert Sparks <rjsparks@nostrum.com>om>:
> That's really surprising, and I want to double-check that we haven't
> accidentally lost something.

That's a good idea. I was going to say, "this is perhaps a surprise but".

> Your search was on the production code?

Yes.

> I'm seeing idinternal.area_acronym get used in trunk at
> idindex/views.py: def all_id2_entry(id):
>  ....
> ./idindex/views.py-    if id.idinternal:
> ./idindex/views.py-        try:
> ./idindex/views.py:            area = id.idinternal.area_acronym

This code isn't actually in use as far as I can see. Most of the code
in idindex is dead.

> and in the search form
> /idrfc/views_search.py:
> q_objs.append(Q(area_acronym=query['area']))

This is a bit tricky, because this part is actually going to query the
Rfc table (which is, by the way, not used much in the production
code). I was looking at the code for I-Ds which says:

    elif query['by'] == 'area':
        q_objs.append(Q(**{prefix+"group__ietfwg__areagroup__area":query['area']}))

> What are those replaced with in the new code?

For the query, basically: either doc.group is WG and doc.group.parent
is query area, or doc.group is individual submission and doc.ad area
is query area:

 docs = docs.filter(Q(group__type="wg", group__parent=query["area"]) |
                               Q(group__type="individ",
                                 ad__role__name="ad",
                                 ad__role__group=query["area"]))


Ole