-
Notifications
You must be signed in to change notification settings - Fork 13
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 AYON_SERVER_URL to jobs #42
Submit AYON_SERVER_URL to jobs #42
Conversation
Tagging @tweak-wtf who might be interested in this. |
|
||
|
||
class CollectAYONServerUrlToFarmJob(CollectDeadlineJobEnvVars): | ||
label = "Submit AYON server URL to farm job" | ||
|
||
# TODO: Expose the enabled/optional state to settings | ||
ENV_KEYS = [ | ||
"AYON_SERVER_URL", | ||
"AYON_USE_DEV", | ||
] |
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.
Do we want send AYON_SERVER_URL always? If thats the case, server url in AYON Deadline plugin doesn't make sense, neither code for it in GlobalJobPreload
.
(Just note, API keys for all DL servers would need to be same as they would be still set via AYON DL plugin.)
Env var is being passed, but Settings for that collector should be added to make it optional. |
… enhancement/submit_ayon_server_url # Conflicts: # client/ayon_deadline/plugins/publish/global/collect_deadline_job_env_vars.py
…om/BigRoy/ayon-deadline into enhancement/submit_ayon_server_url
Is
|
Agree. What if we generalize this further, and make the settings like a However, it wouldn't really clarify why you'd want to pass that. Ideas @antirotor @m-u-r-p-h-y @iLLiCiTiT - better naming? different approach? |
server/settings/publish_plugins.py
Outdated
@@ -380,6 +390,11 @@ class PublishPluginsModel(BaseSettingsModel): | |||
"primary_pool": "", | |||
"secondary_pool": "" | |||
}, | |||
"CollectAYONServerUrlToFarmJob": { |
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.
Wouldn't be better to have settings for CollectDeadlineJobEnvVars
with enum Pass AYON server url to job
and options Always, User choice, Never
instead of new plugin?
I mean, we have publish plugin attribute definitions, but working with them as we would still use pyblish pype...
client/ayon_deadline/plugins/publish/global/collect_deadline_job_env_vars.py
Outdated
Show resolved
Hide resolved
client/ayon_deadline/plugins/publish/global/collect_deadline_job_env_vars.py
Outdated
Show resolved
Hide resolved
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.
Tested, worked.
My objection is to Submit AYON server URL to farm job
, but otherwise fine.
…hrough the other env vars like the chosen bundle and default variant settings
…om/BigRoy/ayon-deadline into enhancement/submit_ayon_server_url # Conflicts: # client/ayon_deadline/plugins/publish/global/collect_deadline_job_env_vars.py
@kalisp @iLLiCiTiT can you check the code and functionality again? |
client/ayon_deadline/plugins/publish/global/collect_deadline_job_env_vars.py
Outdated
Show resolved
Hide resolved
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.
Sorry, I didn't go through all of the comments.
Anyways, This PR works and AYON_API_KEY
is not propagated to the publish job when the collector is enabled.
…-in settings. This way we're not exposing the API key in the AYON settings that any admin is capable of seeing but leave it up to the Deadline admin to configure.
@kalisp @iLLiCiTiT I've implemented the implementation that @iLLiCiTiT proposed in the call we had about this PR. Now the I personally like it less. It feels overly complicated. And only after I implemented this I figured this would also have problems if say two developers on one network are connecting to their servers using e.g. Anyway, please review and comment so we can decide to continue this way, or revert to the previous logic of this PR or do it even differently. @tweak-wtf feel free to let you know your thoughts too. |
if i understood correctly we'd now define additional AYON servers and their corresponding API keys in the AYON Deadline Plugin with this syntax However, this sounds fine to me really. I understand the security concerns that passing API keys in cleartext is badbadnotgood. just a question... would it be possible/feasible to e.g. reference a secret name present in the main ayon instance instead for the actual API key? so something like btw. from my side this is not urgent at all. i just think it'd be a great addition for devs to further isolate a prod env from a sandbox and could ease some pain in transitional phases from one ayon instance to another |
It does - but only to what's supposedly the admin/super-user on Deadline.
I'd say no - because you'd first need to connect to the instance ;) using... an API key. |
got ya. then it really feels fine to me. |
client/ayon_deadline/repository/custom/plugins/GlobalJobPreLoad.py
Outdated
Show resolved
Hide resolved
…d.py Co-authored-by: Jakub Trllo <[email protected]>
@iLLiCiTiT should this also get bump minor label? |
Yes please. |
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.
This is cool, it works on my side.
I love the new idea of having Multiline AYON servers field.
I was too lazy to run an additional AYON instance so I've just removed the AYON server URL and used the new field solely. which makes me question the existence of the old setting. But anyways, this works!.
Changelog Description
Submit
AYON_SERVER_URL
with the Deadline Job.To avoid submitting along the user's API key or exposing the service user API key in AYON settings we only submit along the
AYON_SERVER_URL
however we now have an extra setting on the Deadline repository for the AYON Server URL submitted with the jobs to supply their API keys.Additional info
Fixes #27
Documentation with use case description ynput/ayon-documentation#285
Testing notes:
ayon+settings://deadline/publish/CollectAYONServerToFarmJob/enabled
AYON_SERVER_URL
if plug-in is enabled.