From 5ccaae8ab36f2be18b67863ea069763455908029 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 15 Jun 2026 20:04:43 +0200 Subject: [PATCH] fix: resolve release CI failures (pypi bundle, flow serde test, cli windows) (#9595) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three independent failures on the latest release commit: - pypi (Publish python-client): the `UserDraftOverlay`/`UserDraftItemKind` schema definitions were placed inside the `# -- INLINE START/END --` markers in openapi.yaml. The python-client build replaces that whole block with a wildcard import of `openflow.openapi.yaml`'s schemas, which do not define these two, so every `$ref` to them became unresolvable and the redocly bundle aborted. Move both definitions outside the markers — they are windmill-api schemas, not openflow-mirrored ones. - flows::tests::flowmodule_serde: the expected JSON still carried `"error_message": null` in three `stop_after_if` blocks, but StopAfterIf.error_message is now skipped when None. Drop those keys. - CLI Tests (test-windows): preservePendingScriptLocks mixed the OS path separator (SEP) into map keys that are always forward-slash normalized, so on Windows the multi-module suffix match and the lock-file lookup both failed. Use forward slashes consistently; this also fixes real Windows git-sync deploys, not just the test. Co-authored-by: Claude Opus 4.8 (1M context) --- backend/windmill-api-flows/src/flows.rs | 9 +++------ backend/windmill-api/openapi.yaml | 4 ++-- cli/src/commands/sync/sync.ts | 9 +++++---- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/backend/windmill-api-flows/src/flows.rs b/backend/windmill-api-flows/src/flows.rs index 652d22bed0..b5f8e2f285 100644 --- a/backend/windmill-api-flows/src/flows.rs +++ b/backend/windmill-api-flows/src/flows.rs @@ -2109,8 +2109,7 @@ mod tests { }, "stop_after_if": { "expr": "foo = 'bar'", - "skip_if_stopped": false, - "error_message": null + "skip_if_stopped": false } }, { @@ -2131,8 +2130,7 @@ mod tests { }, "stop_after_if": { "expr": "previous.isEmpty()", - "skip_if_stopped": false, - "error_message": null + "skip_if_stopped": false } } ], @@ -2145,8 +2143,7 @@ mod tests { }, "stop_after_if": { "expr": "previous.isEmpty()", - "skip_if_stopped": false, - "error_message": null + "skip_if_stopped": false } }, }); diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 0ef88e96fe..4ba9f4e734 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -21167,8 +21167,6 @@ components: # NOTE: Not so many generators and validators support this format: # $ref: "../../openflow.openapi.yaml#/components/schemas" # This is why it is better to inline each of schemas for better compat - # Do not change next line. It is used by python-client for pre-processing - # -- INLINE START -- UserDraftOverlay: type: object description: | @@ -21244,6 +21242,8 @@ components: - trigger_nextcloud - trigger_google - trigger_github + # Do not change next line. It is used by python-client for pre-processing + # -- INLINE START -- OpenFlow: $ref: "../../openflow.openapi.yaml#/components/schemas/OpenFlow" FlowValue: diff --git a/cli/src/commands/sync/sync.ts b/cli/src/commands/sync/sync.ts index 594fbeb43c..e0e4e73659 100644 --- a/cli/src/commands/sync/sync.ts +++ b/cli/src/commands/sync/sync.ts @@ -2099,7 +2099,8 @@ export function preservePendingScriptLocks( ): void { // A multi-module script keeps its metadata in the folder layout // `…__mod/script.{yaml,json}` instead of `….script.{yaml,json}`. - const modMeta = getModuleFolderSuffix() + SEP + "script"; + // Map keys are always forward-slash normalized, on every platform. + const modMeta = getModuleFolderSuffix() + "/script"; for (const metaKey of Object.keys(remote)) { const isYaml = metaKey.endsWith(".script.yaml") || metaKey.endsWith(modMeta + ".yaml"); @@ -2134,9 +2135,9 @@ export function preservePendingScriptLocks( // Derive the lock-file key from the `!inline` reference itself, not from the // metadata path: a multi-module script keeps its lock at `…__mod/script.lock`, - // which a `.script.yaml -> .script.lock` rewrite would miss. The reference is - // always forward-slash; map keys use the OS separator. - const lockKey = localLock.slice("!inline ".length).replaceAll("/", SEP); + // which a `.script.yaml -> .script.lock` rewrite would miss. The reference and + // the map keys are both forward-slash, so no separator rewrite is needed. + const lockKey = localLock.slice("!inline ".length); if (local[lockKey] === undefined) continue; // committed lock already gone remoteParsed["lock"] = localLock;