Software entity ID from app_launcher hooks

Is there any way to obtain the software entity id of the item selected in the Sg Desktop app from within the app-launcher hooks? (eg app_launch before_app_launch).

I was able to do this previously using the engine_name and version number variables available in the hooks, but if I have more than one software entity with the same version, then I don’t have enough info to return just one of those entities using a sg_find command.

Any ideas?
Thanks in advance for any help.
p.

2 Likes

Hey Patrick – There’s currently no way to do this; you only get bits and pieces, like the engine name, app_path, etc. We have a long-standing feature request to pass the entire Software entity to the launchapp hooks, which would even eliminate the need for you to do a find(). I’ll see if I can get some fire under that request.

3 Likes

It would be a bit hacky, but as a work around, could you put something in the args field of the Software entity that you could use to uniquely identify the software entity, something like: id.1234.
Then you would need to strip it off again from the actual args (if any) in the app_launch.py hook so that it wasn’t actually passed to the executable.

2 Likes

Looks like someone has already done the work for you on this one.

What does the timescale for having a simple pull-request like this released in the app-store look like?

I can’t see the changes having any adverse effect on existing pipelines or app performance.

Thanks!
p.
(thanks for the suggestion Philip!)

2 Likes

Hey Patrick - Even when we have an external PR for our code (which we always appreciate!), it still needs to go through a process of being looked over by an engineer to ensure that it makes sense with our existing codebase, modified if necessary, sent through QA, etc., plus we need to weigh the priority of the fix against other items in our queue, which comes with its own set of variables. So, sometimes simple fixes don’t get through as quickly as we’d hope, and as far as the question of “what is the timescale”, well, it varies widely.

Having said that, we’ve put this in all in front of our product team: the requested feature, the client requests for it (yours and others), and now the PR. I agree that it’s a relatively simple change that we could get a lot of “bang” out of – we’ll keep making the case. :slight_smile:

2 Likes

Thanks for that Tannaz! I appreciate it was a bit of a cheaky question, and I do appreciate that even the simplest updates have to pass through a number of stages to get approved for good reason.
Thanks again.
p.

2 Likes

Hello!

Just wanted to let you know that with v0.11.2 of tk-multi-launchapp, we’ve added a bunch of features around what gets passed to the app’s hooks, including @Unai’s PR above. Full details are in the linked release notes.

3 Likes

Awesome updates! Thanks!

3 Likes

Thanks a bunch! :hugs:

4 Likes