Skip to content

Commit 2fa0717

Browse files
authored
Fix batch rerun not working on pg 14 (#5624)
* fix sql query for postgres 14 * deno_core when building backend image in github workflows * sqlx prepare --------- Co-authored-by: Diego Imbert <diego@windmill.dev>
1 parent 0811457 commit 2fa0717

File tree

5 files changed

+43
-23
lines changed

5 files changed

+43
-23
lines changed

.github/workflows/build-publish-rh-image.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
platforms: linux/amd64
6565
push: true
6666
build-args: |
67-
features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,license,otel,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,postgres_trigger,gcp_trigger,mqtt_trigger,websocket,smtp,static_frontend,all_languages
67+
features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,license,otel,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,postgres_trigger,gcp_trigger,mqtt_trigger,websocket,smtp,static_frontend,all_languages,deno_core
6868
secrets: |
6969
rh_username=${{ secrets.RH_USERNAME }}
7070
rh_password=${{ secrets.RH_PASSWORD }}
@@ -81,7 +81,7 @@ jobs:
8181
platforms: linux/arm64
8282
push: true
8383
build-args: |
84-
features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,license,otel,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,postgres_trigger,gcp_trigger,mqtt_trigger,websocket,smtp,static_frontend,all_languages
84+
features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,license,otel,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,postgres_trigger,gcp_trigger,mqtt_trigger,websocket,smtp,static_frontend,all_languages,deno_core
8585
secrets: |
8686
rh_username=${{ secrets.RH_USERNAME }}
8787
rh_password=${{ secrets.RH_PASSWORD }}
@@ -111,8 +111,7 @@ jobs:
111111
- uses: actions/upload-artifact@v4
112112
with:
113113
name: RHEL9-amd64 build
114-
path:
115-
${{ steps.extract-ee-amd64.outputs.destination
114+
path: ${{ steps.extract-ee-amd64.outputs.destination
116115
}}/windmill-ee-amd64-rhel9
117116

118117
# - uses: actions/upload-artifact@v4

.github/workflows/docker-image-rpi4.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
platforms: linux/amd64,linux/arm64
6868
push: true
6969
build-args: |
70-
features=embedding,parquet,openidconnect,license,http_trigger,zip,oauth2,postgres_trigger,mqtt_trigger,websocket,smtp,static_frontend,all_languages
70+
features=embedding,parquet,openidconnect,license,http_trigger,zip,oauth2,postgres_trigger,mqtt_trigger,websocket,smtp,static_frontend,all_languages,deno_core
7171
tags: |
7272
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev
7373
${{ steps.meta-public.outputs.tags }}

.github/workflows/docker-image.yml

+10-16
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
env:
22
REGISTRY: ghcr.io
3-
IMAGE_NAME:
4-
${{ github.event_name != 'pull_request' && github.event_name !=
3+
IMAGE_NAME: ${{ github.event_name != 'pull_request' && github.event_name !=
54
'workflow_dispatch' && github.repository || 'windmill-labs/windmill-test' }}
6-
DEV_SHA:
7-
${{ github.event_name != 'pull_request' && github.event_name !=
5+
DEV_SHA: ${{ github.event_name != 'pull_request' && github.event_name !=
86
'workflow_dispatch' && 'dev' || github.event.inputs.tag || github.sha }}
97
name: Build windmill:main
108
on:
@@ -40,8 +38,7 @@ permissions: write-all
4038
jobs:
4139
build:
4240
runs-on: ubicloud
43-
if:
44-
(github.event_name != 'workflow_dispatch') || (github.event.inputs &&
41+
if: (github.event_name != 'workflow_dispatch') || (github.event.inputs &&
4542
!github.event.inputs.ee)
4643
steps:
4744
- uses: actions/checkout@v4
@@ -95,7 +92,7 @@ jobs:
9592
platforms: linux/amd64,linux/arm64
9693
push: true
9794
build-args: |
98-
features=embedding,parquet,openidconnect,jemalloc,license,http_trigger,zip,oauth2,dind,postgres_trigger,mqtt_trigger,websocket,smtp,static_frontend,agent_worker_server,all_languages
95+
features=embedding,parquet,openidconnect,jemalloc,license,http_trigger,zip,oauth2,dind,postgres_trigger,mqtt_trigger,websocket,smtp,static_frontend,agent_worker_server,all_languages,deno_core
9996
tags: |
10097
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.DEV_SHA }}
10198
${{ steps.meta-public.outputs.tags }}
@@ -157,7 +154,7 @@ jobs:
157154
platforms: linux/amd64,linux/arm64
158155
push: true
159156
build-args: |
160-
features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,agent_worker_server,tantivy,license,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,otel,dind,postgres_trigger,mqtt_trigger,gcp_trigger,websocket,smtp,static_frontend,all_languages
157+
features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,agent_worker_server,tantivy,license,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,otel,dind,postgres_trigger,mqtt_trigger,gcp_trigger,websocket,smtp,static_frontend,all_languages,deno_core
161158
tags: |
162159
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:${{ env.DEV_SHA }}
163160
${{ steps.meta-ee-public.outputs.tags }}
@@ -315,7 +312,7 @@ jobs:
315312
needs: [run_integration_test, build]
316313
if:
317314
github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' ||
318-
startsWith(github.ref, 'refs/tags/v')) && (github.event_name != 'workflow_dispatch')
315+
startsWith(github.ref, 'refs/tags/v')) && (github.event_name != 'workflow_dispatch')
319316
steps:
320317
- uses: actions/checkout@v4
321318
with:
@@ -355,7 +352,7 @@ jobs:
355352
verify_ee_image_vulnerabilities:
356353
runs-on: ubicloud
357354
needs: [tag_latest_ee]
358-
if: startsWith(github.ref, 'refs/tags/v') && (github.event_name != 'workflow_dispatch')
355+
if: startsWith(github.ref, 'refs/tags/v') && (github.event_name != 'workflow_dispatch')
359356
steps:
360357
- name: Checkout code
361358
uses: actions/checkout@v4
@@ -397,8 +394,7 @@ jobs:
397394
build_ee_nsjail:
398395
needs: [build_ee]
399396
runs-on: ubicloud
400-
if:
401-
(github.event_name != 'pull_request') && ((github.event_name != 'workflow_dispatch') || (github.event.inputs.ee || github.event.inputs.nsjail))
397+
if: (github.event_name != 'pull_request') && ((github.event_name != 'workflow_dispatch') || (github.event.inputs.ee || github.event.inputs.nsjail))
402398

403399
steps:
404400
- uses: actions/checkout@v4
@@ -437,7 +433,7 @@ jobs:
437433
run: |
438434
sed -i 's|FROM ghcr.io/windmill-labs/windmill-ee:dev|FROM ghcr.io/${{ env.IMAGE_NAME }}-ee:${{ env.DEV_SHA }}|' ./docker/DockerfileNsjail
439435
cat ./docker/DockerfileNsjail | grep "FROM"
440-
436+
441437
- name: Build and push publicly ee
442438
uses: depot/build-push-action@v1
443439
with:
@@ -451,12 +447,10 @@ jobs:
451447
${{ steps.meta-ee-public.outputs.labels }}
452448
org.opencontainers.image.licenses=Windmill-Enterprise-License
453449
454-
455450
publish_ecr_s3:
456451
needs: [build_ee_nsjail]
457452
runs-on: ubicloud-standard-2-arm
458-
if:
459-
(github.event_name != 'pull_request') && (github.event_name !=
453+
if: (github.event_name != 'pull_request') && (github.event_name !=
460454
'workflow_dispatch')
461455
env:
462456
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}

backend/.sqlx/query-264da6a89d005aebf4d5cd5f05e70fcffccd5fae8e2e352de3e1eb104e7fc3a6.json

+23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/windmill-api/src/jobs.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ async fn list_selected_job_groups(
681681
SELECT jsonb_build_object(
682682
'script_hash', LPAD(TO_HEX(COALESCE(s.hash, f.id)), 16, '0'),
683683
'job_ids', ARRAY_AGG(DISTINCT j.id),
684-
'schema', ANY_VALUE(COALESCE(s.schema, f.schema))
684+
'schema', (ARRAY_AGG(COALESCE(s.schema, f.schema)))[1]
685685
) FROM v2_job j
686686
LEFT JOIN script s ON s.hash = j.runnable_id AND j.kind = 'script'
687687
LEFT JOIN flow_version f ON f.id = j.runnable_id AND j.kind = 'flow'
@@ -3441,7 +3441,11 @@ async fn batch_rerun_handle_job(
34413441
}
34423442
InputTransform::Javascript { expr } => {
34433443
#[cfg(not(feature = "deno_core"))]
3444-
tracing::error!("deno_core feature is not activated, cannot evaluate: {expr}");
3444+
Err(error::Error::ExecutionErr(
3445+
format!("deno_core feature is not activated, cannot evaluate: {expr}")
3446+
.to_string(),
3447+
))?;
3448+
34453449
#[cfg(feature = "deno_core")]
34463450
args.insert(
34473451
property_name.clone(),

0 commit comments

Comments
 (0)