PF Recording/Replaying part for sdk_cli #1774
24 fail, 13 skipped, 268 pass in 29m 25s
Annotations
Check warning on line 0 in tests.sdk_cli_azure_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_serving_api (tests.sdk_cli_azure_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 4s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 4s]
Raw output
AssertionError: Response code indicates error 500 - {"error":{"code":"SystemError","message":"'Flow' object has no attribute 'code'"}}
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
flow_serving_client_remote_connection = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
@pytest.mark.usefixtures("flow_serving_client_remote_connection")
@pytest.mark.e2etest
def test_serving_api(flow_serving_client_remote_connection):
response = flow_serving_client_remote_connection.get("/health")
assert b'{"status":"Healthy","version":"0.0.1"}' in response.data
response = flow_serving_client_remote_connection.post("/score", data=json.dumps({"text": "hi"}))
> assert (
response.status_code == 200
), f"Response code indicates error {response.status_code} - {response.data.decode()}"
E AssertionError: Response code indicates error 500 - {"error":{"code":"SystemError","message":"'Flow' object has no attribute 'code'"}}
E
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_azure_test/e2etests/test_flow_serve.py:12: AssertionError
Check warning on line 0 in tests.sdk_cli_azure_test.e2etests.test_run_operations.TestFlowRun
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
1 out of 2 runs failed: test_update_run (tests.sdk_cli_azure_test.e2etests.test_run_operations.TestFlowRun)
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 5s]
Raw output
AssertionError: assert 'test_display_name_9b187a93-bff4-4a75-83bf-9526df4803d8' == 'test_display_name_1fe5e426-0256-4446-8329-c697bf3a987a'
- test_display_name_1fe5e426-0256-4446-8329-c697bf3a987a
+ test_display_name_9b187a93-bff4-4a75-83bf-9526df4803d8
self = <sdk_cli_azure_test.e2etests.test_run_operations.TestFlowRun object at 0x7f8eb8025550>
remote_client = <promptflow.azure._pf_client.PFClient object at 0x7f8ea5f76fa0>
def test_update_run(self, remote_client):
run_id = "4cf2d5e9-c78f-4ab8-a3ee-57675f92fb74"
test_mark = str(uuid.uuid4())
new_display_name = f"test_display_name_{test_mark}"
new_description = f"test_description_{test_mark}"
new_tags = {"test_tag": test_mark}
run = remote_client.runs.update(
run=run_id,
display_name=new_display_name,
description=new_description,
tags=new_tags,
)
assert run.display_name == new_display_name
assert run.description == new_description
assert run.tags["test_tag"] == test_mark
# test wrong type of parameters won't raise error, just log warnings and got ignored
run = remote_client.runs.update(
run=run_id,
tags={"test_tag": {"a": 1}},
)
> assert run.display_name == new_display_name
E AssertionError: assert 'test_display_name_9b187a93-bff4-4a75-83bf-9526df4803d8' == 'test_display_name_1fe5e426-0256-4446-8329-c697bf3a987a'
E - test_display_name_1fe5e426-0256-4446-8329-c697bf3a987a
E + test_display_name_9b187a93-bff4-4a75-83bf-9526df4803d8
tests/sdk_cli_azure_test/e2etests/test_run_operations.py:303: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_serving_api (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 3s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 2s]
Raw output
AssertionError: Response code indicates error 500 - {"error":{"code":"SystemError","message":"'Flow' object has no attribute 'code'"}}
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
flow_serving_client = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
@pytest.mark.usefixtures("flow_serving_client", "setup_local_connection")
@pytest.mark.e2etest
def test_serving_api(flow_serving_client):
response = flow_serving_client.get("/health")
assert b'{"status":"Healthy","version":"0.0.1"}' in response.data
response = flow_serving_client.post("/score", data=json.dumps({"text": "hi"}))
> assert (
response.status_code == 200
), f"Response code indicates error {response.status_code} - {response.data.decode()}"
E AssertionError: Response code indicates error 500 - {"error":{"code":"SystemError","message":"'Flow' object has no attribute 'code'"}}
E
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:72: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_evaluation_flow_serving_api (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 25s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 22s]
Raw output
AssertionError: Response code indicates error 500 - {"error":{"code":"SystemError","message":"'Flow' object has no attribute 'code'"}}
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
evaluation_flow_serving_client = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
@pytest.mark.usefixtures("evaluation_flow_serving_client", "setup_local_connection")
@pytest.mark.e2etest
def test_evaluation_flow_serving_api(evaluation_flow_serving_client):
response = evaluation_flow_serving_client.post("/score", data=json.dumps({"url": "https://www.microsoft.com/"}))
> assert (
response.status_code == 200
), f"Response code indicates error {response.status_code} - {response.data.decode()}"
E AssertionError: Response code indicates error 500 - {"error":{"code":"SystemError","message":"'Flow' object has no attribute 'code'"}}
E
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:84: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_llm_chat[text/event-stream-200-text/event-stream; charset=utf-8] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 1s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
serving_client_llm_chat = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = 'text/event-stream', expected_status_code = 200
expected_content_type = 'text/event-stream; charset=utf-8'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 200, "text/event-stream; charset=utf-8"),
("text/html", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "text/event-stream; charset=utf-8"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_llm_chat(
serving_client_llm_chat,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"question": "What is the capital of France?",
"chat_history": [],
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = serving_client_llm_chat.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:128: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_llm_chat[text/html-406-application/json] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 0s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
assert 500 == 406
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
serving_client_llm_chat = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = 'text/html', expected_status_code = 406
expected_content_type = 'application/json'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 200, "text/event-stream; charset=utf-8"),
("text/html", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "text/event-stream; charset=utf-8"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_llm_chat(
serving_client_llm_chat,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"question": "What is the capital of France?",
"chat_history": [],
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = serving_client_llm_chat.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 406
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:128: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_llm_chat[application/json-200-application/json] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 1s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
serving_client_llm_chat = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = 'application/json', expected_status_code = 200
expected_content_type = 'application/json'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 200, "text/event-stream; charset=utf-8"),
("text/html", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "text/event-stream; charset=utf-8"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_llm_chat(
serving_client_llm_chat,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"question": "What is the capital of France?",
"chat_history": [],
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = serving_client_llm_chat.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:128: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_llm_chat[*/*-200-application/json] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 1s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
serving_client_llm_chat = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = '*/*', expected_status_code = 200
expected_content_type = 'application/json'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 200, "text/event-stream; charset=utf-8"),
("text/html", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "text/event-stream; charset=utf-8"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_llm_chat(
serving_client_llm_chat,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"question": "What is the capital of France?",
"chat_history": [],
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = serving_client_llm_chat.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:128: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_llm_chat[text/event-stream, application/json-200-text/event-stream; charset=utf-8] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 0s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
serving_client_llm_chat = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = 'text/event-stream, application/json', expected_status_code = 200
expected_content_type = 'text/event-stream; charset=utf-8'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 200, "text/event-stream; charset=utf-8"),
("text/html", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "text/event-stream; charset=utf-8"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_llm_chat(
serving_client_llm_chat,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"question": "What is the capital of France?",
"chat_history": [],
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = serving_client_llm_chat.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:128: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_llm_chat[application/json, */*-200-application/json] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 1s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
serving_client_llm_chat = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = 'application/json, */*', expected_status_code = 200
expected_content_type = 'application/json'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 200, "text/event-stream; charset=utf-8"),
("text/html", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "text/event-stream; charset=utf-8"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_llm_chat(
serving_client_llm_chat,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"question": "What is the capital of France?",
"chat_history": [],
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = serving_client_llm_chat.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:128: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_llm_chat[-200-application/json] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 1s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 1s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
serving_client_llm_chat = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = '', expected_status_code = 200
expected_content_type = 'application/json'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 200, "text/event-stream; charset=utf-8"),
("text/html", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "text/event-stream; charset=utf-8"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_llm_chat(
serving_client_llm_chat,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"question": "What is the capital of France?",
"chat_history": [],
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = serving_client_llm_chat.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:128: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_python_stream_tools[text/event-stream-200-text/event-stream; charset=utf-8] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 0s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
serving_client_python_stream_tools = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = 'text/event-stream', expected_status_code = 200
expected_content_type = 'text/event-stream; charset=utf-8'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 200, "text/event-stream; charset=utf-8"),
("text/html", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "text/event-stream; charset=utf-8"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_python_stream_tools(
serving_client_python_stream_tools,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"text": "Hello World!",
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = serving_client_python_stream_tools.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:173: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_python_stream_tools[text/html-406-application/json] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 0s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
assert 500 == 406
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
serving_client_python_stream_tools = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = 'text/html', expected_status_code = 406
expected_content_type = 'application/json'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 200, "text/event-stream; charset=utf-8"),
("text/html", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "text/event-stream; charset=utf-8"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_python_stream_tools(
serving_client_python_stream_tools,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"text": "Hello World!",
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = serving_client_python_stream_tools.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 406
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:173: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_python_stream_tools[application/json-200-application/json] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 0s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
serving_client_python_stream_tools = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = 'application/json', expected_status_code = 200
expected_content_type = 'application/json'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 200, "text/event-stream; charset=utf-8"),
("text/html", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "text/event-stream; charset=utf-8"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_python_stream_tools(
serving_client_python_stream_tools,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"text": "Hello World!",
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = serving_client_python_stream_tools.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:173: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_python_stream_tools[*/*-200-application/json] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 0s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
serving_client_python_stream_tools = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = '*/*', expected_status_code = 200
expected_content_type = 'application/json'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 200, "text/event-stream; charset=utf-8"),
("text/html", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "text/event-stream; charset=utf-8"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_python_stream_tools(
serving_client_python_stream_tools,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"text": "Hello World!",
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = serving_client_python_stream_tools.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:173: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_python_stream_tools[text/event-stream, application/json-200-text/event-stream; charset=utf-8] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 0s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
serving_client_python_stream_tools = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = 'text/event-stream, application/json', expected_status_code = 200
expected_content_type = 'text/event-stream; charset=utf-8'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 200, "text/event-stream; charset=utf-8"),
("text/html", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "text/event-stream; charset=utf-8"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_python_stream_tools(
serving_client_python_stream_tools,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"text": "Hello World!",
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = serving_client_python_stream_tools.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:173: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_python_stream_tools[application/json, */*-200-application/json] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 0s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
serving_client_python_stream_tools = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = 'application/json, */*', expected_status_code = 200
expected_content_type = 'application/json'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 200, "text/event-stream; charset=utf-8"),
("text/html", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "text/event-stream; charset=utf-8"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_python_stream_tools(
serving_client_python_stream_tools,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"text": "Hello World!",
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = serving_client_python_stream_tools.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:173: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_python_stream_tools[-200-application/json] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 0s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
serving_client_python_stream_tools = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = '', expected_status_code = 200
expected_content_type = 'application/json'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 200, "text/event-stream; charset=utf-8"),
("text/html", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "text/event-stream; charset=utf-8"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_python_stream_tools(
serving_client_python_stream_tools,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"text": "Hello World!",
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = serving_client_python_stream_tools.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:173: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_python_nonstream_tools[text/event-stream-406-application/json] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 1s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 1s]
Raw output
assert 500 == 406
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
flow_serving_client = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = 'text/event-stream', expected_status_code = 406
expected_content_type = 'application/json'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "application/json"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_python_nonstream_tools(
flow_serving_client,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"text": "Hello World!",
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = flow_serving_client.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 406
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:233: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_python_nonstream_tools[application/json-200-application/json] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 1s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 1s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
flow_serving_client = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = 'application/json', expected_status_code = 200
expected_content_type = 'application/json'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "application/json"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_python_nonstream_tools(
flow_serving_client,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"text": "Hello World!",
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = flow_serving_client.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:233: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_python_nonstream_tools[*/*-200-application/json] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 2s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 1s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
flow_serving_client = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = '*/*', expected_status_code = 200
expected_content_type = 'application/json'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "application/json"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_python_nonstream_tools(
flow_serving_client,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"text": "Hello World!",
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = flow_serving_client.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:233: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_python_nonstream_tools[text/event-stream, application/json-200-application/json] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 3s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 1s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
flow_serving_client = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = 'text/event-stream, application/json', expected_status_code = 200
expected_content_type = 'application/json'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "application/json"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_python_nonstream_tools(
flow_serving_client,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"text": "Hello World!",
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = flow_serving_client.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:233: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_python_nonstream_tools[-200-application/json] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 2s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 2s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
flow_serving_client = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = '', expected_status_code = 200
expected_content_type = 'application/json'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "application/json"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_python_nonstream_tools(
flow_serving_client,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"text": "Hello World!",
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = flow_serving_client.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:233: AssertionError
Check warning on line 0 in tests.sdk_cli_test.e2etests.test_flow_serve
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
All 2 runs failed: test_stream_python_nonstream_tools[application/json, */*-200-application/json] (tests.sdk_cli_test.e2etests.test_flow_serve)
artifacts/Test Results (Python 3.10) (OS macos-latest)/test-results.xml [took 2s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 2s]
Raw output
assert 500 == 200
+ where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
flow_serving_client = <FlaskClient <PromptflowServingApp 'promptflow._sdk._serving.app'>>
accept = 'application/json, */*', expected_status_code = 200
expected_content_type = 'application/json'
@pytest.mark.e2etest
@pytest.mark.parametrize(
"accept, expected_status_code, expected_content_type",
[
("text/event-stream", 406, "application/json"),
("application/json", 200, "application/json"),
("*/*", 200, "application/json"),
("text/event-stream, application/json", 200, "application/json"),
("application/json, */*", 200, "application/json"),
("", 200, "application/json"),
],
)
def test_stream_python_nonstream_tools(
flow_serving_client,
accept,
expected_status_code,
expected_content_type,
):
payload = {
"text": "Hello World!",
}
headers = {
"Content-Type": "application/json",
"Accept": accept,
}
response = flow_serving_client.post("/score", json=payload, headers=headers)
> assert response.status_code == expected_status_code
E assert 500 == 200
E + where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/sdk_cli_test/e2etests/test_flow_serve.py:233: AssertionError
Check notice on line 0 in .github
github-actions / SDK CLI Test Result [yigao/recording_draft](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:yigao/recording_draft++)
13 skipped tests found
There are 13 skipped tests, see "Raw output" for the full list of skipped tests.
Raw output
tests.sdk_cli_azure_test.e2etests.test_cli_with_azure.TestCliWithAzure ‑ test_basic_flow_with_package_tool_with_custom_strong_type_connection
tests.sdk_cli_azure_test.e2etests.test_connection_operations.TestConnectionOperations ‑ test_connection_get_create_delete
tests.sdk_cli_azure_test.e2etests.test_connection_operations.TestConnectionOperations ‑ test_custom_connection_create
tests.sdk_cli_azure_test.e2etests.test_flow_operations.TestFlow ‑ test_crud_flow
tests.sdk_cli_azure_test.e2etests.test_flow_operations.TestFlow ‑ test_flow
tests.sdk_cli_azure_test.e2etests.test_flow_operations.TestFlow ‑ test_flow_no_variants_remote_file
tests.sdk_cli_azure_test.e2etests.test_flow_operations.TestFlow ‑ test_flow_without_variants
tests.sdk_cli_azure_test.e2etests.test_flow_operations.TestFlow ‑ test_list_flows
tests.sdk_cli_azure_test.e2etests.test_run_operations.TestFlowRun ‑ test_automatic_runtime_creation_failure
tests.sdk_cli_azure_test.e2etests.test_run_operations.TestFlowRun ‑ test_run_with_symbolic
tests.sdk_cli_azure_test.unittests.test_flow_entity.TestFlow ‑ test_load_flow
tests.sdk_cli_azure_test.unittests.test_flow_entity.TestFlow ‑ test_load_flow_from_remote_storage
tests.sdk_cli_test.e2etests.test_flow_test.TestFlowTest ‑ test_pf_test_with_additional_includes