-
Notifications
You must be signed in to change notification settings - Fork 6
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
process update endpoints and schema (relates to #107) #447
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ed process + start test definitions
github-actions
bot
added
ci/doc
Issue related to documentation of the package
ci/operations
Related to CI operations (actions, execution, install, builds, etc.)
ci/tests
Tests of the package and features
feature/cli
Issues or features related to CLI operations.
feature/db
Related to database or datatype manipulation.
feature/job
Issues related to job execution, reporting and logging.
feature/oas
Issues related to OpenAPI specifications.
feature/opensearch
Issue related to OpenSearch functionalities.
process/wps3
Issue related to WPS 3.x (REST-JSON) processes support
labels
Jul 5, 2022
…ithin I/O definitions
…NotRequired TypedDict
2 tasks
fmigneault
force-pushed
the
process-update
branch
from
July 7, 2022 23:03
6168d3d
to
d322937
Compare
fmigneault
force-pushed
the
process-update
branch
from
July 7, 2022 23:23
5fb05c0
to
92ea57b
Compare
Codecov Report
@@ Coverage Diff @@
## master #447 +/- ##
==========================================
+ Coverage 81.64% 81.75% +0.11%
==========================================
Files 75 75
Lines 14668 15210 +542
Branches 3188 3313 +125
==========================================
+ Hits 11975 12435 +460
- Misses 1975 2032 +57
- Partials 718 743 +25
Continue to review full report at Codecov.
|
fmigneault
force-pushed
the
process-update
branch
from
July 11, 2022 23:48
42e1a7a
to
d5bfaae
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ci/doc
Issue related to documentation of the package
ci/operations
Related to CI operations (actions, execution, install, builds, etc.)
ci/tests
Tests of the package and features
feature/cli
Issues or features related to CLI operations.
feature/db
Related to database or datatype manipulation.
feature/job
Issues related to job execution, reporting and logging.
feature/oas
Issues related to OpenAPI specifications.
feature/opensearch
Issue related to OpenSearch functionalities.
process/wps3
Issue related to WPS 3.x (REST-JSON) processes support
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description & Solution Reasoning
Provide support of revisions to existing processes with metadata updates or application redefinition.
When a new revision is created, a "duplicate"
processID
is generated. The duplicates are distinguished amongst each other using the combination of{processID}:{version}
values.Because
processes
collection has a unique rule onidentifier
in the DB, and for backward compatibility because some processes did not make use ofversion
(and it still is optional), the "latest" revision is stored asidentifier = processID
while older ones are stored asidentifier = processID:version
. This respects the uniqueness while having "duplicate" process definitions. The only momentversion
becomes required is when revisions are involved, which is a required or auto-resolved field for PUT/PATCH requests (with specific version validation checks). The "previous latest" is updated in the DB by adding the version part to itsidentifier
field, and the "new latest" revision can then be stored directly asidentifier = processID
. Using this approach, fetching the latest or an older revision is also natural from the API, as IDs are directly formatted appropriately. Jobs also make use of thisprocessID:version
format to properly refer to the right process that was executed.The only adjustment that was required to retrieve a process was if the latest one was explicitly requested with
processID:version
. The fetch method of the storage therefore searches with bothidentifier = processID:version
andidentifier = processID && version = version
combinations.Changes:
Process
revisions (resolves Process UUID, updating and versioning #107).PATCH /processes/{processID}
request, allowingMINOR
andPATCH
level modifications that can be appliedto an existing
Process
in order to revise non-execution critical information such as its documented description.PUT /processes/{processID}
request, allowingMAJOR
revision to essentially redeploy a newProcess
,but leaving some form of relationship with the older version by reusing the same
Process
ID.{processID}:{version}
representation in request path andJob
processID
to reference thespecific
Process
revisions when fetchProcess
description andJob
status.version
andrevisions
to fetch a specificProcess
revision, or all versions history.links
referring toProcess
revisions whenever applicable.Fixes:
Fix invalid
minimum
andmaximum
OpenAPI fields that were defined asminLength
andmaxLength
(duplicates definitions) for
Process
description and deployment schema validation.Resolves DAC-199
Resolves DAC-200
To Do
=> when PUT, always use the "latest" (drop
:{version}
part) since deployed from scratch instead of update anyway?when listing revisions history, provide the diffs between them (usegenerate_diff
function with generated process descriptions)moved to provide the diffs between revisions when listing their history #448
propagate PATCH request updates to corresponding package metadata as specified from process metadata(eg:
description
-> CWLdoc
)moved to propagate PATCH request updates to corresponding package metadata as specified from process parameters #449
title
,description
,keywords
,metadata
of any input/output