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

Limiting package versions to profile request range #127

Closed
davidlatwe opened this issue Nov 10, 2020 · 6 comments
Closed

Limiting package versions to profile request range #127

davidlatwe opened this issue Nov 10, 2020 · 6 comments

Comments

@davidlatwe
Copy link
Collaborator

Problem

In "Packages" tab, user can change package version with a drop-down list. But the version listed in there is a full list of all installed versions, which can be easily go out side of profile's request range.

E.g. Maya package family has version 2016-2020 installed, but the profile however :

requires = ["~maya==2020"]

And if you change the version into, say 2018, Maya package resolve would fail.

Proposal

We should avoid exposing those "dead-ends" on interface. Only show versions that are not exceeding profile's requirement.

Also, how about disable those non-application package's version selecting ? I think this could save some compute resource, plus, changing non-application package's version is somewhat not practical.

@mottosso
Copy link
Owner

Oo, but I wonder whether we can know which are compatible, without running a full resolve. Since each resolve can take quite some time, it could delay showing that drop-down for many seconds, maybe minutes. What have you got in mind?

@davidlatwe
Copy link
Collaborator Author

but I wonder whether we can know which are compatible, without running a full resolve.

You mean to be able to limit the version range without running full resolve for each combination ?

@davidlatwe
Copy link
Collaborator Author

davidlatwe commented Nov 10, 2020

If so, I am thinking to jsut pass the version range of profile's package request in requires when listing pacakges, like here

versions = rez.find(pkg.name, paths=paths)

And if that package is not meant to be an application (not weak referenced or is a dependency), skip verison listing. :P

@davidlatwe
Copy link
Collaborator Author

Say we have this profile :

# profile package
requires = [
    "maya_usd",
    "~maya==2018|==2020",
]

And the Maya package, maybe like this :

# maya package
requires = [
    "foo",
]

Only Maya will have version 2018, 2020 listed, versions of maya_usd and the dependency foo will be fixed.

@davidlatwe
Copy link
Collaborator Author

Got a working draft now (PackagesModel and ApplicationModel also been merged into one), once the bug described in #126 (comment) gets resovled, I could submit another PR which will supersede #126 .

davidlatwe added a commit to davidlatwe/allzpark that referenced this issue Nov 11, 2020
PackagesModel and ApplicationModel are merged into one
ResolvedPackagesModel with ApplicationProxyModel
and PackagesProxyModel added.

Also, model doesn't need controller now.
@davidlatwe
Copy link
Collaborator Author

Resolved with #129.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants