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

Submit along Extra Info with jobs #53

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

BigRoy
Copy link
Contributor

@BigRoy BigRoy commented Oct 28, 2024

Changelog Description

Submit along Extra Info with jobs.

Additional info

Currently this PR hardcodes some values to pass along in a plug-in but the idea is that this showcases that any plug-in could "add" this data for the job submissions to get them. So that a studio could either implement their own addon to provide the data they want to add or we set-up a plug-in from which you can define some dynamic extra info values from studio/project settings.

Testing notes:

  1. Deadline farm submissions should now come with extra job info set.

@BigRoy BigRoy added type: enhancement Improvement of existing functionality or minor addition community Issues and PRs coming from the community members labels Oct 28, 2024
@BigRoy BigRoy self-assigned this Oct 28, 2024
@BigRoy BigRoy requested review from kalisp and antirotor October 28, 2024 23:02
@MustafaJafar
Copy link
Contributor

The recent PR #49 introduced the following two fields. Is that an alternative for this PR?
image

@BigRoy
Copy link
Contributor Author

BigRoy commented Nov 26, 2024

The recent PR #49 introduced the following two fields. Is that an alternative for this PR? image

@MustafaJafar nice. And good question. I suppose it could if the values themselves can be formatted using the context and instance data so that you can pass along additional custom data from the actual instance.

Also, I'm not entirely sure how trivial it is to manage ExtraInfoKeyValue from just those settings while still nicely mixing them with the dynamic nature of setting those during publishing. Because for the submission itself they need to turn into indexed keys, e.g.:

EnvironmentKeyValue0=AYON_APP_NAME=houdini/20-5-370-FX
EnvironmentKeyValue1=AYON_BUNDLE_NAME=2024.11.25-02
EnvironmentKeyValue2=AYON_DEFAULT_SETTINGS_VARIANT=production

Which may be hard to "mix" with dynamic key values defined during publishing.

So I'm not super confident the raw dict nature suits our needs here. But potentially dedicated "Key Value" profiles one could specify with the dynamic formatting for values could very well be how settings for this PR could look.

@MustafaJafar
Copy link
Contributor

suppose it could if the values themselves can be formatted using the context and instance data so that you can pass along additional custom data from the actual instance.

At what point of time of the publishing? I think it won't be an issue since the job info collector works at pyblish.api.CollectorOrder + 0.420

Also, I'm not entirely sure how trivial it is to manage ExtraInfoKeyValue from just those settings while still nicely mixing them with the dynamic nature of setting those during publishing.

so, the order of these extra info keys is important.

For information, this is how adding additional jobinfo is done, which doesn't support formatting each item with info or context data.

for key, value in json.loads(additional_job_info).items():
setattr(job_info, key, value)

def process(self, instance):

# Transfer some environment variables from current context
job_info = instance.data.setdefault(JOB_EXTRA_INFO_DATA_KEY, {})
Copy link
Member

Choose a reason for hiding this comment

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

Calling it directly job_info seems weird, I would prefer job_extra_info which is more descriptive.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Totally agree!

@kalisp
Copy link
Member

kalisp commented Dec 2, 2024

I don't really see purpose of this collector, I can understand reason for Extra Info values though.
But I would prefer them to be implemented as Additional JobInfo data (we could actually change it from json to list of key values tuples).

Or should be ExtraInfo be really dynamic from instance values and it is expected that specific collectors will be created for separate DCCs and collector in this PR is just a "skeleton/example"?

@BigRoy
Copy link
Contributor Author

BigRoy commented Dec 2, 2024

Or should be ExtraInfo be really dynamic from instance values and it is expected that specific collectors will be created for separate DCCs and collector in this PR is just a "skeleton/example"?

They do use dynamic values as can be seen in the code. In our case, I'm even collecting what "tools" were active at the running time of the submission. See here.

I created the PR mostly to discuss what make sense as standardization here - and whether it'd even be possible.

For context - this is then what it can look like in Deadline Monitor:
extra_info

image

I could actually even filter the Tools to only that application (because now also those listed for Maya are shown for example).

Anyway, having this data there technically also allows me to filter in Deadline to those things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Issues and PRs coming from the community members type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants