Skip to content

Remove instance version number given as argument to add_preview and let Kitsu determine revision number#128

Merged
BigRoy merged 5 commits into
ynput:developfrom
Burital:publish_without_version_number
Apr 10, 2026
Merged

Remove instance version number given as argument to add_preview and let Kitsu determine revision number#128
BigRoy merged 5 commits into
ynput:developfrom
Burital:publish_without_version_number

Conversation

@Burital
Copy link
Copy Markdown
Contributor

@Burital Burital commented Apr 1, 2026

Changelog Description

Remove instance version number given as argument to add_preview and let Kitsu determine revision number, resolves #127

Additional Info

This PR aims to solve #127 by simply not providing the "version" as revision number to add_preview and letting Kitsu assign this number itself.

If instance.data["version"] was passed as an argument it was for Ayon and Kitsu to more accurately reflect each other, however several different kinds of products can create reviewables for a same task in Kitsu, and a product or instance's version number may not be an accurate basis for the latest revision preview number. Also, as described in the issue, you can add revision previews directly through Kitsu and Ayon being unaware of it.
When no revision argument is given, Kitsu will automatically give it the right n+1 version number and will avoid conflicts, this is what was done here.

For these reasons it seems this is not that important to keep the revision number absolutely synchronized to a product's version and removing this argument can also prevent some issues.

Testing notes:

You can follow the steps described in #127 to see the change in behavior.

@BigRoy BigRoy added type: bug Something isn't working community Issues and PRs coming from the community members labels Apr 1, 2026
@BigRoy BigRoy self-assigned this Apr 1, 2026
@BigRoy BigRoy self-requested a review April 1, 2026 18:33
@BigRoy
Copy link
Copy Markdown
Member

BigRoy commented Apr 1, 2026

@Burital I'm not sure if just removing it is the nicest approach - it'd make the revision unrelated to the AYON version alltogether - I wonder if instead it could try to match IF version does not exist on server yet, otherwise increment it? (but maybe that's also too confusing?)


Seems consensus in community seems to be acceptable of this change - so, fine with me.

@BigRoy
Copy link
Copy Markdown
Member

BigRoy commented Apr 1, 2026

I'll hold off merging for a few days to give time to others to provide some feedback, but looks good to me.

@EmberLightVFX
Copy link
Copy Markdown
Contributor

I understand the point for this PR but I think removing the functionality to match Kitsu and Ayon's version number can cause some comunication problems. For me the client checks Kitsu and then say "I like version 8 the best", now what version does the client talk about? In case I also write the version in the publish text it doesn't mean the client see it or use that version number.

The only way I can see Kitsus version number drift apart from Ayons is if someone uploads something outside of Ayons pipeline. Of course it's ok to do but that can also then break the pipeline, like #127

Best would be if this could be an option in the settings so the user can uncheck to sync Ayon's version number. What do we think about that?

Copy link
Copy Markdown
Member

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

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

Best would be if this could be an option in the settings so the user can uncheck to sync Ayon's version number. What do we think about that?

Please implement to make this an exposed setting.

@Burital
Copy link
Copy Markdown
Contributor Author

Burital commented Apr 8, 2026

Best would be if this could be an option in the settings so the user can uncheck to sync Ayon's version number. What do we think about that?

Please implement to make this an exposed setting.

The exposed setting has been implemented in this PR, it is set to True by default to avoid breaking pipelines that already rely on this synchronization, a description was added to describe best what potential errors this setting aims to solve with revision and version matching.

@Burital Burital requested a review from BigRoy April 8, 2026 08:10
Copy link
Copy Markdown
Member

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

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

LGTM - just a minor note on the description of the setting.

Comment thread server/settings/publish_plugins.py Outdated
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
@Burital Burital requested a review from BigRoy April 8, 2026 09:11
@BigRoy BigRoy merged commit 908a28d into ynput:develop Apr 10, 2026
1 check passed
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: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ParameterException when trying to publish a reviewable for a product whose version number is already in Kitsu revisions

3 participants