getavalon / core

The safe post-production pipeline - https://getavalon.github.io/2.0
MIT License
213 stars 48 forks source link

Make Silos optional #535

Closed mkolar closed 4 years ago

mkolar commented 4 years ago

Problem

The concept of silos becomes problematic as projects grow larger and longer. The problem is visual where it's uncomfortable to browse through them with tabs, but also it's a bit limiting in terms of project structure.

Suggested solution

We suggest dropping them completely and instead consider any asset witch has visualParent set to Null as highest hierarchy member to be shown directly under the project in the GUIs. We've run this at all our sites for around 6 months now, so the key question is backwards compatibility, which I hope we achieved.

This is what the loader for example looks like without the silo tabs. image


This is a revival of an old PR #372 that was closed after we discovered more caveats to this. General consensus seemed to be towards this change though so hopefully this will work for everyone too.

If someone could give this a shot it would help a lot. Unfortunately, our setups have quite some dependency on Pype and it's hard to be sure that the backwards compatibility doesn't catch on something somewhere on projects of others.

davidlatwe commented 4 years ago

I like this change !

The concept of silos becomes problematic as projects grow larger and longer.

This also emerged in a couple of big projects here.

so the key question is backwards compatibility, which I hope we achieved.

At first glance, I think you guys nailed it, I quickly checkout this branch and looks great !

The silo icon is different than yours, but I think what I see here is the correct one. ![image](https://user-images.githubusercontent.com/3357009/77141567-57ee8e80-6ab8-11ea-84ad-8ce215e2a3e0.png)

I have done some model publishes in both new and old assets, seems working just fine. :)

One problem though, Loader's subset tree gets reseted when the refresh button is pressed, the only way to get that tree updated is switching to other asset and back. Any idea ?

davidlatwe commented 4 years ago

Oh and, I haven't review all the code, need more time to do that. ☺️

iLLiCiTiT commented 4 years ago

The silo icon is different than yours, but I think what I see here is the correct one.

The "database" icon is for "silo" which we don't use at all. We use only visualParent hierarchy.

One problem though, Loader's subset tree gets reseted when the refresh button is pressed, the only way to get that tree updated is switching to other asset and back. Any idea ?

You mean that there is missing refresh button for subsets tree? We agreed that there is no reason for crubling gui with another button with ephemeral advantage. Refresh button in asset tree can refresh both with minimal performance affect. But can be changed if you don't agree :)

iLLiCiTiT commented 4 years ago

We've realized that parenting and stylesheet issue should be resolved in new PR. So I've move stylesheet setters where they were and removed parenting.

mkolar commented 4 years ago

I believe all the comments we resolved by this last commit now. Could do you guys think @BigRoy @davidlatwe ? Can we move forward with this?

All our other PRs are quite dependent on this one, so we'll wait with further work until this is approved and merged.

mottosso commented 4 years ago

Style wise I think this looks good, and the PR is well focused and to the point, thanks for that. I'll leave it to David and Roy to judge the functionality.

BigRoy commented 4 years ago

First off, great work on this PR. I pulled it and it instantly seemed to work on our existing projects with backwards compatibility. Good stuff.

I do have some additional notes and issues after testing it - some are related to the new style projects (and some are notes for others trying to adopt on how they might need to tweak their studio config):

afbeelding

Did I do something wrong or should I be setting something specific on my project to make this work? This seems to be an issue with the Project managers avalon.tools.projectmanager.lib.create_asset() which is trying to use the old 2.0 asset schema. Should this be updated to 3.0 when silo is NOT required? Also the docstring for that function seems outdated since it states it always requires silo. Anyway, changing that to asset-3.0 allowed me to create assets.

Failed validating u'type' in schema[u'properties'][u'context'][u'properties'][u'silo']: {u'type': u'string'}

On instance[u'context'][u'silo']: None

This last one was resolved by only inlcuding that data when silo was set:
```python
            silo = asset.get("silo")
            if silo:
                representation["context"]["silo"] = silo

Sorry for the extensive block of text. I just wanted to make sure I accurately wrote down the issues as how they occurred to me.

Unfortunately in its current state this PR is unusable in production for us due to the issues described above.

mkolar commented 4 years ago

Sorry for the extensive block of text. I just wanted to make sure I accurately wrote down the issues as how they occurred to me.

no worries, this is exactly the testing we need. All our projects either don't use silo, or are temporarily created without it, but it's really hard to catch there errors without testing on existing project with silo, so thanks for that!

We'll go through it and get back here, but it all seems very fixable.

davidlatwe commented 4 years ago

It looks like most of the issues @BigRoy mentioned have been resolved ! πŸŽ‰

But I think instead of querying database with io.distinct.("silo") to define the project is silo required or not, how about just looking into project's publish path template to see if keyword {silo} exists ?

iLLiCiTiT commented 4 years ago

how about just looking into project's publish path template to see if keyword {silo} exists ?

I like it. We can't use that because we don't set templates in project's document, but that's our issue we can easily solve. What others think about it?

davidlatwe commented 4 years ago

Also, should we make Project Manager App to add ["data"]["parents"] field into asset document while creating asset in project that has silo opt-out ? (to adopt "AVALON_HIERARCHY")

One additional question, when using AVALON_HIERARCY, does that produce a folder structure that work and publish dirs may live with other child asset folder ? Like:

    characters
     β”” boys
        β”œ boyA
        β”‚   β”œ publish
        β”‚   β”” work  # Working on Modeling, Rig, LookDev
        β”œ boyB
        β”‚   β”œ publish
        β”‚   β”” work  # Working on Modeling, Rig, LookDev
        β”œ publish
        β”” work  # Working on LookDevs or Crowd Assets
mkolar commented 4 years ago

One additional question, when using AVALON_HIERARCY, does that produce a folder structure that work and publish dirs may live with other child asset folder ? Like:

yes that is possible if you have task on boys you'll get work and publish folder there. We actually use it for editorials and similar types of work.

iLLiCiTiT commented 4 years ago

how about just looking into project's publish path template to see if keyword {silo} exists

Looking "only" into publish template, or all templates set in project's config? Still is possible that workfile has "{silo}" inside. (small chances but possible)

mkolar commented 4 years ago

Anyone had time to give this another shot? We have other stuff waiting for being put into PRs but all of it's is dependent on this one.

mottosso commented 4 years ago

Sorry this is taking so long! How about we merge this as-is, and deal with issues as they arise? It's a little too large to be entirely confident ahead of time that nothing would break, but it looks like a step in the right direction.

davidlatwe commented 4 years ago

Sounds good, better to move forward ! Should we make a release before merging this one ?

mottosso commented 4 years ago

Sounds like a good idea, could you take care of it?

davidlatwe commented 4 years ago

Done. πŸ‘ https://github.com/getavalon/core/releases/tag/5.7.15

mottosso commented 4 years ago

Bam!