Skip to content

Commit d4e23ca

Browse files
committed
fix(workflows): preserve comparison semantics and preview ports
1 parent 580f1bd commit d4e23ca

40 files changed

Lines changed: 2079 additions & 427 deletions

‎.github/workflows/test-build.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ jobs:
201201
if-no-files-found: ignore
202202
retention-days: 7
203203

204-
- name: Verify SCIM and administration over real HTTP
204+
- name: Verify SCIM, administration and workflow comparisons over real HTTP
205205
working-directory: apps/sim
206206
env:
207207
NEXT_PUBLIC_APP_URL: http://127.0.0.1:3017
@@ -249,14 +249,20 @@ jobs:
249249
SCIM_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \
250250
SCIM_E2E_REPORT_PATH="$RUNNER_TEMP/scim-e2e-report.json" \
251251
bun run test:scim:e2e
252+
VERSION_COMPARE_E2E_BASE_URL="$NEXT_PUBLIC_APP_URL" \
253+
VERSION_COMPARE_E2E_DATABASE_URL="$DATABASE_URL" \
254+
VERSION_COMPARE_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \
255+
VERSION_COMPARE_E2E_REPORT_PATH="$RUNNER_TEMP/version-compare-http-report.json" \
256+
bun run test:workflow-version-compare:e2e
252257
253-
- name: Upload SCIM failure report and HTTP status log
258+
- name: Upload HTTP acceptance failure reports and status log
254259
if: failure()
255260
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
256261
with:
257262
name: scim-failure-${{ matrix.provision }}
258263
path: |
259264
${{ runner.temp }}/scim-e2e-report.json
265+
${{ runner.temp }}/version-compare-http-report.json
260266
${{ runner.temp }}/scim-http-status.log
261267
if-no-files-found: ignore
262268
retention-days: 7

‎apps/docs/openapi-v2-workflows.json‎

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@
12041204
"get": {
12051205
"operationId": "compareWorkflowVersionsV2",
12061206
"summary": "Compare Workflow Versions",
1207-
"description": "Compare two deployment versions of the same workflow. Reports semantic changes, excluding canvas layout; credential-bearing values are withheld while their changes remain visible. The combined snapshots must fit within 16 MiB.\n\nOAuth scope: `api:read`.",
1207+
"description": "Compare two deployment versions of the same workflow. Reports semantic changes, excluding canvas layout; credential-bearing values are withheld while their changes remain visible. Connections include stable block and port identifiers. The combined snapshots and the comparison result must each fit within 16 MiB.\n\nOAuth scope: `api:read`.",
12081208
"x-sim-operation": "workflows.versions.compare",
12091209
"x-oauth-scope": "api:read",
12101210
"tags": ["Workflows"],
@@ -9480,6 +9480,22 @@
94809480
"items": {
94819481
"type": "object",
94829482
"properties": {
9483+
"source": {
9484+
"type": "string",
9485+
"description": "Stable source block identifier."
9486+
},
9487+
"target": {
9488+
"type": "string",
9489+
"description": "Stable target block identifier."
9490+
},
9491+
"sourceHandle": {
9492+
"description": "Source port identifier; omitted for the default port.",
9493+
"type": "string"
9494+
},
9495+
"targetHandle": {
9496+
"description": "Target port identifier; omitted for the default port.",
9497+
"type": "string"
9498+
},
94839499
"sourceName": {
94849500
"type": "string",
94859501
"description": "Source block name."
@@ -9489,7 +9505,7 @@
94899505
"description": "Target block name."
94909506
}
94919507
},
9492-
"required": ["sourceName", "targetName"],
9508+
"required": ["source", "target", "sourceName", "targetName"],
94939509
"additionalProperties": false
94949510
},
94959511
"description": "Added connections."
@@ -9499,6 +9515,22 @@
94999515
"items": {
95009516
"type": "object",
95019517
"properties": {
9518+
"source": {
9519+
"type": "string",
9520+
"description": "Stable source block identifier."
9521+
},
9522+
"target": {
9523+
"type": "string",
9524+
"description": "Stable target block identifier."
9525+
},
9526+
"sourceHandle": {
9527+
"description": "Source port identifier; omitted for the default port.",
9528+
"type": "string"
9529+
},
9530+
"targetHandle": {
9531+
"description": "Target port identifier; omitted for the default port.",
9532+
"type": "string"
9533+
},
95029534
"sourceName": {
95039535
"type": "string",
95049536
"description": "Source block name."
@@ -9508,7 +9540,7 @@
95089540
"description": "Target block name."
95099541
}
95109542
},
9511-
"required": ["sourceName", "targetName"],
9543+
"required": ["source", "target", "sourceName", "targetName"],
95129544
"additionalProperties": false
95139545
},
95149546
"description": "Removed connections."

‎apps/sim/app/api/workflows/[id]/deployments/[version]/route.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export const GET = defineInternalJsonRoute({
4949
workflowId: params.id,
5050
version: params.version,
5151
includeCredentialValues: true,
52+
representation: 'comparison' as const,
5253
}),
5354
present: ({ version }) => ({ deployedState: version.state }),
5455
})

0 commit comments

Comments
 (0)