-
Notifications
You must be signed in to change notification settings - Fork 115
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
Proposal to allow custom Descriptors via hooks #768
base: master
Are you sure you want to change the base?
Proposal to allow custom Descriptors via hooks #768
Conversation
I don't think the test errors are me.. I see the PRs right before this have the same errors |
Any chance I could get someone to look at this? Would love to get thoughts on it... Thanks |
Hi @Ahuge , We've been interested in allowing people to add their own custom io descriptor types over the years, but we've never had a chance to prioritize it. While we understand the need to add new IODescriptor types, we're curious why you would need a custom Descriptor type. Could you elaborate on this concept? With that being said, it's great that you've put so much effort in this submission, it's well documented, but we can't accept it at the moment. There's the matter that it only works when using the Also, I'd like to argue that custom descriptors should probably be available before bootstrapping, so it can be used in the descriptor field on a We'd love to continue this with you or any other client (I know some have forked Let us know what you think! JF |
Hey @jfboismenu, I appreciate the reply! And in response to the Descriptor question, I think I was just adding it because I was in the area and someone someday might want descriptor customization maybe? Thanks |
Hi again! Yeah, we would err on the side of caution and not allow custom We want to be honest. We don't want to tell you not to work on your own implementation of this for your studio. You're obviously the best person to decide whether maintaining a fork of You may find it best for now to simply live with your fork of If you haven't started a thread yet on the forum, let me know and I'll start one. Also, may I ask, which problem are you trying to get around here specifically by having a custom descriptor? JF |
adb5414
to
9985fa0
Compare
This error type my be thrown when registering custom descriptors
This is equivilent to the default tank.descriptor.io_descriptor init method.
9985fa0
to
0280022
Compare
Both functions now pass in the baseclass to register against.
The hook has changed it's method from ``register_types`` to ``register_io_descriptors``. The base class of this hook will run the same shotgun logic as before by calling the method in the __init__ of ``tank.descriptor.io_descriptor``. ``_register_io_descriptor_hook`` to call the RegisterDescriptors hook ``register_io_descriptors`` via the DescriptorManager method.
91a0c40
to
fffc91f
Compare
Is this me?
|
fffc91f
to
9af8ce0
Compare
config_root = os.path.join(self.fixtures_root, "config") | ||
sg = self.mockgun | ||
|
||
d = sgtk.descriptor.create_descriptor( |
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.
local variable 'd' is assigned to but never used
9af8ce0
to
1780349
Compare
Re: Is this me? No, we made a mistake in our build pipeline. This step should not be executed from fork, as forks do not have access to the build pipeline secrets. |
Oh perfect good to hear haha! That makes sense thanks! |
This PR is to allow toolkit developers to write custom IODescriptor classes without needing to take ownership over the entire tk-core repository.
We are no longer relying on a function in the __init__.py of
tank.descriptor.io_descriptor
to register our Descriptor types.We have offloaded that work to the IODescriptorBase
create
method on it's first execution.We have a class level initializer check that will call the external hook and fall back to the default types.
I have also added a sample use case for implementing a
bitbucket_release
IODescriptor example based off of thegithub_release
IODescriptor