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

Update to use MediaCreation and general tidy #30

Merged
merged 9 commits into from
Aug 23, 2023

Conversation

foundrytom
Copy link
Contributor

@foundrytom foundrytom commented Aug 16, 2023

Updates to use MediaCreation, along with general tidying to get this closer to a usable state.

This moves resolve back into resolve, as for the read case, we shouldn't need to bother the manager for the other entry points. As we have a separate write path, then we can do the trick of deferring till later there, without compromising the performance of the higher call-count read path.

I think we have write errors making sense now, but we should still look at ensuring critical errors in Resolve actually cause a real error. TF_FATAL_ERROR seems to be the way to go, but it rather aggressively SIGABRTs, unless otherwise handled. In Python we don't seem to be able to install a TfDiagnosticsMgr Delegate - resulting in forceful termination - which makes testing rather hard.

Copy link
Member

@feltech feltech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly just lots of Qs. Many of which I could answer myself if I dig a bit deeper, which I'm happy to do if needed.

src/resolver.cpp Outdated Show resolved Hide resolved
src/resolver.cpp Outdated Show resolved Hide resolved
src/resolver.cpp Show resolved Hide resolved
src/resolver.cpp Show resolved Hide resolved
src/resolver.cpp Show resolved Hide resolved
src/resolver.cpp Show resolved Hide resolved
src/resolver.cpp Show resolved Hide resolved
src/resolver.cpp Outdated Show resolved Hide resolved
src/resolver.cpp Show resolved Hide resolved
src/resolver.cpp Outdated Show resolved Hide resolved
@foundrytom foundrytom force-pushed the work/updates branch 5 times, most recently from 9b670db to b609db8 Compare August 16, 2023 16:41
@foundrytom foundrytom marked this pull request as draft August 17, 2023 07:23
@foundrytom foundrytom marked this pull request as ready for review August 17, 2023 07:54
Copy link
Contributor

@elliotcmorris elliotcmorris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of things in addition

tests/test_resolver.py Outdated Show resolved Hide resolved
src/resolver.cpp Outdated Show resolved Hide resolved
src/resolver.cpp Outdated Show resolved Hide resolved
@foundrytom
Copy link
Contributor Author

Added a pre-emptive commit to drop setting Context.retention here as it will soon be removed.

Updates the test infrastructure to library relative media, and config
relative settings. Pre-configures the resolver. This hopefully
simplifies the setup steps, and removes the need for some validation
test fixtures.

Signed-off-by: Tom Cowland <tom@foundry.com>
Migrates over to media creation, instead of the low-level TraitsData
API with hard-coded trait strings.

Adds basic decoding of %20 to space, as it is prob quite common.

Signed-off-by: Tom Cowland <tom@foundry.com>
When we made this PoC, we noted that in order to support querying
extension, mtime, from the manager, as well as to support publishing
we'd need access to the entity reference in `_OpenAssetForWrite` and
other methods.

We opted to pass the ref through `_Resolve` so it would be available to
these other methods, and actually do the resolve in `_OpenAsset` and
friends.

We know performance is important, and we need to ensure that early
adopters don't see significantly increased overhead due to OpenAssetIO.

Looking again, we can split behaviour, so that the old approach is only
done in `_ResolveForNewAsset`. This means that the common case (read)
won't end up with numerous redundant resolver per read.

Signed-off-by: Tom Cowland <tom@foundry.com>
We put this in when we were learning about when and where USD invoked
the various methods of the API. People have indicated that the overhead
of the wrapper to OpenAssetIO would be a key factor during assessment.

This commit removes this logging, to avoid any unnecessary overhead.

It also makes the code somewhat easier to grok, which should help people
using this as a reference implementation.

Signed-off-by: Tom Cowland <tom@foundry.com>
Signed-off-by: Tom Cowland <tom@foundry.com>
…ing`

The previous implementation doubled up the `isEntityReferenceString`
check. Though probably not a big deal, this code will serve as an
integration example, and so should illustrate best practice.

Tweaks names slightly to help with grokability.

Signed-off-by: Tom Cowland <tom@foundry.com>
Returning an empty result seems to be the way to ensure that an error is
raised in a meaningful fashion. TF_ERROR doesn't abort, and
TF_FATAL_ERROR aborts in a hard fashion in many situations.

Signed-off-by: Tom Cowland <tom@foundry.com>
Signed-off-by: Tom Cowland <tom@foundry.com>
This will shortly be removed from OpenAssetIO...

Signed-off-by: Tom Cowland <tom@foundry.com>
@foundrytom foundrytom merged commit 7de1776 into OpenAssetIO:main Aug 23, 2023
9 checks passed
@foundrytom foundrytom deleted the work/updates branch August 23, 2023 14:47
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 this pull request may close these issues.

3 participants