Implement a debugging reporter for collection dependency resolver - #81693
Implement a debugging reporter for collection dependency resolver#81693webknjaz wants to merge 2 commits into
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
f9f4590 to
ea78360
Compare
This comment was marked as outdated.
This comment was marked as outdated.
ea78360 to
92502be
Compare
|
@jborean93 @s-hertel so I've experimented with the extending the depresolver troubleshooting capabilities. Plz play with this and let me know what you think... |
s-hertel
left a comment
There was a problem hiding this comment.
This could use a changelog.
| include_signatures=include_signatures, | ||
| ), | ||
| CollectionDependencyReporter(), | ||
| CollectionDependencyDebuggingReporter() if C.DEFAULT_DEBUG |
There was a problem hiding this comment.
Could we add a dedicated config for the ansible-galaxy reporter mode, so its easy to add new reporters in the future?
There was a problem hiding this comment.
Should we still consult the debug mode along with that?
There was a problem hiding this comment.
@s-hertel since it's taking this long, I think it's best to skip extending the scope of the PR with possibly iterating on it in the future.
There was a problem hiding this comment.
I still would prefer a separate configuration option altogether.
having a boolean option and another option later possibly to add other reporters seems like bad UI to me
I've held off on a couple minor ansible-galaxy features recently on similar concerns - too many people complain about the current user experience, so I don't want to paint us into more corners unless there's actually a group decision (the more people weighing in, the better imo).
This idea is borrowed from what Pradyun added to pip's reporter for resolvelib and adapted for `ansible-galaxy collection install`. Normally, it uses a low-noise reporter but when debug is requested, the verbose one is selected.
92502be to
acbcddf
Compare
There was a problem hiding this comment.
@s-hertel does this change note sound good to you?
I often want a way to inspect the dependency tree more easily, but I guess I misunderstood the purpose of this PR. I'm -1 on this as an internal tool.
|
It looks like most people lean towards having something like |
SUMMARY
This change adds a dependency resolution reporter for tracing the decisions resolvelib is doing.
ISSUE TYPE
ADDITIONAL INFORMATION
PIP_RESOLVER_DEBUGenv var: https://github.com/pypa/pip/blob/205edfe/src/pip/_internal/resolution/resolvelib/resolver.py#L87-L90. Following that example, I chose to useANSIBLE_DEBUG=1as a similar toggle to infer the intent of troubleshooting the CLI.