-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Part 2 with the consistent use of process "definition" and process "description" #282
Comments
@pvretano At the moment, the OGC API Application Package is only one potential language/format for the process definition (OGC Application Package is a separate conformance class). If we keep it that way, neither of those options (calling it I feel that the definition and description are different enough that they should be separate resources, especially given the amount of confusion that mixing those up generate. I would prefer GET |
@jerstlouis application pkg as defined in PART 2 is NOT MANDATORY. If it suited to your purpose it is recommended. Other language/formats are possible and if another one emerges (e.g. CWL or MOAW) we can add that as another recommendation. |
@pvretano Yes exactly, that's what I meant. |
I am not able to follow the Processes discussion that is happening, but I saw the issue and think it is strange to POST a representation of a resource of type A (process definition) and when you GET the resource that has been created you get a representation of a different resource type B (process description). This doesn't sounds like HTTP to me. I am probably missing the necessary context, so feel free to ignore... |
I'm fine with any of:
I will redirect all of these to whichever gets decided. It is important to ensure |
@cportele |
Of those @fmigneault is happy with, I only like GET I agree with @cportele about the mismatched GET (description) vs. POST/PUT (definition), but I am not sure how we could solve this. |
I still argue that the description explaining how a process should be invoked is very different from instructions defining the process :) |
Lets step back for a minute. In my mind the there is no difference between a process description and a process definition! They are simply two different representations of the same resource ... the process. One happens to include more information than the other. So, POST'ing to /processes/{processId} to add a new process seems consistent to me. Its just that a process description does not contain enough information for the server to deploy a working process. Also, I am starting to wonder whether we actually need a new endpoint from which we get the process definition. If we agree that a process description and a process definition are simply two different representations of the same resource than content negotiation should be sufficient to get one or the other. From my server you can do a |
I disagree, in my mind there is a fundamental difference, just like a C function prototype vs. a C function body. |
But a C prototype and a C function represent the same thing ... the function ... and, again, one includes more information about the function that the other. |
One other point ... since the very beginning of deploying processes to an OAProc deployment the process definition has been referred to as an "application package" and so I think we need to respect that terminology. So the endpoint name for getting the definition ... if in fact it needs to be a separate endpoint ... should have a name related to that legacy. So, |
@pvretano Wasn't that specifically in the context of the OGC Application Package though (which is the only example I am aware of implemented with process deployment so far)? |
True... (That is one way of seeing it) But for example, I may want to retrieve:
Each of these would need its own media type if it is a single resource. |
I don't see a problem here especially if it means the interface less cluttered. Some of these, I believe, already have media types defined (CWL application/cwl+json, OpenAPI application/openapi+json). I don't really see deploying a processes with a CWL execution unit and then asking the server to return that with a MOAW execution unit so as long the application package itself has a place to identify the type of execution unit (which it does) we only need one media type for an application packages ... perhaps parameterized to return the prototype, the body or both. There is a media type defined in Part 2 As for MOAW and OpenEO DAG, those should probably have media types defined ... no? |
@pvretano As you say the apppkg media type could still only support returning the original or native flavor of the execution unit, while you could use the execution unit media types to return only that part directly in different flavors. Or the ogcappkg media type could also potentially have a parameter defined for the execution unit format, e.g.
Agreed :) The MOAW media type could also be the same as for a generic execution request (those POSTed to |
@jerstlouis The form of the media type is open for discussion but do you really expect someone to deploy a process using a CWL execution unit and then asking the server to return "application/moaw+json"? If not then saying |
Yeah, I suppose that if the execution unit of a process is a scripted workflow then a server being able to translate from one to the other might be possible. If, however, the execution unit was a Docker container with a binary executable then that type of translation would be really, really hard if not impossible. Generally, however, I think that a process would be deployed with an execution unit of one type and that would be the type you get when you request the body or execution unit of the process. I would consider translating from one execution unit type to another as being an edge case and something that we could not necessarily document in the standard. I keep pushing the use of the OPTIONS method without success but |
I also think process description and process definition are different entities. The first is like metadata about the process while the second details how to run it. But, even though they represent different portion of the process as a whole, they both don't make any sense if separated in the context of a deployed process. The distinction becomes clearer IMO because there are multiple ways to represent the definition, but the process description should always be the same schema, just like those 2 components are properly represented under 2 separate fields @jerstlouis I don't want a major 2.0 just for moving stuff around in a deploy payload. We can work with I like the idea of returning different representations of
That would be nice. Definitely the cleanest approach. |
I think you misunderstood what I meant by that, but I stand corrected because Peter clarified that the EO Application Package Best Practice actually does NOT use the OGC Application Package -- I thought it did. Rather it is an example of POSTing CWL directly as the Content-Type, if I understand correctly.
I never suggested otherwise :)
OGC API - Processes - Part 2 1.0 has not even been published yet...
I don't feel strongly about this (so it's fine with me if that is the consensus), but it seems to me that the name is not intuitive to refer to the process definition. I am also already confused with what an "application package" is given that the EO Application Package Best Practice is directly CWL, whereas the OGC Application Package contains a process description + an execution which can be different things (CWL among those). As I mentioned previously, I would also recommend to define a new Application Package format ( NOTE: I am happy if we clarify that an "application package" is the same as the "process definition", and that "OGC JSON Application Package" ( It might make sense to also include the EO Application Package (or could that just be CWL Application Package?) and maybe this new OGC Zipped Application Package as other conformance classes of Part 2? |
You are not the only one 😅 Best Practices mixes things in its own documentation. https://docs.ogc.org/bp/20-089r1.html#toc16
i.e.: represented in the Even some sections somewhat contradicts themselves: https://docs.ogc.org/bp/20-089r1.html#toc17
So, deploy directly I think adding |
I really hate to do this, having argued previously for the name |
|
This is where things get confusing, because currently Part 2 describes an encoding and conformance class called the "OGC Application Package" (
Yes it makes sense to be able to infer the process description from the process definition execution unit (e.g. CWL).
Yes, I suggest a ZIP-based application package type, with one or more files with pre-determined names inside whose content follow a particular schema, like several archive-based package formats e.g. Would it make sense to refer to the 20-089r1 application packages simply as CWL process definition (or maybe CWL application package) and use the |
|
@pvretano @mr-c |
Identifiers for particular versions of the CWL standards have the form https://w3id.org/cwl/v1.2/ https://w3id.org/cwl/v1.2/cwl.ttl is an RDF description of CWL concepts There is also https://w3id.org/cwl/v1.2/cwl-context.json An OpenAPI YAML Schema doesn't make sense to me because CWL is a serialization format, not an API. Maybe @tetron or @stain have other thoughts on the topic? So I would recommend the use of If it would be a better fit, then we can ask for a CWL identifier in the IANA media types database (previously know as MIME types). |
There's a data definition part of openapi which I believe is quite similar to schema salad, it might be reasonable to translate the document schema of cwl to an open api object type definition. Then an open api library could perform at least partial validation of cwl objects. |
That would greatly help promote the use of CWL as a fully-defined OGC Application Package and would help validate schema received by the API. |
Good to know @fmigneault! I've created common-workflow-language/schema_salad#517 to track the OpenAPI for CWL idea. We can flesh out a design there |
@mr-c @fmigneault Would this OpenAPI idea have anything to do with providing an OpenAPI process description at |
@jerstlouis My understanding is that the request is for generating an OpenAPI schema for an inline CWL description itself, and not for generating an OpenAPI schema for the valid inputs for a particular CWL description (though that should be doable as a separate effort, I think) |
@mr-c @jerstlouis paths:
/processes:
post:
requestBody:
required: true
content:
application/cwl+json:
schema:
$ref: "https://www.commonwl.org/v1.2/schemas/cwl.yml"
application/moaw+json:
schema:
$ref: "path/to/moaw.yml"
application/ogcapppkg+json:
schema:
$ref: "https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/extensions/deploy_replace_undeploy/standard/openapi/schemas/ogcapppkg.yaml"
With ogcapppkg.yml updated with something like: type: object
required:
- executionUnit
properties:
processDescription:
$ref: https://raw.githubusercontent.com/opengeospatial/wps-rest-binding/master/core/openapi/schemas/process.yaml
executionUnit:
type: array
items:
oneOf:
- type: object
properties:
config: [...]
- schema:
$ref: "https://www.commonwl.org/v1.2/schemas/cwl.yml"
- type: object
additionalProperties: true |
@fmigneault Small fix: the |
As per opengeospatial#282 (comment), remove CommonWorkflowLanguage.yml
SWG meeting from 2024-04-15: The SWG decided to implement the |
Add /processes/{processId}/package path for accessing the formal description used to deploy a process Add specific recommendations and requirements for OGC Application Package and CWL conformance classes
Update part 2 to reflect that fact that you:
GET a process description from
/processes/{processId}' (same terminology is used in part 1) and you POST a process **definition** to
/processes` to deploy a process. In other words a process definition is an application package (i.e. description + execution unit + possibly other stuff).Also, a new endpoint
/processes/{processId}/package
for get the process definition OR we use the same endpoint (i.e./processes/{processId}
) and use content negotiation to get the description versus the definition. There is already a MIME type for an application package so that should be straight forward.The text was updated successfully, but these errors were encountered: