-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SlackIncomingWebhook task with misconfigured payload crashed my kestra container #183
Comments
Hello @anna-geller,
But I am noticing that with the function
There's maybe a way to extract the content like with this flow for example :
|
Here's an other flow example when we loop through the errors and create a new section in the slack message for each error. Notes:
|
yup you're totally right here — the main part why I put it in 0.20 is the fact that this error crashed my kestra container. Seems destructive - maybe there's a way to "JSONify" the payload automatically by the plugin regardless of what the user provided? or add some other guardrail to ensure that whatever user entered under the payload won't crash the instance? for now moved to 0.21 as I'm aware you have a lot of work remaining with dynamic properties |
Describe the issue
Reproducer:
Logs
2024-11-26 02:02:03,811 INFO worker_38 flow.error_logs_demo.fail [namespace: company.team] [flow: error_logs_demo] [task: fail] [execution: 3nrh5qwQBythe1eAwaqrFA] [taskrun: 1mrptqL9E6ZrICgbPCrdda] Type Fail started 2024-11-26 02:02:03,835 ERROR worker_38 f.e.3.1mrptqL9E6ZrICgbPCrdda Something went wrong java.lang.Exception: Something went wrong at io.kestra.plugin.core.execution.Fail.run(Fail.java:115) at io.kestra.plugin.core.execution.Fail.run(Fail.java:19) at io.kestra.core.runners.WorkerTaskCallable.doCall(WorkerTaskCallable.java:78) at io.kestra.core.runners.AbstractWorkerCallable.call(AbstractWorkerCallable.java:56) at io.kestra.core.runners.WorkerSecurityService.callInSecurityContext(WorkerSecurityService.java:10) at io.kestra.core.runners.Worker.callJob(Worker.java:769) at io.kestra.core.runners.Worker.runAttempt(Worker.java:728) at io.kestra.core.runners.Worker.run(Worker.java:579) at io.kestra.core.runners.Worker.handleTask(Worker.java:284) at io.kestra.core.runners.Worker.lambda$run$7(Worker.java:240) at io.micrometer.core.instrument.internal.TimedRunnable.run(TimedRunnable.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) 2024-11-26 02:02:03,840 INFO worker_38 flow.error_logs_demo.fail [namespace: company.team] [flow: error_logs_demo] [task: fail] [execution: 3nrh5qwQBythe1eAwaqrFA] [taskrun: 1mrptqL9E6ZrICgbPCrdda] Type Fail with state RUNNING completed in 00:00:00.253 2024-11-26 02:02:04,639 INFO worker_39 flow.error_logs_demo.alert [namespace: company.team] [flow: error_logs_demo] [task: alert] [execution: 3nrh5qwQBythe1eAwaqrFA] [taskrun: 7v7PGRfrrgzhXn9fjv87G] Type SlackIncomingWebhook started 2024-11-26 02:02:05,180 ERROR worker_39 f.e.3.7v7PGRfrrgzhXn9fjv87G <title>Error</title>io.micronaut.http.client.exceptions.HttpClientResponseException:
<title>Error</title>2024-11-26 02:02:05,182 INFO worker_39 flow.error_logs_demo.alert [namespace: company.team] [flow: error_logs_demo] [task: alert] [execution: 3nrh5qwQBythe1eAwaqrFA] [taskrun: 7v7PGRfrrgzhXn9fjv87G] Type SlackIncomingWebhook with state RUNNING completed in 00:00:00.015
2024-11-26 02:02:05,232 INFO jdbc-queue-Execution_0 flow.error_logs_demo [namespace: company.team] [flow: error_logs_demo] [execution: 3nrh5qwQBythe1eAwaqrFA] Flow completed with state FAILED in 00:00:01.832
2024-11-26 02:02:05,241 ERROR jdbc-queue-Execution_0 .c.u.ThreadUncaughtExceptionHandlers Caught an exception in Thread[#78,jdbc-queue-Execution_0,5,main]. Shutting down.
org.jooq.exception.IntegrityConstraintViolationException: SQL [insert into multipleconditions ("key", "value") values (?, ?)]; NULL not allowed for column "condition_id"; SQL statement:
insert into multipleconditions ("key", "value") values (?, ?) [23502-232]
at org.jooq_3.19.14.H2.debug(Unknown Source)
at org.jooq.impl.Tools.translate(Tools.java:3638)
at org.jooq.impl.Tools.translate(Tools.java:3628)
at org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:827)
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:362)
at org.jooq.impl.AbstractDelegatingQuery.execute(AbstractDelegatingQuery.java:115)
at io.kestra.repository.h2.H2Repository.persistInternal(H2Repository.java:62)
at io.kestra.repository.h2.H2Repository.persist(H2Repository.java:47)
at io.kestra.jdbc.runner.AbstractJdbcMultipleConditionStorage.lambda$save$2(AbstractJdbcMultipleConditionStorage.java:75)
at java.base/java.util.ArrayList.forEach(Unknown Source)
at io.kestra.jdbc.runner.AbstractJdbcMultipleConditionStorage.lambda$save$3(AbstractJdbcMultipleConditionStorage.java:73)
at org.jooq.impl.DefaultDSLContext.lambda$transaction$5(DefaultDSLContext.java:592)
at org.jooq.impl.DefaultDSLContext.lambda$transactionResult0$3(DefaultDSLContext.java:530)
at org.jooq.impl.Tools$3$1.block(Tools.java:6369)
at java.base/java.util.concurrent.ForkJoinPool.unmanagedBlock(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.managedBlock(Unknown Source)
at org.jooq.impl.Tools$3.get(Tools.java:6366)
at org.jooq.impl.DefaultDSLContext.transactionResult0(DefaultDSLContext.java:578)
at org.jooq.impl.DefaultDSLContext.transactionResult(DefaultDSLContext.java:502)
at org.jooq.impl.DefaultDSLContext.transaction(DefaultDSLContext.java:591)
at io.kestra.jdbc.JooqDSLContextWrapper.lambda$transaction$1(JooqDSLContextWrapper.java:58)
at dev.failsafe.Functions.lambda$toCtxSupplier$11(Functions.java:243)
at dev.failsafe.Functions.lambda$get$0(Functions.java:46)
at dev.failsafe.internal.RetryPolicyExecutor.lambda$apply$0(RetryPolicyExecutor.java:74)
at dev.failsafe.internal.FallbackExecutor.lambda$apply$0(FallbackExecutor.java:51)
at dev.failsafe.SyncExecutionImpl.executeSync(SyncExecutionImpl.java:187)
at dev.failsafe.FailsafeExecutor.call(FailsafeExecutor.java:376)
at dev.failsafe.FailsafeExecutor.get(FailsafeExecutor.java:112)
at io.kestra.core.utils.RetryUtils$Instance.wrap(RetryUtils.java:144)
at io.kestra.core.utils.RetryUtils$Instance.runRetryIf(RetryUtils.java:103)
at io.kestra.jdbc.JooqDSLContextWrapper.transaction(JooqDSLContextWrapper.java:55)
at io.kestra.jdbc.runner.AbstractJdbcMultipleConditionStorage.save(AbstractJdbcMultipleConditionStorage.java:69)
at io.kestra.core.services.FlowTriggerService.computeExecutionsFromFlowTriggers(FlowTriggerService.java:110)
at io.kestra.jdbc.runner.JdbcExecutor.toExecution(JdbcExecutor.java:903)
at io.kestra.jdbc.runner.JdbcExecutor.toExecution(JdbcExecutor.java:864)
at io.kestra.jdbc.runner.JdbcExecutor.executionQueue(JdbcExecutor.java:570)
at java.base/java.util.ArrayList.forEach(Unknown Source)
at io.kestra.jdbc.runner.JdbcQueue.lambda$receive$7(JdbcQueue.java:264)
at io.kestra.jdbc.runner.JdbcQueue.lambda$receiveImpl$11(JdbcQueue.java:333)
at io.kestra.jdbc.runner.JdbcQueue.lambda$poll$12(JdbcQueue.java:356)
at io.micrometer.core.instrument.internal.TimedRunnable.run(TimedRunnable.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: NULL not allowed for column "condition_id"; SQL statement:
insert into multipleconditions ("key", "value") values (?, ?) [23502-232]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:520)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:489)
at org.h2.message.DbException.get(DbException.java:223)
at org.h2.message.DbException.get(DbException.java:199)
at org.h2.table.Column.validateConvertUpdateSequence(Column.java:402)
at org.h2.table.Table.convertInsertRow(Table.java:972)
at org.h2.command.dml.Insert.insertRows(Insert.java:167)
at org.h2.command.dml.Insert.update(Insert.java:135)
at org.h2.command.dml.DataChangeStatement.update(DataChangeStatement.java:74)
at org.h2.command.CommandContainer.update(CommandContainer.java:139)
at org.h2.command.Command.executeUpdate(Command.java:304)
at org.h2.command.Command.executeUpdate(Command.java:248)
at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:262)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
at org.jooq.tools.jdbc.DefaultPreparedStatement.execute(DefaultPreparedStatement.java:219)
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:458)
at org.jooq.impl.AbstractDMLQuery.execute(AbstractDMLQuery.java:1068)
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:348)
... 39 common frames omitted
2024-11-26 02:02:05,250 INFO default-nioEventLoopGroup-1-9 io.kestra.webserver.access 2024-11-26T02:02:03.462Z | GET /api/v1/executions/3nrh5qwQBythe1eAwaqrFA/follow HTTP/1.1 | status: 200 | ip: 172.17.0.1 | length: 928 | duration: 1787
2024-11-26 02:02:06,288 INFO jdbc-queue-Execution_0 io.kestra.core.runners.Worker All working threads are terminated.
2024-11-26 02:02:06,292 WARN jdbc-queue-Execution_0 i.k.c.server.ServiceLivenessManager Failed to transition service [id=5DCCZb8IF87z7AN0xXQ7M6, type=INDEXER, hostname=1dbfe40e9dd7] from TERMINATED_GRACEFULLY to TERMINATING. Cause: Invalid transition.
2024-11-26 02:02:06,293 ERROR jdbc-queue-Execution_0 i.k.c.server.ServiceLivenessManager [Service id=5DCCZb8IF87z7AN0xXQ7M6, type=INDEXER, hostname=1dbfe40e9dd7] Termination already completed (TERMINATED_GRACEFULLY). This error may occur if the service has already been evicted by Kestra due to a prior error.
2024-11-26 02:02:06,331 WARN command-shutdown io.kestra.cli.AbstractCommand Receiving shutdown ! Try to graceful exit
2024-11-26 02:02:06,331 WARN command-shutdown io.kestra.cli.AbstractCommand Receiving shutdown ! Try to graceful exit
2024-11-26 02:02:06,331 INFO command-shutdown i.kestra.core.contexts.KestraContext Kestra server - Shutdown initiated
2024-11-26 02:02:06,332 INFO command-shutdown i.kestra.core.contexts.KestraContext Kestra server - Shutdown completed
➜ ~
Environment
The text was updated successfully, but these errors were encountered: