-
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
Support kRequired
/ kManagerDriven
access modes
#99
Merged
feltech
merged 1 commit into
OpenAssetIO:main
from
feltech:work/OpenAssetIO-1209-policyAccessModes
Feb 9, 2024
Merged
Support kRequired
/ kManagerDriven
access modes
#99
feltech
merged 1 commit into
OpenAssetIO:main
from
feltech:work/OpenAssetIO-1209-policyAccessModes
Feb 9, 2024
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
Closes OpenAssetIO#98. OpenAssetIO/OpenAssetIO#1209 added the `kRequired` and `kManagerDriven` access mode options for `managementPolicy` queries, i.e. the subset of required traits for publishing to succeed, and the subset of traits that the manager wants to dictate during publishing, respectively. For consistency, the `kWrite` access mode of `resolve` was renamed to `kManagerDriven`. So add support for these access modes in an extensible way, by making use of the `kAccessNames` string mapping to allow the JSON database to specialise on any access mode to `managementPolicy` in a consistent way. Also add support for `resolve` to take any access mode, with a new JSON field `supported_access_modes`, which is an iterable of supported modes (i.e. `kRead` and/or `kManagerDriven`), and which defaults to only `kRead`. This means we can have a JSON database entry for a "write only" entity, i.e. a "working reference" returned from a `preflight` API call, which should only be `resolve`d with `kManagerDriven` access mode. This then supports writing the example workflow in OpenAssetIO/OpenAssetIO-MediaCreation#75. Currently, `preflight` simply returns the input reference as the "working reference". Ultimately, we will want the ability to customise that. Interestingly, `register` _can_ return a different reference, in that it has the version identifier suffix appended (e.g. `?v=2`). This means for the purposes of exemplification in OpenAssetIO/OpenAssetIO-MediaCreation#75, we have everything we need. Signed-off-by: David Feltell <[email protected]>
feltech
added a commit
to feltech/OpenAssetIO
that referenced
this pull request
Jan 31, 2024
Part of OpenAssetIO#1209. Disable BAL integration tests until OpenAssetIO/OpenAssetIO-Manager-BAL#99 is merged, which supports breaking changes (in particular, the rename of `ResolveAccess.kWrite` to `kManagerDriven`) Signed-off-by: David Feltell <[email protected]>
feltech
added a commit
to feltech/OpenAssetIO
that referenced
this pull request
Jan 31, 2024
Part of OpenAssetIO#1255. Re-enable BAL integration tests now that OpenAssetIO/OpenAssetIO-Manager-BAL#99 has been merged with support for the latest API changes.
This was referenced Jan 31, 2024
elliotcmorris
approved these changes
Feb 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
feltech
added a commit
to feltech/OpenAssetIO
that referenced
this pull request
Feb 7, 2024
Part of OpenAssetIO#1209. Disable BAL integration tests until OpenAssetIO/OpenAssetIO-Manager-BAL#99 is merged, which supports breaking changes (in particular, the rename of `ResolveAccess.kWrite` to `kManagerDriven`) Signed-off-by: David Feltell <[email protected]>
02da248
to
fbfe512
Compare
feltech
added a commit
to feltech/OpenAssetIO
that referenced
this pull request
Feb 9, 2024
Part of OpenAssetIO#1255. Re-enable BAL integration tests now that OpenAssetIO/OpenAssetIO-Manager-BAL#99 has been merged with support for the latest API changes.
feltech
added a commit
to feltech/OpenAssetIO
that referenced
this pull request
Feb 9, 2024
Part of OpenAssetIO#1255. Re-enable BAL integration tests now that OpenAssetIO/OpenAssetIO-Manager-BAL#99 has been merged with support for the latest API changes. Signed-off-by: David Feltell <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #98.
OpenAssetIO/OpenAssetIO#1209 added the
kRequired
andkManagerDriven
access mode options formanagementPolicy
queries, i.e. the subset of required traits for publishing to succeed, and the subset of traits that the manager wants to dictate during publishing, respectively.For consistency, the
kWrite
access mode ofresolve
was renamed tokManagerDriven
.So add support for these access modes in an extensible way, by making use of the
kAccessNames
string mapping to allow the JSON database to specialise on any access mode tomanagementPolicy
in a consistent way.Also add support for
resolve
to take any access mode, with a new JSON fieldsupported_access_modes
, which is an iterable of supported modes (i.e.kRead
and/orkManagerDriven
), and which defaults to onlykRead
.This means we can have a JSON database entry for a "write only" entity, i.e. a "working reference" returned from a
preflight
API call, which should only beresolve
d withkManagerDriven
access mode. This then supports writing the example workflow in OpenAssetIO/OpenAssetIO-MediaCreation#75.Currently,
preflight
simply returns the input reference as the "working reference". Ultimately, we will want the ability to customise that.Interestingly,
register
can return a different reference, in that it has the version identifier suffix appended (e.g.?v=2
). This means for the purposes of exemplification in OpenAssetIO/OpenAssetIO-MediaCreation#75, we have everything we need.