Skip to content

Conversation

soapy1
Copy link
Contributor

@soapy1 soapy1 commented Jun 6, 2025

Description

This PR introduces some more error handling into the environemnt_spec plugin detection process. Now,
if a plugin has an unhandled exception in their can_handle function:

  • detecting plugins (detect_environment_specifier) will capture + log errors coming from plugins, instead of erroring out
  • explicitly requesting a plugin (get_environment_specifier_by_name) with unhandled exceptions will wrap the error up in a conda exception and provide information about the error to the user

See the attached tests for examples of how this works.

This PR is just handling exceptions during the plugin detection phase, so that would be in the plugin implementation of the can_handle function. This PR does not introduce any error handling for retrieving an environment from the plugin.

depends on the changes to the plugin manager introduced in #14877 and #14914

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@github-project-automation github-project-automation bot moved this to 🆕 New in 🔎 Review Jun 6, 2025
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Jun 6, 2025
Copy link

codspeed-hq bot commented Jun 6, 2025

CodSpeed Performance Report

Merging #14916 will not alter performance

Comparing soapy1:defend-against-naughty-plugins (0dd7189) with main (eacc4c4)

Summary

✅ 21 untouched benchmarks

@soapy1 soapy1 force-pushed the defend-against-naughty-plugins branch from 93f33d1 to 35d9cce Compare June 23, 2025 16:59
@soapy1
Copy link
Contributor Author

soapy1 commented Jun 23, 2025

pre-commit.ci autofix

@soapy1 soapy1 marked this pull request as ready for review June 23, 2025 17:04
@soapy1 soapy1 requested a review from a team as a code owner June 23, 2025 17:04
@github-project-automation github-project-automation bot moved this from 🆕 New to 🏗️ In Progress in 🔎 Review Jun 23, 2025
@soapy1 soapy1 force-pushed the defend-against-naughty-plugins branch from f663afb to 682d100 Compare June 23, 2025 20:05
kenodegard
kenodegard previously approved these changes Jun 23, 2025
Copy link
Contributor

@kenodegard kenodegard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, minor suggestions

@github-project-automation github-project-automation bot moved this from 🏗️ In Progress to ✅ Approved in 🔎 Review Jun 23, 2025
@soapy1 soapy1 force-pushed the defend-against-naughty-plugins branch from 682d100 to 4c8ee08 Compare June 23, 2025 20:21
Co-authored-by: Ken Odegard <kodegard@anaconda.com>
@soapy1 soapy1 force-pushed the defend-against-naughty-plugins branch from f62fbd7 to ff0566c Compare June 23, 2025 20:23
kenodegard
kenodegard previously approved these changes Jun 23, 2025
Co-authored-by: jaimergp <jaimergp@users.noreply.github.com>
Co-authored-by: jaimergp <jaimergp@users.noreply.github.com>
@soapy1 soapy1 requested a review from jaimergp June 24, 2025 15:17
@soapy1 soapy1 requested review from kenodegard and jezdez June 24, 2025 15:17
@soapy1
Copy link
Contributor Author

soapy1 commented Jun 24, 2025

Looks like this test failure is due to a network error. Probably just needs a rerun

@jezdez jezdez enabled auto-merge (squash) June 24, 2025 19:27
@jezdez jezdez merged commit 075c8ea into conda:main Jun 24, 2025
141 of 143 checks passed
@github-project-automation github-project-automation bot moved this from ✅ Approved to 🏁 Done in 🔎 Review Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants