conda-forge / conda-forge-ci-setup-feedstock

A conda-smithy repository for conda-forge-ci-setup.
BSD 3-Clause "New" or "Revised" License
13 stars 52 forks source link

Disable conflict reports? #163

Closed jaimergp closed 3 years ago

jaimergp commented 3 years ago

Issue:

When conda cannot solve an environment, it will try to build a conflict report detailing the possible causes. This takes a while and is often not very helpful. Users are mostly recommended to try build the same package with mambabuild to get a better report.

Suggestion:

Turns out there's a config key (check bottom of page) to disable these reports (or hints as they call it): unsatisfiable_hints. If set to false, conda will not compute them. I guess this is honored by conda-build too.

Instead of printing the conflicts report, we can print instructions on how to enable mambabuild for debugging.

Do you think this would be a sane default behaviour for CF? It can save a lot of CI resources down the line.

isuruf commented 3 years ago

Do you think this would be a sane default behaviour for CF? It can save a lot of CI resources down the line.

No. The conflict reports have been useful to me and I'd rather have them enabled by default than disabled. It's also useful when helping others and if this was disabled we'd have to ask others to enable that (or mambabuild) which is always time consuming to explain.

jaimergp commented 3 years ago

When unsatisfiable_hints is set to false there's still a message posted about conflicts, just without the (often endless) chain of dependencies:

UnsatisfiableError: 
  Did not find conflicting dependencies. If you would like to know which
  packages conflict ensure that you have enabled unsatisfiable hints.

  conda config --set unsatisfiable_hints True

We could detect this exit message and add a link to the docs on how to debug this issue. I have seen a lot of messages in the Gitter room where people are wondering how to make sense of the conda report and the reply is usually "debug with mambabuild for a better report of the conflicts".

That said, the solver logic gets messed up with unsatisfiable_hints=false and envs that solve perfectly get labeled as unsolvable. So right now this is broken and even if we wanted, we cannot use it.

isuruf commented 3 years ago

We could detect this exit message and add a link to the docs on how to debug this issue. I have seen a lot of messages in the Gitter room where people are wondering how to make sense of the conda report and the reply is usually "debug with mambabuild for a better report of the conflicts".

How about we do this, but not remove unsatisfiable_hints? When conflicts happen, I'd like to know them instead of having to potentially wait for another CI run to tell me what they are especially for packages that take a long time.

jaimergp commented 3 years ago

Yes, I spent the whole day trying to figure out why disabling hints messes up the solver and didn't get too much out of it. I'll change that PR to add informative help messages!

jaimergp commented 3 years ago

I've tried a couple things locally but the code is too intricate / brittle (disabling exit on error, catching exit codes, grepping outputs, checking mambabuild in use... and cross-platform) to make it worth it in my opinion. Now that QuantStack has a CZI grant to improve this area I think we can just let it be for now.

Closing!