fix:Delete the migration file for modifying the default model name length and remove the related output fields and attributes

pull/20921/head
GuanMu 10 months ago
parent 0e68195552
commit 12e3c00ec8

@ -1,39 +0,0 @@
"""modify default model name length
Revision ID: 47cc7df8c4f3
Revises: 3c7cac9521c6
Create Date: 2024-05-10 09:48:09.046298
"""
import sqlalchemy as sa
from alembic import op
import models as models
# revision identifiers, used by Alembic.
revision = '47cc7df8c4f3'
down_revision = '3c7cac9521c6'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('tenant_default_models', schema=None) as batch_op:
batch_op.alter_column('model_name',
existing_type=sa.VARCHAR(length=40),
type_=sa.String(length=255),
existing_nullable=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('tenant_default_models', schema=None) as batch_op:
batch_op.alter_column('model_name',
existing_type=sa.String(length=255),
type_=sa.VARCHAR(length=40),
existing_nullable=False)
# ### end Alembic commands ###

@ -398,7 +398,13 @@ def test_run_branch(mock_close, mock_remove):
"id": "start",
},
{
"data": {"answer": "1 {{#start.uid#}}", "title": "Answer", "type": "answer", "variables": [], "outputs": []},
"data": {
"answer": "1 {{#start.uid#}}",
"title": "Answer",
"type": "answer",
"variables": [],
"outputs": [],
},
"id": "answer-1",
},
{

@ -89,7 +89,12 @@ def test_run():
"id": "tt",
},
{
"data": {"answer": "{{#iteration-1.output#}}88888", "title": "answer 3", "type": "answer", "outputs": []},
"data": {
"answer": "{{#iteration-1.output#}}88888",
"title": "answer 3",
"type": "answer",
"outputs": [],
},
"id": "answer-3",
},
{
@ -110,7 +115,13 @@ def test_run():
"id": "if-else",
},
{
"data": {"answer": "no hi", "iteration_id": "iteration-1", "title": "answer 4", "type": "answer", "outputs": []},
"data": {
"answer": "no hi",
"iteration_id": "iteration-1",
"title": "answer 4",
"type": "answer",
"outputs": [],
},
"id": "answer-4",
},
{
@ -307,7 +318,12 @@ def test_run_parallel():
"id": "tt-2",
},
{
"data": {"answer": "{{#iteration-1.output#}}88888", "title": "answer 3", "type": "answer", "outputs": []},
"data": {
"answer": "{{#iteration-1.output#}}88888",
"title": "answer 3",
"type": "answer",
"outputs": [],
},
"id": "answer-3",
},
{
@ -328,7 +344,13 @@ def test_run_parallel():
"id": "if-else",
},
{
"data": {"answer": "no hi", "iteration_id": "iteration-1", "title": "answer 4", "type": "answer", "outputs": []},
"data": {
"answer": "no hi",
"iteration_id": "iteration-1",
"title": "answer 4",
"type": "answer",
"outputs": [],
},
"id": "answer-4",
},
{
@ -524,7 +546,12 @@ def test_iteration_run_in_parallel_mode():
"id": "tt-2",
},
{
"data": {"answer": "{{#iteration-1.output#}}88888", "title": "answer 3", "type": "answer", "outputs": []},
"data": {
"answer": "{{#iteration-1.output#}}88888",
"title": "answer 3",
"type": "answer",
"outputs": [],
},
"id": "answer-3",
},
{
@ -545,7 +572,13 @@ def test_iteration_run_in_parallel_mode():
"id": "if-else",
},
{
"data": {"answer": "no hi", "iteration_id": "iteration-1", "title": "answer 4", "type": "answer", "outputs": []},
"data": {
"answer": "no hi",
"iteration_id": "iteration-1",
"title": "answer 4",
"type": "answer",
"outputs": [],
},
"id": "answer-4",
},
{
@ -744,7 +777,12 @@ def test_iteration_run_error_handle():
"id": "tt2",
},
{
"data": {"answer": "{{#iteration-1.output#}}88888", "title": "answer 3", "type": "answer", "outputs": []},
"data": {
"answer": "{{#iteration-1.output#}}88888",
"title": "answer 3",
"type": "answer",
"outputs": [],
},
"id": "answer-3",
},
{

@ -239,7 +239,10 @@ def test_code_default_value_continue_on_error():
"edges": DEFAULT_VALUE_EDGE,
"nodes": [
{"data": {"title": "start", "type": "start", "variables": []}, "id": "start"},
{"data": {"title": "answer", "type": "answer", "answer": "{{#node.result#}}", "outputs": []}, "id": "answer"},
{
"data": {"title": "answer", "type": "answer", "answer": "{{#node.result#}}", "outputs": []},
"id": "answer",
},
ContinueOnErrorTestHelper.get_code_node(
error_code, "default-value", [{"key": "result", "type": "number", "value": 132123}]
),
@ -292,7 +295,10 @@ def test_http_node_default_value_continue_on_error():
"edges": DEFAULT_VALUE_EDGE,
"nodes": [
{"data": {"title": "start", "type": "start", "variables": []}, "id": "start"},
{"data": {"title": "answer", "type": "answer", "answer": "{{#node.response#}}", "outputs": []}, "id": "answer"},
{
"data": {"title": "answer", "type": "answer", "answer": "{{#node.response#}}", "outputs": []},
"id": "answer",
},
ContinueOnErrorTestHelper.get_http_node(
"default-value", [{"key": "response", "type": "string", "value": "http node got error response"}]
),
@ -395,7 +401,10 @@ def test_llm_node_default_value_continue_on_error():
"edges": DEFAULT_VALUE_EDGE,
"nodes": [
{"data": {"title": "start", "type": "start", "variables": []}, "id": "start"},
{"data": {"title": "answer", "type": "answer", "answer": "{{#node.answer#}}", "outputs": []}, "id": "answer"},
{
"data": {"title": "answer", "type": "answer", "answer": "{{#node.answer#}}", "outputs": []},
"id": "answer",
},
ContinueOnErrorTestHelper.get_llm_node(
"default-value", [{"key": "answer", "type": "string", "value": "default LLM response"}]
),
@ -499,7 +508,10 @@ def test_no_node_in_fail_branch_continue_on_error():
"edges": FAIL_BRANCH_EDGES[:-1],
"nodes": [
{"data": {"title": "Start", "type": "start", "variables": []}, "id": "start"},
{"data": {"title": "success", "type": "answer", "answer": "HTTP request successful", "outputs": []}, "id": "success"},
{
"data": {"title": "success", "type": "answer", "answer": "HTTP request successful", "outputs": []},
"id": "success",
},
ContinueOnErrorTestHelper.get_http_node(),
],
}

@ -27,7 +27,10 @@ def test_retry_default_value_partial_success():
"edges": DEFAULT_VALUE_EDGE,
"nodes": [
{"data": {"title": "start", "type": "start", "variables": []}, "id": "start"},
{"data": {"title": "answer", "type": "answer", "answer": "{{#node.result#}}", "outputs": []}, "id": "answer"},
{
"data": {"title": "answer", "type": "answer", "answer": "{{#node.result#}}", "outputs": []},
"id": "answer",
},
ContinueOnErrorTestHelper.get_http_node(
"default-value",
[{"key": "result", "type": "string", "value": "http node got error response"}],
@ -50,7 +53,10 @@ def test_retry_failed():
"edges": DEFAULT_VALUE_EDGE,
"nodes": [
{"data": {"title": "start", "type": "start", "variables": []}, "id": "start"},
{"data": {"title": "answer", "type": "answer", "answer": "{{#node.result#}}", "outputs": []}, "id": "answer"},
{
"data": {"title": "answer", "type": "answer", "answer": "{{#node.result#}}", "outputs": []},
"id": "answer",
},
ContinueOnErrorTestHelper.get_http_node(
None,
None,

Loading…
Cancel
Save