-
Notifications
You must be signed in to change notification settings - Fork 883
Description
Describe the bug
When moving (renaming the path of) an existing HTTP route via the Windmill web UI and then syncing with wmill sync pull or a Git sync pipeline, the old route file is not deleted from the local/git filesystem. This results in duplicate HTTP trigger definitions.
Pushing back to Windmill (via wmill sync push or a CI/CD pipeline) then fails with an ApiError because the original route still exists:
Bad request: A route already exists with this path
Example error from our pipeline
Creating new http trigger: f/endpoints/example_route
Bad request: A route already exists with this path
Server failed. Bad Request: Bad request: A route already exists with this path
file:///usr/local/lib/node_modules/windmill-cli/esm/gen/core/request.js:249
throw new ApiError(options, result, error);
^
ApiError: Bad Request
at catchErrorCodes (file:///usr/local/lib/node_modules/windmill-cli/esm/gen/core/request.js:249:15)
at file:///usr/local/lib/node_modules/windmill-cli/esm/gen/core/request.js:297:17
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
url: 'https://xxx/api/w/xxx/http_triggers/create',
status: 400,
statusText: 'Bad Request',
body: 'Bad request: A route already exists with this path',
request: {
method: 'POST',
url: '/w/{workspace}/http_triggers/create',
path: { workspace: 'xxx' },
body: {
summary: '',
description: '',
authentication_method: 'api_key',
authentication_resource_path: 'f/endpoints',
email: 'xxx',
http_method: 'post',
is_flow: false,
is_static_website: false,
mode: 'enabled',
raw_string: false,
request_type: 'sync',
route_path: 'connection_test',
route_path_key: 'connection_test',
script_path: 'u/tests/test_connection',
static_asset_config: null,
workspaced_route: false,
wrap_body: false,
path: 'f/endpoints/example_route'
},
mediaType: 'application/json'
}
}
Node.js v20.20.0
To reproduce
Prerequisite: Have an existing HTTP route configured in Windmill.
- Navigate to Custom HTTP Routes in the Windmill frontend.
- Change the
pathof a route (i.e. move thehttp_trigger.yamlto a new location) and save. - Run
wmill sync pullor trigger a Git sync — observe that both the old and the newhttp_trigger.yamlfiles now exist locally/in Git. - Push back to Windmill via
wmill sync pushor a CI/CD pipeline, the sync fails withApiError: Bad request: A route already exists with this path.
Expected behavior
When a route is moved/renamed in the web UI, the old HTTP trigger definition should be deleted so that a subsequent sync pull only contains the new route, and a round-trip push does not produce duplicates.
Screenshots
No response
Browser information
No response
Application version
Windmill EE v1.634.3
Additional Context
No response