-
Notifications
You must be signed in to change notification settings - Fork 901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: reset user agent for each requests in local pfs #2284
fix: reset user agent for each requests in local pfs #2284
Conversation
SDK CLI Global Config Test Result zhangxingzhi/reset-user-agent-for-each-pfs-request2 tests 2 ✅ 51s ⏱️ Results for commit aa7588b. ♻️ This comment has been updated with latest results. |
promptflow-tracing unit test result zhangxingzhi/reset-user-agent-for-each-pfs-request 4 files 4 suites 22s ⏱️ Results for commit aa7588b. ♻️ This comment has been updated with latest results. |
promptflow-tracing e2e test result zhangxingzhi/reset-user-agent-for-each-pfs-request 4 files 4 suites 1m 40s ⏱️ Results for commit aa7588b. ♻️ This comment has been updated with latest results. |
Executor Unit Test Result zhangxingzhi/reset-user-agent-for-each-pfs-request754 tests 754 ✅ 3m 53s ⏱️ Results for commit aa7588b. ♻️ This comment has been updated with latest results. |
promptflow SDK CLI Azure E2E Test Result zhangxingzhi/reset-user-agent-for-each-pfs-request 4 files 4 suites 3m 48s ⏱️ Results for commit aa7588b. ♻️ This comment has been updated with latest results. |
Executor E2E Test Result zhangxingzhi/reset-user-agent-for-each-pfs-request210 tests 208 ✅ 7m 25s ⏱️ Results for commit aa7588b. ♻️ This comment has been updated with latest results. |
SDK CLI Test Result zhangxingzhi/reset-user-agent-for-each-pfs-request 12 files 12 suites 40m 25s ⏱️ Results for commit aa7588b. ♻️ This comment has been updated with latest results. |
27ea2f4
to
2657a08
Compare
2657a08
to
ee5e471
Compare
ee5e471
to
7c01e62
Compare
f3b5e3d
to
aa7588b
Compare
Description
This pull request primarily involves 2 changes:
User Agent Handling:
src/promptflow/promptflow/_core/operation_context.py
: Theappend_user_agent
method has been refactored to handle multiple user agents. It now splits the user agent string and appends new user agents if they are not already present.Client Request Processing:
get_client_from_request
method has been replaced withget_client_based_on_pfs_request
across several files to improve client request processing. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]New Methods:
src/promptflow/promptflow/_sdk/_utils.py
: A new methodpop_current_user_agent
has been introduced to handle changes in the user agent.Test Cases:
src/promptflow/tests/sdk_pfs_test/e2etests/test_connection_apis.py
: A new test casetest_list_connections_with_different_user_agent
has been added to verify the handling of different user agents.Other Changes:
src/promptflow/promptflow/_sdk/_service/entry.py
: The condition for using the SDK API to start pfs has been modified to also include theargs.debug
case.All Promptflow Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines