Skip to content

Conversation

@sentrivana
Copy link
Contributor

@sentrivanasentrivana commented Sep 29, 2025

Description

Adapt to import changes in new langchain 1.x

Issues

Closes#4735

Reminders

@codecov
Copy link

codecovbot commented Sep 29, 2025

❌ 2 Tests Failed:

Tests completedFailedPassedSkipped
274472274452004
View the full list of 2 ❄️ flaky test(s)
tests.profiler.test_continuous_profiler::test_continuous_profiler_auto_start_and_manual_stop[non-experiment-start_profile_session/stop_profile_session (deprecated)-gevent]

Flake rate in main: 61.70% (Passed 18 times, Failed 29 times)

Stack Traces | 0.555s run time
tests/profiler/test_continuous_profiler.py:291: in test_continuous_profiler_auto_start_and_manual_stop assert_single_transaction_with_profile_chunks(envelopes, thread) tests/profiler/test_continuous_profiler.py:147: in assert_single_transaction_with_profile_chunks assert len(items["profile_chunk"]) > 0 E assert 0 > 0 E + where 0 = len([])
tests.profiler.test_continuous_profiler::test_continuous_profiler_auto_start_and_manual_stop[non-experiment-start_profiler/stop_profiler-gevent]

Flake rate in main: 61.70% (Passed 18 times, Failed 29 times)

Stack Traces | 0.548s run time
tests/profiler/test_continuous_profiler.py:291: in test_continuous_profiler_auto_start_and_manual_stop assert_single_transaction_with_profile_chunks(envelopes, thread) tests/profiler/test_continuous_profiler.py:147: in assert_single_transaction_with_profile_chunks assert len(items["profile_chunk"]) > 0 E assert 0 > 0 E + where 0 = len([])

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@sentrivanasentrivana mentioned this pull request Oct 2, 2025
@sentrivanasentrivana marked this pull request as ready for review October 23, 2025 07:14
@sentrivanasentrivana requested a review from a team as a code ownerOctober 23, 2025 07:14
@cursor
Copy link

cursorbot commented Oct 23, 2025

Bug: AgentExecutor Import Overwrite Bug

The AgentExecutor import logic has two sequential try/except blocks. The second block unconditionally executes, causing langchain.agents.AgentExecutor to overwrite a successful langchain_classic.agents.AgentExecutor import (intended for v1+). This also means a successful langchain_classic import is lost if the langchain import fails, incorrectly setting AgentExecutor to None.

Fix in CursorFix in Web

@sentrivanasentrivana enabled auto-merge (squash) October 23, 2025 08:46
@sentrivanasentrivana merged commit 3d026cd into masterOct 23, 2025
128 of 130 checks passed
@sentrivanasentrivana deleted the ivana/support-langchain-v1 branch October 23, 2025 08:58
shellmayr pushed a commit that referenced this pull request Oct 30, 2025
### Description Adapt to import changes in new langchain 1.x #### Issues Closes#4735 #### Reminders - Please add tests to validate your changes, and lint your code using `tox -e linters`. - Add GH Issue ID _&_ Linear ID (if applicable) - PR title should use [conventional commit](https://develop.sentry.dev/engineering-practices/commit-messages/#type) style (`feat:`, `fix:`, `ref:`, `meta:`) - For external contributors: [CONTRIBUTING.md](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md), [Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord community](https://discord.gg/Ww9hbqr)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support langchain v1.0

4 participants

@sentrivana@emieldatalytica@alexander-alderman-webb