Re: [apps-discuss] JSON patch: "test" operation

"Paul C. Bryan" <paul.bryan@forgerock.com> Thu, 01 December 2011 17:55 UTC

Return-Path: <paul.bryan@forgerock.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 10CEE21F907F for <apps-discuss@ietfa.amsl.com>; Thu, 1 Dec 2011 09:55:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.598
X-Spam-Level:
X-Spam-Status: No, score=-6.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-4]
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 m1PHyGqRbOvH for <apps-discuss@ietfa.amsl.com>; Thu, 1 Dec 2011 09:55:49 -0800 (PST)
Received: from eu1sys200aog107.obsmtp.com (eu1sys200aog107.obsmtp.com [207.126.144.123]) by ietfa.amsl.com (Postfix) with SMTP id A19CB21F907D for <apps-discuss@ietf.org>; Thu, 1 Dec 2011 09:55:45 -0800 (PST)
Received: from mail-vw0-f45.google.com ([209.85.212.45]) (using TLSv1) by eu1sys200aob107.postini.com ([207.126.147.11]) with SMTP ID DSNKTte/jZVHar31Q++k9mcCyBCvxu7WXhUD@postini.com; Thu, 01 Dec 2011 17:55:48 UTC
Received: by mail-vw0-f45.google.com with SMTP id u11so1978920vbb.32 for <apps-discuss@ietf.org>; Thu, 01 Dec 2011 09:55:25 -0800 (PST)
Received: by 10.52.99.74 with SMTP id eo10mr7240871vdb.12.1322762125860; Thu, 01 Dec 2011 09:55:25 -0800 (PST)
Received: from [192.168.1.3] (S0106a021b762dbb3.vf.shawcable.net. [174.1.40.184]) by mx.google.com with ESMTPS id a2sm7588671vdj.3.2011.12.01.09.55.21 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 01 Dec 2011 09:55:22 -0800 (PST)
Message-ID: <1322762119.340.6.camel@neutron>
From: "Paul C. Bryan" <paul.bryan@forgerock.com>
To: IETF Apps Discuss <apps-discuss@ietf.org>
Date: Thu, 01 Dec 2011 09:55:19 -0800
In-Reply-To: <4ED77AB2.3000906@gmx.de>
References: <4ED64A26.5030003@gmx.de> <BC564D94-6D00-4D63-863A-8AAD00E57B3A@tzi.org> <4ED77513.3070506@gmx.de> <58C610C7-5F52-4C4F-9479-4B1DED192709@tzi.org> <4ED77AB2.3000906@gmx.de>
Content-Type: multipart/alternative; boundary="=-3qs2XRFSM2mFJmtilEEI"
X-Mailer: Evolution 3.0.3-2
Mime-Version: 1.0
Subject: Re: [apps-discuss] JSON patch: "test" operation
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 01 Dec 2011 17:55:51 -0000

I can project cases where multiple operations are performed, and you
can't determine the state until an operation is completed before being
in a position to test for the next operation. Forcing tests to be up
front will needlessly complicate diff implementations, will not reduce
any complexity on patch implementations, for no good reason as far as I
can tell

Paul 

On Thu, 2011-12-01 at 14:01 +0100, Julian Reschke wrote:

> On 2011-12-01 13:47, Carsten Bormann wrote:
> > On Dec 1, 2011, at 13:37, Julian Reschke wrote:
> >
> >> On 2011-12-01 13:26, Carsten Bormann wrote:
> >>> What happens when a test fails?
> >>> -- Keep or rewind the changes done so far?
> >>> 	(or do we stipulate "test" has to come before modifiers?)
> >>
> >> I think requiring them to come first makes a lot of sense.
> >
> > I think so, too.
> > (Still, something should be said about what is supposed to happen if they don't -- is that a MUST detect then?)
> 
> I would support that (MUST occur first).
> 
> > My comment ("what happens") can be generalized to the entire section 5 of draft-pbryan-json-patch-02.txt…  "Fails to complete" doesn't cut it, I think.
> >
> >>> -- What is the response code you want to see?
> >>
> >> 409 comes to mind.
> >
> > Sounds good.  I think that the media type spec should contain text suggesting a specific response code, to rein in the otherwise uncontrollable inventiveness of the implementers.  Could go in section 5, too.
> 
> Not sure. I think 
> <http://greenbytes.de/tech/webdav/rfc5789.html#rfc.section.2.2> is quite 
> clear on that.
> 
> Best regards, Julian
> _______________________________________________
> apps-discuss mailing list
> apps-discuss@ietf.org
> https://www.ietf.org/mailman/listinfo/apps-discuss