Skip to content

Conversation

travishathaway
Copy link
Contributor

Description

Fixes: #14485

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?

@travishathaway travishathaway requested a review from a team as a code owner January 14, 2025 14:57
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Jan 14, 2025
jezdez
jezdez previously approved these changes Jan 14, 2025
@kenodegard kenodegard changed the base branch from main to 25.1.x January 14, 2025 14:58
@kenodegard kenodegard dismissed jezdez’s stale review January 14, 2025 14:58

The base branch was changed.

kenodegard
kenodegard previously approved these changes Jan 14, 2025
Copy link

codspeed-hq bot commented Jan 14, 2025

CodSpeed Performance Report

Merging #14493 will degrade performances by 47.23%

Comparing travishathaway:issue-14485 (572c20a) with main (c61de5e)

Summary

❌ 1 (👁 1) regressions
✅ 20 untouched benchmarks

Benchmarks breakdown

Benchmark main travishathaway:issue-14485 Change
👁 test_install[libmamba] 2.1 s 3.9 s -47.23%

@travishathaway
Copy link
Contributor Author

@jezdez and @kenodegard, no idea why this is failing 🙈

@kenodegard
Copy link
Contributor

@jezdez and @kenodegard, no idea why this is failing 🙈

it would appear we've uncovered another bug, interesting how this hasn't come up anywhere else

@travishathaway
Copy link
Contributor Author

Added a small change to the failing test. We'll see if this works. I wasn't able to reproduce locally.

@kenodegard
Copy link
Contributor

I have narrowed the failure down and can replicate it on any OS with the following two tests:

pytest \
    tests/gateways/test_connection.py::test_get_session_with_url_pattern \
    tests/gateways/test_jlap.py::test_jlap_fetch_file

Comment on lines -275 to -277
mock_context: Context = mocker.patch("conda.gateways.connection.session.context")
mock_context.channel_settings = (
{"channel": channel_settings_url, "auth": "dummy_one"},
Copy link
Contributor

Choose a reason for hiding this comment

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

This form of context mocking is too broad and results in the context object doing some unfortunate caching

Comment on lines +274 to +280
mocker.patch(
"conda.base.context.Context.channel_settings",
new_callable=mocker.PropertyMock,
return_value=[{"channel": channel_settings_url, "auth": "dummy_one"}],
)
get_auth_handler = mocker.patch(
"conda.plugins.manager.CondaPluginManager.get_auth_handler"
Copy link
Contributor

@kenodegard kenodegard Jan 15, 2025

Choose a reason for hiding this comment

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

This is a targeted mocking for a specific value within the context object. Since it is so targeted we also need to explicitly patch get_auth_handler as well for the test to work as it did before.

@kenodegard kenodegard enabled auto-merge (squash) January 15, 2025 22:00
@kenodegard kenodegard disabled auto-merge January 15, 2025 23:39
@kenodegard
Copy link
Contributor

no idea why we're seeing the performance regression

@jezdez @jaimergp should we just acknowledge it and move on?

@kenodegard kenodegard merged commit d1d97a4 into conda:25.1.x Jan 16, 2025
62 checks passed
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.

Build failures: checksum mismatch
4 participants