-
Notifications
You must be signed in to change notification settings - Fork 337
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
fail-graph not showing true root of the conflict #865
Comments
Thanks very much for the repro. There has been a graph bug lurking for a long time, and this simple repro should help a lot in tracking it down. |
Just saw this issue and thought this might worth mentioning. Changing request order from
into
will also get more helpful graph. So I guess moving the request of the package which have wider overlap on the full request list at front could have better chance to show full fail graph. Maybe we could do this sorting before resolve ? Or when def requests_coverage(req):
count = 0
pkg = get_latest_package(req.name, range_=req.range)
if pkg:
required = [r.name for r in pkg.get_variant().get_requires()]
count = sum(r.name in required for r in package_requests)
return count
request_list = RequirementList(
sorted(package_requests, key=requests_coverage, reverse=True)
) |
Unfortunately this won't do, as order of package requests is important and
can change the solve. We need to find the root cause, it's almost certainly
a bug in the graph generation code somewhere.
…On Tue, May 25, 2021 at 9:46 PM David Lai ***@***.***> wrote:
Just saw this issue and thought this might worth mentioning.
Changing request order from
rez-env foo-2.0 bar-2.0 baz-1.0 --fail-graph
into
rez-env baz-1.0 foo-2.0 bar-2.0 --fail-graph
will also get more helpful graph.
So I guess moving the request of the package which have wider overlap on
the full request list at front could have better chance to show full fail
graph.
Maybe we could do this sorting before resolve ? For like, a simple guess
for better fail graph.
def requests_coverage(req):
count = 0
pkg = get_latest_package(req.name, range_=req.range)
if pkg:
required = [r.name for r in pkg.get_variant().get_requires()]
count = sum(r.name in required for r in package_requests)
return count
request_list = RequirementList(
sorted(package_requests, key=requests_coverage, reverse=True)
)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#865 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMOUSRLA5AT44ZUH4EFCTLTPOE2HANCNFSM4LPNO5JQ>
.
|
We found cases where the graph generated to show conflicts doesn't show the root cause of the conflict. Suppose we have three products, foo, bar, and baz. bar depends on foo and baz depends on both foo and bar. In other words, we have package.py with the following:
The following generates a conflict as expected because baz-1.0 requires foo-1.0 and bar-1.0 which conflicts with the foo-2.0 and bar-2.0 in the request:
rez-env foo-2.0 bar-2.0 baz-1.0 --fail-graph
However, the fail graph won't show baz at all although it's the one in conflict.
Now, if I drop the intermediate bar-2.0 request, I will get a more helpful failure graph that shows baz as being part of the conflict.
rez-env foo-2.0 baz-1.0 --fail-graph
This is a trivial case for this issue. But in more complex resolves, it can be quite difficult and time consuming to modify the request to get at the root cause of the conflict.
The text was updated successfully, but these errors were encountered: