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

Remove multi-context restrictions for publishing image sequences on farm #42

Closed

Conversation

tokejepsen
Copy link
Member

Changelog Description

Port of ynput/OpenPype#6088

@ynbot ynbot added size/XS type: enhancement Improvement of existing functionality or minor addition labels Feb 13, 2024
Comment on lines -78 to -94
# set context by first json file
ctx = self._context.data

ctx["asset"] = ctx.get("asset") or data.get("asset")
ctx["intent"] = ctx.get("intent") or data.get("intent")
ctx["comment"] = ctx.get("comment") or data.get("comment")
ctx["user"] = ctx.get("user") or data.get("user")
ctx["version"] = ctx.get("version") or data.get("version")

# basic sanity check to see if we are working in same context
# if some other json file has different context, bail out.
ctx_err = "inconsistent contexts in json files - %s"
assert ctx.get("asset") == data.get("asset"), ctx_err % "asset"
assert ctx.get("intent") == data.get("intent"), ctx_err % "intent"
assert ctx.get("comment") == data.get("comment"), ctx_err % "comment"
assert ctx.get("user") == data.get("user"), ctx_err % "user"
assert ctx.get("version") == data.get("version"), ctx_err % "version"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Technically - when is this is valid. If I have two .json files that specify a different running context to publish in this may be very dangerous because now suddenly that context isn't actually used for ONE of the json files?

I think, yes we should not assert that instance context must MATCH the gloibal context - but if we were to load multiple JSON files at once we should still assert the global context of both JSON files is shared between them.

Copy link
Member Author

Choose a reason for hiding this comment

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

@BigRoy this is just a port. Could you comment on the original PR; ynput/OpenPype#6088 ?

@tokejepsen tokejepsen marked this pull request as draft February 20, 2024 09:50
@antirotor
Copy link
Member

Implemented by #138

@antirotor antirotor closed this Mar 4, 2024
@tokejepsen tokejepsen deleted the enhancement/remove-multicontext-restriction branch March 5, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS type: enhancement Improvement of existing functionality or minor addition
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants