Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions runs/test/scripts/abort_action.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

ENDPOINT="${ENDPOINT:-http://localhost:8090}"
ORG="${ORG:-testorg}"
PROJECT="${PROJECT:-testproject}"
DOMAIN="${DOMAIN:-development}"
RUN_NAME="${RUN_NAME:?Error: RUN_NAME environment variable is required}"
ACTION="${ACTION:-$RUN_NAME}"
REASON="${REASON:-User requested abort}"

buf curl --schema . "$ENDPOINT/flyteidl2.workflow.RunService/AbortAction" --data @- <<EOF
{
"action_id": {
"run": {
"org": "$ORG",
"project": "$PROJECT",
"domain": "$DOMAIN",
"name": "$RUN_NAME"
},
"name": "$ACTION"
},
"reason": "$REASON"
}
EOF
20 changes: 20 additions & 0 deletions runs/test/scripts/abort_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

ENDPOINT="${ENDPOINT:-http://localhost:8090}"
ORG="${ORG:-testorg}"
PROJECT="${PROJECT:-testproject}"
DOMAIN="${DOMAIN:-development}"
RUN_NAME="${RUN_NAME:?Error: RUN_NAME environment variable is required}"
REASON="${REASON:-User requested abort}"

buf curl --schema . "$ENDPOINT/flyteidl2.workflow.RunService/AbortRun" --data @- <<EOF
{
"run_id": {
"org": "$ORG",
"project": "$PROJECT",
"domain": "$DOMAIN",
"name": "$RUN_NAME"
},
"reason": "$REASON"
}
EOF
22 changes: 22 additions & 0 deletions runs/test/scripts/get_action_details.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

ENDPOINT="${ENDPOINT:-http://localhost:8090}"
ORG="${ORG:-testorg}"
PROJECT="${PROJECT:-testproject}"
DOMAIN="${DOMAIN:-development}"
RUN_NAME="${RUN_NAME:?Error: RUN_NAME environment variable is required}"
ACTION="${ACTION:-$RUN_NAME}"

buf curl --schema . "$ENDPOINT/flyteidl2.workflow.RunService/GetActionDetails" --data @- <<EOF
{
"action_id": {
"run": {
"org": "$ORG",
"project": "$PROJECT",
"domain": "$DOMAIN",
"name": "$RUN_NAME"
},
"name": "$ACTION"
}
}
EOF
18 changes: 18 additions & 0 deletions runs/test/scripts/get_run_details.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

ENDPOINT="${ENDPOINT:-http://localhost:8090}"
ORG="${ORG:-testorg}"
PROJECT="${PROJECT:-testproject}"
DOMAIN="${DOMAIN:-development}"
RUN_NAME="${RUN_NAME:?Error: RUN_NAME environment variable is required}"

buf curl --schema . "$ENDPOINT/flyteidl2.workflow.RunService/GetRunDetails" --data @- <<EOF
{
"run_id": {
"org": "$ORG",
"project": "$PROJECT",
"domain": "$DOMAIN",
"name": "$RUN_NAME"
}
}
EOF
24 changes: 24 additions & 0 deletions runs/test/scripts/list_actions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

ENDPOINT="${ENDPOINT:-http://localhost:8090}"
ORG="${ORG:-testorg}"
PROJECT="${PROJECT:-testproject}"
DOMAIN="${DOMAIN:-development}"
RUN_NAME="${RUN_NAME:?Error: RUN_NAME environment variable is required}"
LIMIT="${LIMIT:-10}"
TOKEN="${TOKEN:-}"

buf curl --schema . "$ENDPOINT/flyteidl2.workflow.RunService/ListActions" --data @- <<EOF
{
"request": {
"limit": $LIMIT,
"token": "$TOKEN"
},
"run_id": {
"org": "$ORG",
"project": "$PROJECT",
"domain": "$DOMAIN",
"name": "$RUN_NAME"
}
}
EOF
23 changes: 23 additions & 0 deletions runs/test/scripts/list_runs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

ENDPOINT="${ENDPOINT:-http://localhost:8090}"
ORG="${ORG:-testorg}"
PROJECT="${PROJECT:-testproject}"
DOMAIN="${DOMAIN:-development}"
LIMIT="${LIMIT:-10}"
TOKEN="${TOKEN:-}"

# List runs by project with basic pagination support
buf curl --schema . "$ENDPOINT/flyteidl2.workflow.RunService/ListRuns" --data @- <<EOF
{
"request": {
"limit": $LIMIT,
"token": "$TOKEN"
},
"project_id": {
"organization": "$ORG",
"name": "$PROJECT",
"domain": "$DOMAIN"
}
}
EOF
18 changes: 18 additions & 0 deletions runs/test/scripts/watch_actions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

ENDPOINT="${ENDPOINT:-http://localhost:8090}"
ORG="${ORG:-testorg}"
PROJECT="${PROJECT:-testproject}"
DOMAIN="${DOMAIN:-development}"
RUN_NAME="${RUN_NAME:?Error: RUN_NAME environment variable is required}"

buf curl --schema . "$ENDPOINT/flyteidl2.workflow.RunService/WatchActions" --data @- <<EOF
{
"run_id": {
"org": "$ORG",
"project": "$PROJECT",
"domain": "$DOMAIN",
"name": "$RUN_NAME"
}
}
EOF
24 changes: 24 additions & 0 deletions runs/test/scripts/watch_cluster_events.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

ENDPOINT="${ENDPOINT:-http://localhost:8090}"
ORG="${ORG:-testorg}"
PROJECT="${PROJECT:-testproject}"
DOMAIN="${DOMAIN:-development}"
RUN_NAME="${RUN_NAME:?Error: RUN_NAME environment variable is required}"
ACTION="${ACTION:-$RUN_NAME}"
ATTEMPT="${ATTEMPT:-1}"

buf curl --schema . "$ENDPOINT/flyteidl2.workflow.RunService/WatchClusterEvents" --data @- <<EOF
{
"id": {
"run": {
"org": "$ORG",
"project": "$PROJECT",
"domain": "$DOMAIN",
"name": "$RUN_NAME"
},
"name": "$ACTION"
},
"attempt": $ATTEMPT
}
EOF
40 changes: 40 additions & 0 deletions runs/test/scripts/watch_groups.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

ENDPOINT="${ENDPOINT:-http://localhost:8090}"
ORG="${ORG:-testorg}"
PROJECT="${PROJECT:-testproject}"
DOMAIN="${DOMAIN:-development}"
LIMIT="${LIMIT:-20}"
START_DATE="${START_DATE:-2026-01-01T00:00:00Z}"
END_DATE="${END_DATE:-}"

if [ -n "$END_DATE" ]; then
buf curl --schema . "$ENDPOINT/flyteidl2.workflow.RunService/WatchGroups" --data @- <<EOF
{
"project_id": {
"organization": "$ORG",
"name": "$PROJECT",
"domain": "$DOMAIN"
},
"start_date": "$START_DATE",
"end_date": "$END_DATE",
"request": {
"limit": $LIMIT
}
}
EOF
else
buf curl --schema . "$ENDPOINT/flyteidl2.workflow.RunService/WatchGroups" --data @- <<EOF
{
"project_id": {
"organization": "$ORG",
"name": "$PROJECT",
"domain": "$DOMAIN"
},
"start_date": "$START_DATE",
"request": {
"limit": $LIMIT
}
}
EOF
fi
18 changes: 18 additions & 0 deletions runs/test/scripts/watch_run_details.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

ENDPOINT="${ENDPOINT:-http://localhost:8090}"
ORG="${ORG:-testorg}"
PROJECT="${PROJECT:-testproject}"
DOMAIN="${DOMAIN:-development}"
RUN_NAME="${RUN_NAME:?Error: RUN_NAME environment variable is required}"

buf curl --schema . "$ENDPOINT/flyteidl2.workflow.RunService/WatchRunDetails" --data @- <<EOF
{
"run_id": {
"org": "$ORG",
"project": "$PROJECT",
"domain": "$DOMAIN",
"name": "$RUN_NAME"
}
}
EOF
25 changes: 25 additions & 0 deletions runs/test/scripts/watch_runs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

ENDPOINT="${ENDPOINT:-http://localhost:8090}"
ORG="${ORG:-testorg}"
PROJECT="${PROJECT:-testproject}"
DOMAIN="${DOMAIN:-development}"
SCOPE="${SCOPE:-project}" # project|org

if [ "$SCOPE" = "org" ]; then
buf curl --schema . "$ENDPOINT/flyteidl2.workflow.RunService/WatchRuns" --data @- <<EOF
{
"org": "$ORG"
}
EOF
else
buf curl --schema . "$ENDPOINT/flyteidl2.workflow.RunService/WatchRuns" --data @- <<EOF
{
"project_id": {
"organization": "$ORG",
"name": "$PROJECT",
"domain": "$DOMAIN"
}
}
EOF
fi