From de306d59bb7e0c86ec9efb4110e88fd33ee41236 Mon Sep 17 00:00:00 2001 From: PJ Doerner Date: Thu, 14 Nov 2024 22:36:15 -0800 Subject: [PATCH 1/6] Add Nexus-Operation-Id and Nexus-Link headers to callback definition --- SPEC.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SPEC.md b/SPEC.md index 9487554..ffea41a 100644 --- a/SPEC.md +++ b/SPEC.md @@ -103,7 +103,7 @@ timeout for a single HTTP request. Format of this header value is number + unit, milliseconds, `s` for seconds, and `m` for minutes. The `Nexus-Link` header field can be added to associate resources with the start request. A handler may attach these -links as metadata to underlying resources to provide end-to-end observabililty. See the [`Nexus-Link`](#nexus-link) +links as metadata to underlying resources to provide end-to-end observability. See the [`Nexus-Link`](#nexus-link) section for more information. #### Request Body @@ -307,6 +307,8 @@ For invoking a callback URL: - Include any callback headers supplied in the originating StartOperation request, stripping away the `Nexus-Callback-` prefix. - Include the `Nexus-Operation-State` header. +- Include the `Nexus-Operation-Id` header and any `Nexus-Link` headers for resources associated with this operation to + support completing asynchronous operations before the response to StartOperation is received. - If state is `succeeded`, deliver non-empty results in the body with corresponding `Content-*` headers. - If state is `failed` or `canceled`, content type should be `application/json` and the body must have a serialized [`Failure`](#failure) object. From 72fd4485fe24dbe7c9a72684e27ee828a4272442 Mon Sep 17 00:00:00 2001 From: PJ Doerner Date: Fri, 15 Nov 2024 11:17:09 -0800 Subject: [PATCH 2/6] Add Nexus-Operation-Start-Time header --- SPEC.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SPEC.md b/SPEC.md index ffea41a..eb58e70 100644 --- a/SPEC.md +++ b/SPEC.md @@ -306,9 +306,12 @@ For invoking a callback URL: - Issue a POST request to the caller-provided URL. - Include any callback headers supplied in the originating StartOperation request, stripping away the `Nexus-Callback-` prefix. +- Include the `Nexus-Operation-Id` header, `Nexus-Operation-Start-Time` and any `Nexus-Link` headers for resources + associated with this operation to support completing asynchronous operations before the response to StartOperation is + received. +- Format for `Nexus-Operation-Start-Time` is number + unit, where unit can be `ms` for milliseconds, `s` for seconds, + and `m` for minutes. If it is omitted, operation start time will be the time the completion is received. - Include the `Nexus-Operation-State` header. -- Include the `Nexus-Operation-Id` header and any `Nexus-Link` headers for resources associated with this operation to - support completing asynchronous operations before the response to StartOperation is received. - If state is `succeeded`, deliver non-empty results in the body with corresponding `Content-*` headers. - If state is `failed` or `canceled`, content type should be `application/json` and the body must have a serialized [`Failure`](#failure) object. From a6c61d8610f314f10b2dc92317c1eea84d767b1a Mon Sep 17 00:00:00 2001 From: PJ Doerner Date: Fri, 15 Nov 2024 11:32:38 -0800 Subject: [PATCH 3/6] remove formatting --- SPEC.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SPEC.md b/SPEC.md index eb58e70..0833004 100644 --- a/SPEC.md +++ b/SPEC.md @@ -308,9 +308,7 @@ For invoking a callback URL: prefix. - Include the `Nexus-Operation-Id` header, `Nexus-Operation-Start-Time` and any `Nexus-Link` headers for resources associated with this operation to support completing asynchronous operations before the response to StartOperation is - received. -- Format for `Nexus-Operation-Start-Time` is number + unit, where unit can be `ms` for milliseconds, `s` for seconds, - and `m` for minutes. If it is omitted, operation start time will be the time the completion is received. + received. If `Nexus-Operation-Start-Time` is omitted, the time the completion is received will be used. - Include the `Nexus-Operation-State` header. - If state is `succeeded`, deliver non-empty results in the body with corresponding `Content-*` headers. - If state is `failed` or `canceled`, content type should be `application/json` and the body must have a serialized From da7f7c27ad8fe91b7b7ff624af53c91c6ed9abe2 Mon Sep 17 00:00:00 2001 From: PJ Doerner Date: Fri, 15 Nov 2024 11:37:35 -0800 Subject: [PATCH 4/6] format --- SPEC.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPEC.md b/SPEC.md index 0833004..f777bba 100644 --- a/SPEC.md +++ b/SPEC.md @@ -308,7 +308,8 @@ For invoking a callback URL: prefix. - Include the `Nexus-Operation-Id` header, `Nexus-Operation-Start-Time` and any `Nexus-Link` headers for resources associated with this operation to support completing asynchronous operations before the response to StartOperation is - received. If `Nexus-Operation-Start-Time` is omitted, the time the completion is received will be used. + received. `Nexus-Operation-Start-Time` should be in RFC1123 format. If is omitted, the time the completion is + received will be used as operation start time. - Include the `Nexus-Operation-State` header. - If state is `succeeded`, deliver non-empty results in the body with corresponding `Content-*` headers. - If state is `failed` or `canceled`, content type should be `application/json` and the body must have a serialized From 705296b8eec58e4da2bc2e26ad2a904f1ce707de Mon Sep 17 00:00:00 2001 From: PJ Doerner Date: Fri, 15 Nov 2024 12:06:19 -0800 Subject: [PATCH 5/6] format --- SPEC.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPEC.md b/SPEC.md index f777bba..2ab3479 100644 --- a/SPEC.md +++ b/SPEC.md @@ -308,7 +308,7 @@ For invoking a callback URL: prefix. - Include the `Nexus-Operation-Id` header, `Nexus-Operation-Start-Time` and any `Nexus-Link` headers for resources associated with this operation to support completing asynchronous operations before the response to StartOperation is - received. `Nexus-Operation-Start-Time` should be in RFC1123 format. If is omitted, the time the completion is + received. `Nexus-Operation-Start-Time` should be in a valid HTTP/1.1 format. If is omitted, the time the completion is received will be used as operation start time. - Include the `Nexus-Operation-State` header. - If state is `succeeded`, deliver non-empty results in the body with corresponding `Content-*` headers. From 263385d2fddbad8f18ab9ae95bc5c6d89830f7e3 Mon Sep 17 00:00:00 2001 From: PJ Doerner Date: Tue, 19 Nov 2024 09:53:48 -0800 Subject: [PATCH 6/6] link to format --- SPEC.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPEC.md b/SPEC.md index 2ab3479..f38db28 100644 --- a/SPEC.md +++ b/SPEC.md @@ -308,8 +308,8 @@ For invoking a callback URL: prefix. - Include the `Nexus-Operation-Id` header, `Nexus-Operation-Start-Time` and any `Nexus-Link` headers for resources associated with this operation to support completing asynchronous operations before the response to StartOperation is - received. `Nexus-Operation-Start-Time` should be in a valid HTTP/1.1 format. If is omitted, the time the completion is - received will be used as operation start time. + received. `Nexus-Operation-Start-Time` should be in a valid HTTP format described [here](https://www.rfc-editor.org/rfc/rfc5322.html#section-3.3). + If is omitted, the time the completion is received will be used as operation start time. - Include the `Nexus-Operation-State` header. - If state is `succeeded`, deliver non-empty results in the body with corresponding `Content-*` headers. - If state is `failed` or `canceled`, content type should be `application/json` and the body must have a serialized