Skip to content
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

Error if kCreateRelated access used #57

Closed
foundrytom opened this issue Aug 3, 2023 · 0 comments · Fixed by #66
Closed

Error if kCreateRelated access used #57

foundrytom opened this issue Aug 3, 2023 · 0 comments · Fixed by #66
Assignees

Comments

@foundrytom
Copy link
Contributor

foundrytom commented Aug 3, 2023

What

OpenAssetIO/OpenAssetIO#1016 refined the Context access patterns to formalize the creation of "children" and other related entities via publish to an existing reference. Bal does not yet support this kind of creation, and so should error in the case

Why

[I think] we currently would just overwrite the target reference with a a new version, which is not the correct behaviour.

ACs

  • When preflight or register, getWithRelationship* is called with the kCreateRelated access, then a suitable error callback is made
@foundrytom foundrytom changed the title Error in kCreateRelated Error if kCreateRelated access used Aug 3, 2023
@feltech feltech assigned feltech and unassigned feltech Aug 10, 2023
@feltech feltech self-assigned this Aug 17, 2023
feltech added a commit to feltech/OpenAssetIO that referenced this issue Aug 21, 2023
Detected whilst working on OpenAssetIO/OpenAssetIO-Manager-BAL#57.

If the manager is strict about which access modes it supports, then
leaving it as the default `kUnknown` is likely to fail for many
functions.

Signed-off-by: David Feltell <david.feltell@foundry.com>
feltech added a commit to feltech/OpenAssetIO-Manager-BAL that referenced this issue Aug 21, 2023
Closes OpenAssetIO#57. OpenAssetIO/OpenAssetIO#1016 refined the Context access
patterns to formalize the creation of "children" and other related
entities via publish to an existing reference. BAL does not yet support
this kind of creation, and so should error in the case.

So respond appropriately to Access mode in various API functions,
by calling the provided error callback, except in the case of
`managementPolicy` which responds with empty `TraitsData` objects
(signifying "unmanaged").

Note that for consistency, this changes the error message output when
attempting to `resolve` with `kWrite` access.

Signed-off-by: David Feltell <david.feltell@foundry.com>
feltech added a commit to feltech/OpenAssetIO-Manager-BAL that referenced this issue Aug 21, 2023
Closes OpenAssetIO#57. OpenAssetIO/OpenAssetIO#1016 refined the Context access
patterns to formalize the creation of "children" and other related
entities via publish to an existing reference. BAL does not yet support
this kind of creation, and so should error in the case.

So respond appropriately to Access mode in various API functions,
by calling the provided error callback, except in the case of
`managementPolicy` which responds with empty `TraitsData` objects
(signifying "unmanaged").

Note that for consistency, this changes the error message output when
attempting to `resolve` with `kWrite` access.

Signed-off-by: David Feltell <david.feltell@foundry.com>
feltech added a commit to feltech/OpenAssetIO-Manager-BAL that referenced this issue Aug 21, 2023
Closes OpenAssetIO#57. OpenAssetIO/OpenAssetIO#1016 refined the Context access
patterns to formalize the creation of "children" and other related
entities via publish to an existing reference. BAL does not yet support
this kind of creation, and so should error in the case.

So respond appropriately to Access mode in various API functions,
by calling the provided error callback, except in the case of
`managementPolicy` which responds with empty `TraitsData` objects
(signifying "unmanaged").

Note that for consistency, this changes the error message output when
attempting to `resolve` with `kWrite` access.

Signed-off-by: David Feltell <david.feltell@foundry.com>
feltech added a commit to feltech/OpenAssetIO-Manager-BAL that referenced this issue Aug 23, 2023
Closes OpenAssetIO#57. OpenAssetIO/OpenAssetIO#1016 refined the Context access
patterns to formalize the creation of "children" and other related
entities via publish to an existing reference. BAL does not yet support
this kind of creation, and so should error in the case.

So respond appropriately to Access mode in various API functions,
by calling the provided error callback, except in the case of
`managementPolicy` which responds with empty `TraitsData` objects
(signifying "unmanaged").

Note that for consistency, this changes the error message output when
attempting to `resolve` with `kWrite` access.

Signed-off-by: David Feltell <david.feltell@foundry.com>
feltech added a commit to feltech/OpenAssetIO that referenced this issue Aug 23, 2023
Detected whilst working on OpenAssetIO/OpenAssetIO-Manager-BAL#57.

If the manager is strict about which access modes it supports, then
leaving it as the default `kUnknown` is likely to fail for many
functions.

Signed-off-by: David Feltell <david.feltell@foundry.com>
feltech added a commit to feltech/OpenAssetIO that referenced this issue Aug 23, 2023
OpenAssetIO/OpenAssetIO-Manager-BAL#57 is required to pass these tests.
Once that is merged we can revert this commit in a separate PR.

Signed-off-by: David Feltell <david.feltell@foundry.com>
feltech added a commit to feltech/OpenAssetIO-Manager-BAL that referenced this issue Aug 23, 2023
Closes OpenAssetIO#57. OpenAssetIO/OpenAssetIO#1016 refined the Context access
patterns to formalize the creation of "children" and other related
entities via publish to an existing reference. BAL does not yet support
this kind of creation, and so should error in the case.

So respond appropriately to Access mode in various API functions,
by calling the provided error callback, except in the case of
`managementPolicy` which responds with empty `TraitsData` objects
(signifying "unmanaged").

Note that for consistency, this changes the error message output when
attempting to `resolve` with `kWrite` access.

Signed-off-by: David Feltell <david.feltell@foundry.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants