Compare commits

...

47 Commits

Author SHA1 Message Date
YannC.
d2409aa538 fix: display check error message when an execution is blocked
close #13854
2025-12-29 17:21:35 +01:00
brian.mulier
b8a363d315 fix(core): JDBC Executor will consume executions from queue per executionId in order 2025-12-29 16:04:54 +01:00
Mustafa Tarek
bd582a5a45 fix(core): remove tenantId substring check on file path (#13778)
* fix(core): remove tenantId substring check on file path

* chore(core): extract namespace extraction from file URI to  function to facilitate testing

* feat(tests): add test coverage for namespace extraction from file URI

* chore(tests): remove redundant test added

* feat(tests): enhance assertions at namespaceFromURI() test
2025-12-29 15:28:37 +01:00
Georg Traar
a254de0d0d fix(ui): Drop "Administration" from Instance and Tenant (#13864) 2025-12-29 14:43:37 +01:00
Loïc Mathieu
1b74842485 feat(system): replace our SecurityManager by a Java agent
Part-of: https://github.com/kestra-io/kestra-ee/pull/6153
2025-12-29 14:23:22 +01:00
Nicolas K.
b178483dd3 feat(execution): normalize restart behavior (#13858)
Co-authored-by: nKwiatkowski <nkwiatkowski@kestra.io>
2025-12-29 14:01:42 +01:00
Miloš Paunović
7552bdb3a1 chore(core): add missing translation key/value pair (#13859) 2025-12-29 13:09:42 +01:00
Miloš Paunović
f1bdcd6662 refactor(executions): improve execution ts types (#13855) 2025-12-29 11:10:07 +01:00
ben8t
dc37112c1d chore(executions): rearrange sections on the overview page (#13853)
Co-authored-by: Miloš Paunović <paun992@hotmail.com>
2025-12-29 10:58:35 +01:00
Sumit Shandillya
4733f7eb8a chore(core): hide chart y-axis labels on small screens (#13850)
Closes https://github.com/kestra-io/kestra/issues/12754.

Signed-off-by: Sumitsh28 <sumit.off28@gmail.com>
Co-authored-by: Miloš Paunović <paun992@hotmail.com>
2025-12-29 10:54:19 +01:00
YannC
135a9fcdaa feat: allow to logs all files that are migrated (#13851) 2025-12-29 10:49:32 +01:00
dependabot[bot]
39b83b343c build(deps): bump com.github.oshi:oshi-core from 6.9.1 to 6.9.2
Bumps [com.github.oshi:oshi-core](https://github.com/oshi/oshi) from 6.9.1 to 6.9.2.
- [Release notes](https://github.com/oshi/oshi/releases)
- [Changelog](https://github.com/oshi/oshi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/oshi/oshi/compare/oshi-parent-6.9.1...oshi-parent-6.9.2)

---
updated-dependencies:
- dependency-name: com.github.oshi:oshi-core
  dependency-version: 6.9.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-29 10:46:32 +01:00
dependabot[bot]
b169f4812a build(deps): bump org.sonarqube from 7.2.1.6560 to 7.2.2.6593
Bumps org.sonarqube from 7.2.1.6560 to 7.2.2.6593.

---
updated-dependencies:
- dependency-name: org.sonarqube
  dependency-version: 7.2.2.6593
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-29 10:46:04 +01:00
dependabot[bot]
b3b3e40e53 build(deps): bump software.amazon.awssdk:bom from 2.40.10 to 2.40.15
Bumps software.amazon.awssdk:bom from 2.40.10 to 2.40.15.

---
updated-dependencies:
- dependency-name: software.amazon.awssdk:bom
  dependency-version: 2.40.15
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-29 10:44:38 +01:00
Mustafa Tarek
506d7ae697 chore(core): Optimize lastAttempt() by avoiding stream reduction 2025-12-29 10:25:04 +01:00
yuri1969
fc3a0fbc33 chore(test): resolve Mockito JDK21 warning
https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3
2025-12-29 10:14:31 +01:00
Hritik Raj
0b55f5531b fix(execution): prevent NPE in SetVariables when variables are null (#13776)
* fix(execution): prevent NPE in SetVariables when variables are null

* fix(trigger): initialize execution variables for webhook triggers

* chore: minimize diff and use emptyMap for null execution variables

---------

Co-authored-by: Miloš Paunović <paun992@hotmail.com>
2025-12-29 10:05:27 +01:00
Georg Traar
16b6a82420 feat(ui): Seperate general and optional task properties in No Code Editor (#13799)
Co-authored-by: Georg Traar <georg@kestra.io>
Co-authored-by: Miloš Paunović <paun992@hotmail.com>
2025-12-29 09:29:15 +01:00
github-actions[bot]
2fcbf72b34 chore(core): localize to languages other than english (#13849)
Extended localization support by adding translations for multiple languages using English as the base. This enhances accessibility and usability for non-English-speaking users while keeping English as the source reference.

Co-authored-by: GitHub Action <actions@github.com>
2025-12-29 08:37:49 +01:00
Siddhant Sonawane
801e347b11 chore(executions): introduce translation key/value pairs for the new replay dialog (#13704)
Related to https://github.com/kestra-io/kestra/issues/13647.

Co-authored-by: MilosPaunovic <paun992@hotmail.com>
2025-12-29 08:34:59 +01:00
Miloš Paunović
83adc8ce57 fix(namespaces): prevent users from opening creation page on open source edition (#13841)
Closes https://github.com/kestra-io/kestra/issues/13110.
2025-12-26 13:14:22 +01:00
Miloš Paunović
cb31e48f4f chore(core): improve file organization in .github folder (#13836) 2025-12-25 16:00:11 +01:00
Miloš Paunović
a3f96a2741 chore(core): make left menu appear as overlay on small screens (#13834)
Closes https://github.com/kestra-io/kestra/issues/1425.
Closes https://github.com/kestra-io/kestra/issues/13502.
Closes https://github.com/kestra-io/kestra/issues/13503.
Closes https://github.com/kestra-io/kestra/issues/13504.
Closes https://github.com/kestra-io/kestra/issues/13505.
Closes https://github.com/kestra-io/kestra/issues/13506.
Closes https://github.com/kestra-io/kestra/issues/13507.
Closes https://github.com/kestra-io/kestra/issues/13508.
Closes https://github.com/kestra-io/kestra/issues/13510.
Closes https://github.com/kestra-io/kestra/issues/13511.
Closes https://github.com/kestra-io/kestra/issues/13512.
Closes https://github.com/kestra-io/kestra/issues/13513.
Closes https://github.com/kestra-io/kestra/issues/13514.
Closes https://github.com/kestra-io/kestra/issues/13516.
2025-12-25 14:29:56 +01:00
Miloš Paunović
5ca6fa8d77 fix(secrets): mark secret field required during creation (#13833)
Closes https://github.com/kestra-io/kestra-ee/issues/6209.
2025-12-25 10:54:55 +01:00
Miloš Paunović
a3a206f3c4 chore(core): polishing of templated blueprints ui (#13806)
Related to https://github.com/kestra-io/kestra-ee/pull/6201.

Closes https://github.com/kestra-io/kestra-ee/issues/6179.
2025-12-25 09:06:49 +01:00
aflahaa
31f1e505e3 refactor(core): remove usage of unnecessary i18n composable (#13826)
Closes https://github.com/kestra-io/kestra/issues/13350.

Co-authored-by: MilosPaunovic <paun992@hotmail.com>
2025-12-24 12:56:51 +01:00
YannC
75e0c1d11f fix: updated the package-lock.json after dependencies upgrade (#13825) 2025-12-24 10:43:09 +01:00
dependabot[bot]
4cf883877d build(deps): bump the minor group in /ui with 4 updates (#13821)
Bumps the minor group in /ui with 4 updates: [element-plus](https://github.com/element-plus/element-plus), [posthog-js](https://github.com/PostHog/posthog-js), [rolldown-vite](https://github.com/vitejs/rolldown-vite/tree/HEAD/packages/vite) and [vue-tsc](https://github.com/vuejs/language-tools/tree/HEAD/packages/tsc).


Updates `element-plus` from 2.12.0 to 2.13.0
- [Release notes](https://github.com/element-plus/element-plus/releases)
- [Changelog](https://github.com/element-plus/element-plus/blob/dev/CHANGELOG.en-US.md)
- [Commits](https://github.com/element-plus/element-plus/compare/2.12.0...2.13.0)

Updates `posthog-js` from 1.308.0 to 1.310.1
- [Release notes](https://github.com/PostHog/posthog-js/releases)
- [Changelog](https://github.com/PostHog/posthog-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/PostHog/posthog-js/compare/posthog-js@1.308.0...posthog-js@1.310.1)

Updates `rolldown-vite` from 7.2.11 to 7.3.0
- [Release notes](https://github.com/vitejs/rolldown-vite/releases)
- [Changelog](https://github.com/vitejs/rolldown-vite/blob/rolldown-vite/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/rolldown-vite/commits/v7.3.0/packages/vite)

Updates `vue-tsc` from 3.1.8 to 3.2.1
- [Release notes](https://github.com/vuejs/language-tools/releases)
- [Changelog](https://github.com/vuejs/language-tools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vuejs/language-tools/commits/v3.2.1/packages/tsc)

---
updated-dependencies:
- dependency-name: element-plus
  dependency-version: 2.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor
- dependency-name: posthog-js
  dependency-version: 1.310.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor
- dependency-name: rolldown-vite
  dependency-version: 7.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor
- dependency-name: vue-tsc
  dependency-version: 3.2.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Miloš Paunović <paun992@hotmail.com>
2025-12-24 08:53:14 +01:00
dependabot[bot]
87b1e8fb01 build(deps): bump the patch group in /ui with 7 updates (#13822)
Bumps the patch group in /ui with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [@vue-flow/core](https://github.com/bcakmakoglu/vue-flow/tree/HEAD/packages/core) | `1.48.0` | `1.48.1` |
| [vue](https://github.com/vuejs/core) | `3.5.25` | `3.5.26` |
| [vue-i18n](https://github.com/intlify/vue-i18n/tree/HEAD/packages/vue-i18n) | `11.2.2` | `11.2.7` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.50.0` | `8.50.1` |
| [@vitejs/plugin-vue-jsx](https://github.com/vitejs/vite-plugin-vue/tree/HEAD/packages/plugin-vue-jsx) | `5.1.2` | `5.1.3` |
| [sass](https://github.com/sass/dart-sass) | `1.97.0` | `1.97.1` |
| [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.50.0` | `8.50.1` |


Updates `@vue-flow/core` from 1.48.0 to 1.48.1
- [Release notes](https://github.com/bcakmakoglu/vue-flow/releases)
- [Changelog](https://github.com/bcakmakoglu/vue-flow/blob/master/packages/core/CHANGELOG.md)
- [Commits](https://github.com/bcakmakoglu/vue-flow/commits/@vue-flow/core@1.48.1/packages/core)

Updates `vue` from 3.5.25 to 3.5.26
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/compare/v3.5.25...v3.5.26)

Updates `vue-i18n` from 11.2.2 to 11.2.7
- [Release notes](https://github.com/intlify/vue-i18n/releases)
- [Changelog](https://github.com/intlify/vue-i18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/intlify/vue-i18n/commits/v11.2.7/packages/vue-i18n)

Updates `@typescript-eslint/parser` from 8.50.0 to 8.50.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.50.1/packages/parser)

Updates `@vitejs/plugin-vue-jsx` from 5.1.2 to 5.1.3
- [Release notes](https://github.com/vitejs/vite-plugin-vue/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-vue/blob/main/packages/plugin-vue-jsx/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-vue/commits/plugin-vue@5.1.3/packages/plugin-vue-jsx)

Updates `sass` from 1.97.0 to 1.97.1
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.97.0...1.97.1)

Updates `typescript-eslint` from 8.50.0 to 8.50.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.50.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@vue-flow/core"
  dependency-version: 1.48.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch
- dependency-name: vue
  dependency-version: 3.5.26
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch
- dependency-name: vue-i18n
  dependency-version: 11.2.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.50.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: patch
- dependency-name: "@vitejs/plugin-vue-jsx"
  dependency-version: 5.1.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: patch
- dependency-name: sass
  dependency-version: 1.97.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: patch
- dependency-name: typescript-eslint
  dependency-version: 8.50.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-24 08:51:19 +01:00
dependabot[bot]
b5c6101090 build(deps): bump the build group in /ui with 6 updates (#13820)
---
updated-dependencies:
- dependency-name: "@rollup/rollup-darwin-arm64"
  dependency-version: 4.54.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build
- dependency-name: "@rollup/rollup-darwin-x64"
  dependency-version: 4.54.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build
- dependency-name: "@rollup/rollup-linux-x64-gnu"
  dependency-version: 4.54.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: build
- dependency-name: "@swc/core-darwin-arm64"
  dependency-version: 1.15.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: build
- dependency-name: "@swc/core-darwin-x64"
  dependency-version: 1.15.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: build
- dependency-name: "@swc/core-linux-x64-gnu"
  dependency-version: 1.15.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: build
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Miloš Paunović <paun992@hotmail.com>
2025-12-24 08:45:45 +01:00
dependabot[bot]
e4323728d6 build(deps-dev): bump storybook from 9.1.16 to 9.1.17 in /ui (#13761)
Bumps [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core) from 9.1.16 to 9.1.17.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v9.1.17/code/core)

---
updated-dependencies:
- dependency-name: storybook
  dependency-version: 9.1.17
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-24 08:44:29 +01:00
Roman Acevedo
5495971ecf test: add test env by default to be marked as test in ThreadUncaughtExceptionHandler.uncaughtException() 2025-12-23 22:18:48 +01:00
Roman Acevedo
dec1ee4272 test(cli): try to unflaky PluginDocCommandTest.run 2025-12-23 20:23:30 +01:00
Roman Acevedo
69cc6b2715 build(gradle): insure test report is always generated 2025-12-23 20:23:30 +01:00
Barthélémy Ledoux
431b4ccdb9 fix: make reorder of tests work (#13774)
* rename function

* fix: make reorder of tests work

---------

Co-authored-by: Miloš Paunović <paun992@hotmail.com>
2025-12-23 17:11:54 +01:00
Georg Traar
e9207a6f53 feat(ui): update onboarding CTA to product tour (#13803)
* feat(ui): update onboarding CTA to product tour

Extended localization support by adding translations for multiple languages using English as the base. This enhances accessibility and usability for non-English-speaking users while keeping English as the source reference.

Co-authored-by: Georg Traar <gtraar@kestra.io>
Co-authored-by: Miloš Paunović <paun992@hotmail.com>
2025-12-23 16:13:48 +01:00
Alankar Jagtap
419c1041d5 refactor(core): import moment as a library directly into the component (#13800)
Closes https://github.com/kestra-io/kestra/issues/12953.

Co-authored-by: MilosPaunovic <paun992@hotmail.com>
2025-12-23 13:46:45 +01:00
Karan Suresh
02cd5efb05 refactor(core): remove usage of unnecessary i18n composable (#13804)
Closes https://github.com/kestra-io/kestra/issues/13261.

Signed-off-by: Iam-karan-suresh <karansuresh.info@gmail.com>
Co-authored-by: MilosPaunovic <paun992@hotmail.com>
2025-12-23 13:37:15 +01:00
github-actions[bot]
2d549940c4 chore(core): localize to languages other than english (#13809)
Extended localization support by adding translations for multiple languages using English as the base. This enhances accessibility and usability for non-English-speaking users while keeping English as the source reference.

Co-authored-by: GitHub Action <actions@github.com>
2025-12-23 13:24:58 +01:00
Barthélémy Ledoux
97e138fbae fix: use injection instead of store (#13777)
Co-authored-by: Miloš Paunović <paun992@hotmail.com>
2025-12-23 13:23:14 +01:00
Roman Acevedo
d48f3b9bd9 fix: concurrency-limit was included in Flows and Executions openapis #13801 2025-12-23 11:08:58 +01:00
Mustafa Tarek
291fba3281 feat(core): add trigger state filter (#12779)
* feat(core): add trigger state filter

* feat(ui): add translations for trigger state filter

* fix(core): default to return all triggers if no state match to either enabled or disabled

* refactor(ui): replace search text with drop down select with two states enabled and disabled with adding translations to both

* refactor(ui): remove all translations except en.json

* feat(core): add trigger state filter

* feat(ui): add translations for trigger state filter

* fix(core): default to return all triggers if no state match to either enabled or disabled

* refactor(ui): replace search text with drop down select with two states enabled and disabled with adding translations to both

* refactor(ui): remove all translations except en.json

* fix(ui): resolve merge conflict at triggerFilter.ts

* feat(core): add disabled column for triggers table

* refactor(core): change trigger state implementation to check against disabled column directly instead of json value

* chore(system): update triggers_disabled.sql migration versions

* fix(translations): update translations

* fix(core): remove duplicates

---------

Co-authored-by: brian.mulier <bmmulier@hotmail.fr>
Co-authored-by: Miloš Paunović <paun992@hotmail.com>
2025-12-23 11:03:15 +01:00
github-actions[bot]
db3b3236ac chore(core): localize to languages other than english (#13798)
Extended localization support by adding translations for multiple languages using English as the base. This enhances accessibility and usability for non-English-speaking users while keeping English as the source reference.

Co-authored-by: GitHub Action <actions@github.com>
2025-12-22 15:31:30 +01:00
Miloš Paunović
5a8a631b47 feat(core): improve left menu structure (#13684)
Related to https://github.com/kestra-io/kestra-ee/pull/6152.

Closes https://github.com/kestra-io/kestra-ee/issues/5415.
2025-12-22 15:27:58 +01:00
Malay Dewangan
2da191896f feat(): introduce notification utility service for plugins 2025-12-22 19:40:20 +05:30
Roman Acevedo
111026369b test: fix gradle :test task being run twice
because first :unitTest task was implicitly depending on :test because of dependency on :jacocoTestReport
2025-12-22 14:45:08 +01:00
Florian Hussonnois
e3a0e59e9c chore(test): rework and fix gradle check phase #13425
- cleanup and refactor gradle :check Task to have more control over it
- separate integration test from unit test in gradle :check
- By default, all tests annotated with KestraTest are considered to be integration-tests (for the moment).
- fix: gradle :check to handle all test failure cases (this should help for https://github.com/kestra-io/kestra-ee/issues/6066)
- fix core/src/main/java/io/kestra/core/plugins/serdes/PluginDeserializer.java checkState() to work regardless of test ordering (if a @MicronautTest ran before a Junit only test if could lead to a fail where KestraContext was already init and required a Bean)

- advance on https://www.notion.so/kestra-io/Flaky-tests-and-KestraTest-2c636907f7b580fb9e39fb0ca62eb473?source=copy_link#2c636907f7b5805b9564ef4d6ba6f80b
2025-12-22 12:44:57 +01:00
74 changed files with 2925 additions and 2084 deletions

View File

@@ -63,9 +63,9 @@ You can also build it from a terminal using `./gradlew build`, the Gradle wrappe
- Configure the following environment variables:
- `MICRONAUT_ENVIRONMENTS`: can be set to any string and will load a custom configuration file in `cli/src/main/resources/application-{env}.yml`.
- `KESTRA_PLUGINS_PATH`: is the path where you will save plugins as Jar and will be load on startup.
- See the screenshot below for an example: ![Intellij IDEA Configuration ](run-app.png)
- See the screenshot below for an example: ![Intellij IDEA Configuration ](./assets/run-app.png)
- If you encounter **JavaScript memory heap out** error during startup, configure `NODE_OPTIONS` environment variable with some large value.
- Example `NODE_OPTIONS: --max-old-space-size=4096` or `NODE_OPTIONS: --max-old-space-size=8192` ![Intellij IDEA Configuration ](node_option_env_var.png)
- Example `NODE_OPTIONS: --max-old-space-size=4096` or `NODE_OPTIONS: --max-old-space-size=8192` ![Intellij IDEA Configuration ](./assets/node_option_env_var.png)
- The server starts by default on port 8080 and is reachable on `http://localhost:8080`
If you want to launch all tests, you need Python and some packages installed on your machine, on Ubuntu you can install them with:

View File

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 130 KiB

View File

Before

Width:  |  Height:  |  Size: 210 KiB

After

Width:  |  Height:  |  Size: 210 KiB

View File

@@ -21,7 +21,7 @@ plugins {
// test
id "com.adarshr.test-logger" version "4.0.0"
id "org.sonarqube" version "7.2.1.6560"
id "org.sonarqube" version "7.2.2.6593"
id 'jacoco-report-aggregation'
// helper
@@ -171,13 +171,23 @@ allprojects {
subprojects {subProj ->
if (subProj.name != 'platform' && subProj.name != 'jmh-benchmarks') {
apply plugin: "com.adarshr.test-logger"
apply plugin: 'jacoco'
java {
sourceCompatibility = targetJavaVersion
targetCompatibility = targetJavaVersion
}
configurations {
agent {
canBeResolved = true
canBeConsumed = true
}
mockitoAgent
}
dependencies {
// Platform
testAnnotationProcessor enforcedPlatform(project(":platform"))
@@ -196,6 +206,9 @@ subprojects {subProj ->
testImplementation "org.junit.jupiter:junit-jupiter-params"
testImplementation "org.junit-pioneer:junit-pioneer"
testImplementation 'org.mockito:mockito-junit-jupiter'
mockitoAgent("org.mockito:mockito-core:5.21.0") {
transitive = false // just the core
}
// hamcrest
testImplementation 'org.hamcrest:hamcrest'
@@ -204,9 +217,17 @@ subprojects {subProj ->
//assertj
testImplementation 'org.assertj:assertj-core'
agent "org.aspectj:aspectjweaver:1.9.25.1"
testImplementation platform("io.qameta.allure:allure-bom")
testImplementation "io.qameta.allure:allure-junit5"
}
def commonTestConfig = { Test t ->
t.ignoreFailures = true
t.finalizedBy jacocoTestReport
// set Xmx for test workers
t.maxHeapSize = '4g'
@@ -232,6 +253,52 @@ subprojects {subProj ->
// }
}
tasks.register('integrationTest', Test) { Test t ->
description = 'Runs integration tests'
group = 'verification'
useJUnitPlatform {
includeTags 'integration'
}
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
reports {
junitXml.required = true
junitXml.outputPerTestCase = true
junitXml.mergeReruns = true
junitXml.includeSystemErrLog = true
junitXml.outputLocation = layout.buildDirectory.dir("test-results/test")
}
// Integration tests typically not parallel (but you can enable)
maxParallelForks = 1
commonTestConfig(t)
}
tasks.register('unitTest', Test) { Test t ->
description = 'Runs unit tests'
group = 'verification'
useJUnitPlatform {
excludeTags 'flaky', 'integration'
}
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
reports {
junitXml.required = true
junitXml.outputPerTestCase = true
junitXml.mergeReruns = true
junitXml.includeSystemErrLog = true
junitXml.outputLocation = layout.buildDirectory.dir("test-results/test")
}
commonTestConfig(t)
}
tasks.register('flakyTest', Test) { Test t ->
group = 'verification'
description = 'Runs tests tagged @Flaky but does not fail the build.'
@@ -239,7 +306,6 @@ subprojects {subProj ->
useJUnitPlatform {
includeTags 'flaky'
}
ignoreFailures = true
reports {
junitXml.required = true
@@ -249,10 +315,13 @@ subprojects {subProj ->
junitXml.outputLocation = layout.buildDirectory.dir("test-results/flakyTest")
}
commonTestConfig(t)
}
test {
// test task (default)
tasks.named('test', Test) { Test t ->
group = 'verification'
description = 'Runs all non-flaky tests.'
useJUnitPlatform {
excludeTags 'flaky'
}
@@ -263,10 +332,15 @@ subprojects {subProj ->
junitXml.includeSystemErrLog = true
junitXml.outputLocation = layout.buildDirectory.dir("test-results/test")
}
commonTestConfig(it)
commonTestConfig(t)
jvmArgs = [
"-javaagent:${configurations.agent.singleFile}",
"-javaagent:${configurations.mockitoAgent.singleFile}"
]
}
finalizedBy(tasks.named('flakyTest'))
tasks.named('check') {
dependsOn(tasks.named('test'))// default behaviour
}
testlogger {
@@ -282,83 +356,25 @@ subprojects {subProj ->
}
}
/**********************************************************************************************************************\
* End-to-End Tests
**********************************************************************************************************************/
def e2eTestsCheck = tasks.register('e2eTestsCheck') {
group = 'verification'
description = "Runs the 'check' task for all e2e-tests modules"
doFirst {
project.ext.set("e2e-tests", true)
}
}
subprojects {
// Add e2e-tests modules check tasks to e2eTestsCheck
if (project.name.startsWith("e2e-tests")) {
test {
onlyIf {
project.hasProperty("e2e-tests")
}
}
}
afterEvaluate {
// Add e2e-tests modules check tasks to e2eTestsCheck
if (project.name.startsWith("e2e-tests")) {
e2eTestsCheck.configure {
finalizedBy(check)
}
}
}
}
/**********************************************************************************************************************\
* Allure Reports
**********************************************************************************************************************/
subprojects {
if (it.name != 'platform' && it.name != 'jmh-benchmarks') {
dependencies {
testImplementation platform("io.qameta.allure:allure-bom")
testImplementation "io.qameta.allure:allure-junit5"
}
configurations {
agent {
canBeResolved = true
canBeConsumed = true
}
}
dependencies {
agent "org.aspectj:aspectjweaver:1.9.25.1"
}
test {
jvmArgs = ["-javaagent:${configurations.agent.singleFile}"]
}
}
}
/**********************************************************************************************************************\
* Jacoco
**********************************************************************************************************************/
subprojects {
if (it.name != 'platform' && it.name != 'jmh-benchmarks') {
apply plugin: 'jacoco'
test {
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
}
}
}
tasks.named('check') {
dependsOn tasks.named('testCodeCoverageReport', JacocoReport)
finalizedBy jacocoTestReport
}
tasks.register('unitTest') {
// No jacocoTestReport here, because it depends by default on :test,
// and that would make :test being run twice in our CI.
// In practice the report will be generated later in the CI by :check.
}
tasks.register('integrationTest') {
dependsOn tasks.named('testCodeCoverageReport', JacocoReport)
finalizedBy jacocoTestReport
}
tasks.register('flakyTest') {
dependsOn tasks.named('testCodeCoverageReport', JacocoReport)
finalizedBy jacocoTestReport
}
tasks.named('testCodeCoverageReport') {

View File

@@ -81,7 +81,7 @@ public class MetadataMigrationService {
}));
}
public void nsFilesMigration() throws IOException {
public void nsFilesMigration(boolean verbose) throws IOException {
this.namespacesPerTenant().entrySet().stream()
.flatMap(namespacesForTenant -> namespacesForTenant.getValue().stream().map(namespace -> Map.entry(namespacesForTenant.getKey(), namespace)))
.flatMap(throwFunction(namespaceForTenant -> {
@@ -92,6 +92,9 @@ public class MetadataMigrationService {
.forEach(throwConsumer(nsFileMetadata -> {
if (namespaceFileMetadataRepository.findByPath(nsFileMetadata.getTenantId(), nsFileMetadata.getNamespace(), nsFileMetadata.getPath()).isEmpty()) {
namespaceFileMetadataRepository.save(nsFileMetadata);
if (verbose) {
System.out.println("Migrated namespace file metadata: " + nsFileMetadata.getNamespace() + " - " + nsFileMetadata.getPath());
}
}
}));
}

View File

@@ -15,11 +15,14 @@ public class NsFilesMetadataMigrationCommand extends AbstractCommand {
@Inject
private Provider<MetadataMigrationService> metadataMigrationServiceProvider;
@CommandLine.Option(names = {"-lm", "--log-migrations"}, description = "Log all files that are migrated", defaultValue = "false")
public boolean logMigrations = false;
@Override
public Integer call() throws Exception {
super.call();
try {
metadataMigrationServiceProvider.get().nsFilesMigration();
metadataMigrationServiceProvider.get().nsFilesMigration(logMigrations);
} catch (Exception e) {
System.err.println("❌ Namespace Files Metadata migration failed: " + e.getMessage());
e.printStackTrace();

View File

@@ -4,7 +4,6 @@ import io.micronaut.configuration.picocli.PicocliRunner;
import io.micronaut.context.ApplicationContext;
import io.micronaut.context.env.Environment;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import java.io.File;
@@ -15,7 +14,6 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import static org.assertj.core.api.Assertions.assertThat;
@@ -25,7 +23,8 @@ class PluginDocCommandTest {
@Test
void run() throws IOException, URISyntaxException {
Path pluginsPath = Files.createTempDirectory(PluginListCommandTest.class.getSimpleName());
var testDirectoryName = PluginListCommandTest.class.getSimpleName();
Path pluginsPath = Files.createTempDirectory(testDirectoryName + "_pluginsPath_");
pluginsPath.toFile().deleteOnExit();
FileUtils.copyFile(
@@ -34,7 +33,7 @@ class PluginDocCommandTest {
new File(URI.create("file://" + pluginsPath.toAbsolutePath() + "/" + PLUGIN_TEMPLATE_TEST))
);
Path docPath = Files.createTempDirectory(PluginInstallCommandTest.class.getSimpleName());
Path docPath = Files.createTempDirectory(testDirectoryName + "_docPath_");
docPath.toFile().deleteOnExit();
try (ApplicationContext ctx = ApplicationContext.run(Environment.CLI, Environment.TEST)) {
@@ -43,9 +42,9 @@ class PluginDocCommandTest {
List<Path> files = Files.list(docPath).toList();
assertThat(files.size()).isEqualTo(1);
assertThat(files.getFirst().getFileName().toString()).isEqualTo("plugin-template-test");
var directory = files.getFirst().toFile();
assertThat(files.stream().map(path -> path.getFileName().toString())).contains("plugin-template-test");
// don't know why, but sometimes there is an addition "plugin-notifications" directory present
var directory = files.stream().filter(path -> "plugin-template-test".equals(path.getFileName().toString())).findFirst().get().toFile();
assertThat(directory.isDirectory()).isTrue();
assertThat(directory.listFiles().length).isEqualTo(3);

View File

@@ -151,6 +151,12 @@ public record QueryFilter(
return List.of(Op.EQUALS, Op.NOT_EQUALS, Op.CONTAINS, Op.STARTS_WITH, Op.ENDS_WITH, Op.IN, Op.NOT_IN);
}
},
TRIGGER_STATE("triggerState"){
@Override
public List<Op> supportedOp() {
return List.of(Op.EQUALS, Op.NOT_EQUALS);
}
},
EXECUTION_ID("executionId") {
@Override
public List<Op> supportedOp() {
@@ -271,7 +277,7 @@ public record QueryFilter(
@Override
public List<Field> supportedField() {
return List.of(Field.QUERY, Field.SCOPE, Field.NAMESPACE, Field.WORKER_ID, Field.FLOW_ID,
Field.START_DATE, Field.END_DATE, Field.TRIGGER_ID
Field.START_DATE, Field.END_DATE, Field.TRIGGER_ID, Field.TRIGGER_STATE
);
}
},

View File

@@ -185,15 +185,11 @@ public class TaskRun implements TenantInterface {
}
public TaskRunAttempt lastAttempt() {
if (this.attempts == null) {
if (this.attempts == null || this.attempts.isEmpty()) {
return null;
}
return this
.attempts
.stream()
.reduce((a, b) -> b)
.orElse(null);
return this.attempts.getLast();
}
public TaskRun onRunningResend() {
@@ -264,8 +260,7 @@ public class TaskRun implements TenantInterface {
* @return The next retry date, null if maxAttempt || maxDuration is reached
*/
public Instant nextRetryDate(AbstractRetry retry, Execution execution) {
if (retry.getMaxAttempts() != null && execution.getMetadata().getAttemptNumber() >= retry.getMaxAttempts()) {
if (this.attempts == null || this.attempts.isEmpty() || retry.getMaxAttempts() != null && execution.getMetadata().getAttemptNumber() >= retry.getMaxAttempts()) {
return null;
}
Instant base = this.lastAttempt().getState().maxDate();

View File

@@ -148,6 +148,11 @@ public class State {
return this.current.isTerminated();
}
@JsonIgnore
public boolean canBeRestarted() {
return this.current.isTerminated() || this.current.isPaused();
}
@JsonIgnore
public boolean isTerminatedNoFail() {
return this.current.isTerminatedNoFail();

View File

@@ -0,0 +1,25 @@
package io.kestra.core.plugins.notifications;
import io.kestra.core.models.property.Property;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Map;
public interface ExecutionInterface {
@Schema(
title = "The execution id to use",
description = "Default is the current execution, " +
"change it to {{ trigger.executionId }} if you use this task with a Flow trigger to use the original execution."
)
Property<String> getExecutionId();
@Schema(
title = "Custom fields to be added on notification"
)
Property<Map<String, Object>> getCustomFields();
@Schema(
title = "Custom message to be added on notification"
)
Property<String> getCustomMessage();
}

View File

@@ -0,0 +1,140 @@
package io.kestra.core.plugins.notifications;
import io.kestra.core.exceptions.IllegalVariableEvaluationException;
import io.kestra.core.models.executions.Execution;
import io.kestra.core.models.executions.TaskRun;
import io.kestra.core.models.flows.State;
import io.kestra.core.models.property.Property;
import io.kestra.core.models.tasks.retrys.Exponential;
import io.kestra.core.repositories.ExecutionRepositoryInterface;
import io.kestra.core.runners.DefaultRunContext;
import io.kestra.core.runners.RunContext;
import io.kestra.core.serializers.JacksonMapper;
import io.kestra.core.utils.ListUtils;
import io.kestra.core.utils.RetryUtils;
import io.kestra.core.utils.UriProvider;
import java.time.Duration;
import java.util.*;
public final class ExecutionService {
private ExecutionService() {}
public static Execution findExecution(RunContext runContext, Property<String> executionId) throws IllegalVariableEvaluationException, NoSuchElementException {
ExecutionRepositoryInterface executionRepository = ((DefaultRunContext) runContext).getApplicationContext().getBean(ExecutionRepositoryInterface.class);
RetryUtils.Instance<Execution, NoSuchElementException> retryInstance = RetryUtils
.of(Exponential.builder()
.delayFactor(2.0)
.interval(Duration.ofSeconds(1))
.maxInterval(Duration.ofSeconds(15))
.maxAttempts(-1)
.maxDuration(Duration.ofMinutes(10))
.build(),
runContext.logger()
);
var executionRendererId = runContext.render(executionId).as(String.class).orElse(null);
var flowTriggerExecutionState = getOptionalFlowTriggerExecutionState(runContext);
var flowVars = (Map<String, String>) runContext.getVariables().get("flow");
var isCurrentExecution = isCurrentExecution(runContext, executionRendererId);
if (isCurrentExecution) {
runContext.logger().info("Loading execution data for the current execution.");
}
return retryInstance.run(
NoSuchElementException.class,
() -> executionRepository.findById(flowVars.get("tenantId"), executionRendererId)
.filter(foundExecution -> isExecutionInTheWantedState(foundExecution, isCurrentExecution, flowTriggerExecutionState))
.orElseThrow(() -> new NoSuchElementException("Unable to find execution '" + executionRendererId + "'"))
);
}
/**
* ExecutionRepository can be out of sync in ElasticSearch stack, with this filter we try to mitigate that
*
* @param execution the Execution we fetched from ExecutionRepository
* @param isCurrentExecution true if this *Execution Task is configured to send a notification for the current Execution
* @param flowTriggerExecutionState the Execution State that triggered the Flow trigger, if any
* @return true if we think we fetched the right Execution data for our usecase
*/
public static boolean isExecutionInTheWantedState(Execution execution, boolean isCurrentExecution, Optional<String> flowTriggerExecutionState) {
if (isCurrentExecution) {
// we don't wait for current execution to be terminated as it could not be possible as long as this task is running
return true;
}
if (flowTriggerExecutionState.isPresent()) {
// we were triggered by a Flow trigger that can be, for example: PAUSED
if (flowTriggerExecutionState.get().equals(State.Type.RUNNING.toString())) {
// RUNNING special case: we take the first state we got
return true;
} else {
// to handle the case where the ExecutionRepository is out of sync in ElasticSearch stack,
// we try to match an Execution with the same state
return execution.getState().getCurrent().name().equals(flowTriggerExecutionState.get());
}
} else {
return execution.getState().getCurrent().isTerminated();
}
}
public static Map<String, Object> executionMap(RunContext runContext, ExecutionInterface executionInterface) throws IllegalVariableEvaluationException {
Execution execution = findExecution(runContext, executionInterface.getExecutionId());
UriProvider uriProvider = ((DefaultRunContext) runContext).getApplicationContext().getBean(UriProvider.class);
Map<String, Object> templateRenderMap = new HashMap<>();
templateRenderMap.put("duration", execution.getState().humanDuration());
templateRenderMap.put("startDate", execution.getState().getStartDate());
templateRenderMap.put("link", uriProvider.executionUrl(execution));
templateRenderMap.put("execution", JacksonMapper.toMap(execution));
runContext.render(executionInterface.getCustomMessage())
.as(String.class)
.ifPresent(s -> templateRenderMap.put("customMessage", s));
final Map<String, Object> renderedCustomFields = runContext.render(executionInterface.getCustomFields()).asMap(String.class, Object.class);
if (!renderedCustomFields.isEmpty()) {
templateRenderMap.put("customFields", renderedCustomFields);
}
var isCurrentExecution = isCurrentExecution(runContext, execution.getId());
List<TaskRun> taskRuns;
if (isCurrentExecution) {
taskRuns = execution.getTaskRunList();
} else {
taskRuns = execution.getTaskRunList().stream()
.filter(t -> (execution.hasFailed() ? State.Type.FAILED : State.Type.SUCCESS).equals(t.getState().getCurrent()))
.toList();
}
if (!ListUtils.isEmpty(taskRuns)) {
TaskRun lastTaskRun = taskRuns.getLast();
templateRenderMap.put("firstFailed", State.Type.FAILED.equals(lastTaskRun.getState().getCurrent()) ? lastTaskRun : false);
templateRenderMap.put("lastTask", lastTaskRun);
}
return templateRenderMap;
}
/**
* if there is a state, we assume this is a Flow trigger with type: {@link io.kestra.plugin.core.trigger.Flow.Output}
*
* @return the state of the execution that triggered the Flow trigger, or empty if another usecase/trigger
*/
private static Optional<String> getOptionalFlowTriggerExecutionState(RunContext runContext) {
var triggerVar = Optional.ofNullable(
runContext.getVariables().get("trigger")
);
return triggerVar.map(trigger -> ((Map<String, String>) trigger).get("state"));
}
private static boolean isCurrentExecution(RunContext runContext, String executionId) {
var executionVars = (Map<String, String>) runContext.getVariables().get("execution");
return executionId.equals(executionVars.get("id"));
}
}

View File

@@ -12,6 +12,7 @@ import io.kestra.core.models.dashboards.charts.DataChart;
import io.kestra.core.plugins.DefaultPluginRegistry;
import io.kestra.core.plugins.PluginRegistry;
import io.kestra.core.serializers.JacksonMapper;
import io.micronaut.context.exceptions.NoSuchBeanException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -72,7 +73,7 @@ public final class PluginDeserializer<T extends Plugin> extends JsonDeserializer
// By default, if no plugin-registry is configured retrieve
// the one configured from the static Kestra's context.
pluginRegistry = KestraContext.getContext().getPluginRegistry();
} catch (IllegalStateException ignore) {
} catch (IllegalStateException | NoSuchBeanException ignore) {
// This error can only happen if the KestraContext is not initialized (i.e. in unit tests).
log.error("No plugin registry was initialized. Use default implementation.");
pluginRegistry = DefaultPluginRegistry.getOrCreate();

View File

@@ -1,5 +1,6 @@
package io.kestra.core.runners.pebble.functions;
import com.cronutils.utils.VisibleForTesting;
import io.kestra.core.runners.LocalPath;
import io.kestra.core.runners.LocalPathFactory;
import io.kestra.core.services.NamespaceService;
@@ -155,31 +156,11 @@ abstract class AbstractFileFunction implements Function {
}
private String checkIfFileFromAllowedNamespaceAndReturnIt(URI path, String tenantId, String fromNamespace) {
// Extract namespace from the path, it should be of the form: kestra:///({tenantId}/){namespace}/{flowId}/executions/{executionId}/tasks/{taskId}/{taskRunId}/{fileName}'
// To extract the namespace, we must do it step by step as tenantId, namespace and taskId can contain the words 'executions' and 'tasks'
String namespace = path.toString().substring(KESTRA_SCHEME.length());
if (!EXECUTION_FILE.matcher(namespace).matches()) {
throw new IllegalArgumentException("Unable to read the file '" + path + "' as it is not an execution file");
}
// 1. remove the tenantId if existing
if (tenantId != null) {
namespace = namespace.substring(tenantId.length() + 1);
}
// 2. remove everything after tasks
namespace = namespace.substring(0, namespace.lastIndexOf("/tasks/"));
// 3. remove everything after executions
namespace = namespace.substring(0, namespace.lastIndexOf("/executions/"));
// 4. remove the flowId
namespace = namespace.substring(0, namespace.lastIndexOf('/'));
// 5. replace '/' with '.'
namespace = namespace.replace("/", ".");
String namespace = extractNamespace(path);
namespaceService.checkAllowedNamespace(tenantId, namespace, tenantId, fromNamespace);
return namespace;
}
private String checkEnabledLocalFileAndReturnNamespace(Map<String, Object> args, Map<String, String> flow) {
if (!enableFileProtocol) {
throw new SecurityException("The file:// protocol has been disabled inside the Kestra configuration.");
@@ -200,4 +181,24 @@ abstract class AbstractFileFunction implements Function {
}
return Optional.ofNullable(customNs).orElse(flow.get(NAMESPACE));
}
@VisibleForTesting
String extractNamespace( URI path){
// Extract namespace from the path, it should be of the form: kestra:///{namespace}/{flowId}/executions/{executionId}/tasks/{taskId}/{taskRunId}/{fileName}'
// To extract the namespace, we must do it step by step as namespace and taskId can contain the words 'executions' and 'tasks'
String namespace = path.toString().substring(KESTRA_SCHEME.length());
if (!EXECUTION_FILE.matcher(namespace).matches()) {
throw new IllegalArgumentException("Unable to read the file '" + path + "' as it is not an execution file");
}
// 1. remove everything after tasks
namespace = namespace.substring(0, namespace.lastIndexOf("/tasks/"));
// 2. remove everything after executions
namespace = namespace.substring(0, namespace.lastIndexOf("/executions/"));
// 3. remove the flowId
namespace = namespace.substring(0, namespace.lastIndexOf('/'));
// 4. replace '/' with '.'
namespace = namespace.replace("/", ".");
return namespace;
}
}

View File

@@ -187,7 +187,7 @@ public class ExecutionService {
}
public Execution restart(final Execution execution, @Nullable Integer revision) throws Exception {
if (!(execution.getState().isTerminated() || execution.getState().isPaused())) {
if (!execution.getState().canBeRestarted()) {
throw new IllegalStateException("Execution must be terminated to be restarted, " +
"current state is '" + execution.getState().getCurrent() + "' !"
);

View File

@@ -15,6 +15,7 @@ import lombok.experimental.SuperBuilder;
import java.util.List;
import java.util.Map;
import java.util.Collections;
@SuperBuilder
@ToString
@@ -62,14 +63,24 @@ public class SetVariables extends Task implements ExecutionUpdatableTask {
public Execution update(Execution execution, RunContext runContext) throws Exception {
Map<String, Object> renderedVars = runContext.render(this.variables).asMap(String.class, Object.class);
boolean renderedOverwrite = runContext.render(overwrite).as(Boolean.class).orElseThrow();
Map<String, Object> currentVariables =
execution.getVariables() == null ? Collections.emptyMap() : execution.getVariables();
if (!renderedOverwrite) {
// check that none of the new variables already exist
List<String> duplicated = renderedVars.keySet().stream().filter(key -> execution.getVariables().containsKey(key)).toList();
List<String> duplicated = renderedVars.keySet().stream()
.filter(currentVariables::containsKey)
.toList();
if (!duplicated.isEmpty()) {
throw new IllegalArgumentException("`overwrite` is set to false and the following variables already exist: " + String.join(",", duplicated));
throw new IllegalArgumentException(
"`overwrite` is set to false and the following variables already exist: " +
String.join(",", duplicated)
);
}
}
return execution.withVariables(MapUtils.deepMerge(execution.getVariables(), renderedVars));
return execution.withVariables(MapUtils.deepMerge(currentVariables, renderedVars));
}
}

View File

@@ -183,6 +183,7 @@ public class Webhook extends AbstractTrigger implements TriggerOutput<Webhook.Ou
.flowId(flow.getId())
.flowRevision(flow.getRevision())
.inputs(inputs)
.variables(flow.getVariables())
.state(new State())
.trigger(ExecutionTrigger.of(
this,

View File

@@ -0,0 +1,28 @@
package io.kestra.core.runners.pebble.functions;
import io.kestra.core.junit.annotations.KestraTest;
import jakarta.inject.Inject;
import org.junit.jupiter.api.Test;
import java.net.URI;
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
@KestraTest
public class AbstractFileFunctionTest {
@Inject
ReadFileFunction readFileFunction;
@Test
void namespaceFromURI(){
String namespace1 = readFileFunction.extractNamespace(URI.create("kestra:///demo/simple-write-oss/executions/4Tnd2zrWGoHGrufwyt738j/tasks/write/2FOeylkRr5tktwIQqFh56w/18316959863401460785.txt"));
assertThat(namespace1).isEqualTo("demo");
String namespace2 = readFileFunction.extractNamespace(URI.create("kestra:///io/kestra/tests/simple-write-oss/executions/4Tnd2zrWGoHGrufwyt738j/tasks/write/2FOeylkRr5tktwIQqFh56w/18316959863401460785.txt"));
assertThat(namespace2).isEqualTo("io.kestra.tests");
assertThrows(IllegalArgumentException.class, () ->readFileFunction.extractNamespace(URI.create("kestra:///simple-write-oss/executions/4Tnd2zrWGoHGrufwyt738j/tasks/write/2FOeylkRr5tktwIQqFh56w/18316959863401460785.txt")));
assertThrows(IllegalArgumentException.class, () ->readFileFunction.extractNamespace(URI.create("kestra:///executions/4Tnd2zrWGoHGrufwyt738j/tasks/write/2FOeylkRr5tktwIQqFh56w/18316959863401460785.txt")));
}
}

View File

@@ -10,7 +10,7 @@ tasks:
message: "{{ task.id }}"
- id: pause
type: io.kestra.plugin.core.flow.Pause
delay: PT1S
pauseDuration: PT1S
tasks:
- id: c
type: io.kestra.plugin.core.log.Log

View File

@@ -0,0 +1,3 @@
ALTER TABLE triggers
ADD COLUMN "disabled" BOOL
GENERATED ALWAYS AS (JQ_BOOLEAN("value", '.disabled')) NOT NULL;

View File

@@ -0,0 +1,3 @@
ALTER TABLE triggers
ADD COLUMN `disabled` BOOL
GENERATED ALWAYS AS (value ->> '$.disabled' = 'true') STORED NOT NULL

View File

@@ -0,0 +1,4 @@
ALTER TABLE triggers
ADD COLUMN "disabled" BOOL
GENERATED ALWAYS AS (CAST(value ->> 'disabled' AS BOOL)) STORED NOT NULL;

View File

@@ -324,6 +324,10 @@ public abstract class AbstractJdbcRepository {
}
}
if(field == QueryFilter.Field.TRIGGER_STATE){
return applyTriggerStateCondition(value, operation);
}
// Convert the field name to lowercase and quote it
Name columnName = getColumnName(field);
@@ -341,7 +345,7 @@ public abstract class AbstractJdbcRepository {
case CONTAINS -> DSL.field(columnName).like("%" + value + "%");
case REGEX -> DSL.field(columnName).likeRegex((String) value);
case PREFIX -> DSL.field(columnName).like(value + "%")
.or(DSL.field(columnName).eq(value));
.or(DSL.field(columnName).eq(value));
default -> throw new InvalidQueryFiltersException("Unsupported operation: " + operation);
};
}
@@ -469,6 +473,23 @@ public abstract class AbstractJdbcRepository {
};
}
private Condition applyTriggerStateCondition(Object value, QueryFilter.Op operation) {
String triggerState = value.toString();
Boolean isDisabled = switch (triggerState) {
case "disabled" -> true;
case "enabled" -> false;
default -> null;
};
if (isDisabled == null) {
return DSL.noCondition();
}
return switch (operation) {
case EQUALS -> field("disabled").eq(isDisabled);
case NOT_EQUALS -> field("disabled").ne(isDisabled);
default -> throw new InvalidQueryFiltersException("Unsupported operation for Trigger State: " + operation);
};
}
protected Field<Date> formatDateField(String dateField, DateUtils.GroupType groupType) {
throw new UnsupportedOperationException("formatDateField() not implemented");
}

View File

@@ -297,10 +297,23 @@ public class JdbcExecutor implements ExecutorInterface {
this.receiveCancellations.addFirst(((JdbcQueue<Execution>) this.executionQueue).receiveBatch(
Executor.class,
executions -> {
List<CompletableFuture<Void>> futures = executions.stream()
.map(execution -> CompletableFuture.runAsync(() -> executionQueue(execution), executionExecutorService))
// process execution message grouped by executionId to avoid concurrency as the execution level as it would
List<CompletableFuture<Void>> perExecutionFutures = executions.stream()
.filter(Either::isLeft)
.collect(Collectors.groupingBy(either -> either.getLeft().getId()))
.values()
.stream()
.map(eithers -> CompletableFuture.runAsync(() -> {
eithers.forEach(this::executionQueue);
}, executionExecutorService))
.toList();
CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])).join();
// directly process deserialization issues as most of the time there will be none
executions.stream()
.filter(Either::isRight)
.forEach(either -> executionQueue(either));
CompletableFuture.allOf(perExecutionFutures.toArray(CompletableFuture[]::new)).join();
}
));
this.receiveCancellations.addFirst(((JdbcQueue<WorkerTaskResult>) this.workerTaskResultQueue).receiveBatch(

View File

@@ -35,7 +35,7 @@ dependencies {
// we define cloud bom here for GCP, Azure and AWS so they are aligned for all plugins that use them (secret, storage, oss and ee plugins)
api platform('com.google.cloud:libraries-bom:26.73.0')
api platform("com.azure:azure-sdk-bom:1.3.3")
api platform('software.amazon.awssdk:bom:2.40.10')
api platform('software.amazon.awssdk:bom:2.40.15')
api platform("dev.langchain4j:langchain4j-bom:$langchain4jVersion")
api platform("dev.langchain4j:langchain4j-community-bom:$langchain4jCommunityVersion")
@@ -98,7 +98,7 @@ dependencies {
api group: 'org.apache.maven.resolver', name: 'maven-resolver-connector-basic', version: mavenResolverVersion
api group: 'org.apache.maven.resolver', name: 'maven-resolver-transport-file', version: mavenResolverVersion
api group: 'org.apache.maven.resolver', name: 'maven-resolver-transport-apache', version: mavenResolverVersion
api 'com.github.oshi:oshi-core:6.9.1'
api 'com.github.oshi:oshi-core:6.9.2'
api 'io.pebbletemplates:pebble:4.1.0'
api group: 'co.elastic.logging', name: 'logback-ecs-encoder', version: '1.7.0'
api group: 'de.focus-shift', name: 'jollyday-core', version: jollydayVersion

View File

@@ -7,10 +7,12 @@ import io.micronaut.context.annotation.Factory;
import io.micronaut.context.annotation.Requires;
import io.micronaut.test.annotation.TransactionMode;
import io.micronaut.test.condition.TestActiveCondition;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.extension.ExtendWith;
import java.lang.annotation.*;
@Tag("integration")
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE, ElementType.TYPE})
@ExtendWith(KestraTestExtension.class)

View File

@@ -8,25 +8,31 @@ import io.micronaut.test.extensions.junit5.MicronautJunit5Extension;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.platform.commons.support.AnnotationSupport;
import java.util.Set;
public class KestraTestExtension extends MicronautJunit5Extension {
@Override
protected MicronautTestValue buildMicronautTestValue(Class<?> testClass) {
testProperties.put("kestra.jdbc.executor.thread-count", Runtime.getRuntime().availableProcessors() * 4);
return AnnotationSupport
.findAnnotation(testClass, KestraTest.class)
.map(kestraTestAnnotation -> new MicronautTestValue(
kestraTestAnnotation.application(),
kestraTestAnnotation.environments(),
kestraTestAnnotation.packages(),
kestraTestAnnotation.propertySources(),
kestraTestAnnotation.rollback(),
kestraTestAnnotation.transactional(),
kestraTestAnnotation.rebuildContext(),
kestraTestAnnotation.contextBuilder(),
kestraTestAnnotation.transactionMode(),
kestraTestAnnotation.startApplication(),
kestraTestAnnotation.resolveParameters()
))
.map(kestraTestAnnotation -> {
var envsSet = new java.util.HashSet<>(Set.of(kestraTestAnnotation.environments()));
envsSet.add("test");// add test env if not already present
return new MicronautTestValue(
kestraTestAnnotation.application(),
envsSet.toArray(new String[0]),
kestraTestAnnotation.packages(),
kestraTestAnnotation.propertySources(),
kestraTestAnnotation.rollback(),
kestraTestAnnotation.transactional(),
kestraTestAnnotation.rebuildContext(),
kestraTestAnnotation.contextBuilder(),
kestraTestAnnotation.transactionMode(),
kestraTestAnnotation.startApplication(),
kestraTestAnnotation.resolveParameters()
);
})
.orElse(null);
}

3108
ui/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -27,7 +27,7 @@
"@kestra-io/ui-libs": "^0.0.268",
"@vue-flow/background": "^1.3.2",
"@vue-flow/controls": "^1.1.2",
"@vue-flow/core": "^1.48.0",
"@vue-flow/core": "^1.48.1",
"@vueuse/core": "^14.1.0",
"ansi-to-html": "^0.7.2",
"axios": "^1.13.2",
@@ -39,7 +39,7 @@
"cytoscape": "^3.33.0",
"dagre": "^0.8.5",
"dotenv": "^17.2.3",
"element-plus": "2.12.0",
"element-plus": "2.13.0",
"humanize-duration": "^3.33.2",
"js-yaml": "^4.1.1",
"lodash": "^4.17.21",
@@ -59,15 +59,15 @@
"path-browserify": "^1.0.1",
"pdfjs-dist": "^5.4.449",
"pinia": "^3.0.4",
"posthog-js": "^1.308.0",
"posthog-js": "^1.310.1",
"rapidoc": "^9.3.8",
"semver": "^7.7.3",
"shiki": "^3.20.0",
"vue": "^3.5.25",
"vue": "^3.5.26",
"vue-axios": "^3.5.2",
"vue-chartjs": "^5.3.3",
"vue-gtag": "^3.6.3",
"vue-i18n": "^11.2.2",
"vue-i18n": "^11.2.7",
"vue-material-design-icons": "^5.3.1",
"vue-router": "^4.6.4",
"vue-sidebar-menu": "^5.9.1",
@@ -97,9 +97,9 @@
"@types/semver": "^7.7.1",
"@types/testing-library__jest-dom": "^6.0.0",
"@types/testing-library__user-event": "^4.2.0",
"@typescript-eslint/parser": "^8.50.0",
"@typescript-eslint/parser": "^8.50.1",
"@vitejs/plugin-vue": "^6.0.3",
"@vitejs/plugin-vue-jsx": "^5.1.2",
"@vitejs/plugin-vue-jsx": "^5.1.3",
"@vitest/browser": "^3.2.4",
"@vitest/coverage-v8": "^3.2.4",
"@vue/eslint-config-prettier": "^10.2.0",
@@ -120,29 +120,29 @@
"playwright": "^1.55.0",
"prettier": "^3.7.4",
"rimraf": "^6.1.2",
"rolldown-vite": "^7.2.11",
"rolldown-vite": "^7.3.0",
"rollup-plugin-copy": "^3.5.0",
"sass": "^1.97.0",
"storybook": "^9.1.16",
"sass": "^1.97.1",
"storybook": "^9.1.17",
"storybook-vue3-router": "^6.0.2",
"ts-node": "^10.9.2",
"typescript": "^5.9.3",
"typescript-eslint": "^8.50.0",
"typescript-eslint": "^8.50.1",
"uuid": "^13.0.0",
"vite": "npm:rolldown-vite@latest",
"vitest": "^3.2.4",
"vue-tsc": "^3.1.8"
"vue-tsc": "^3.2.1"
},
"optionalDependencies": {
"@esbuild/darwin-arm64": "^0.27.2",
"@esbuild/darwin-x64": "^0.27.2",
"@esbuild/linux-x64": "^0.27.2",
"@rollup/rollup-darwin-arm64": "^4.53.5",
"@rollup/rollup-darwin-x64": "^4.53.5",
"@rollup/rollup-linux-x64-gnu": "^4.53.5",
"@swc/core-darwin-arm64": "^1.15.5",
"@swc/core-darwin-x64": "^1.15.5",
"@swc/core-linux-x64-gnu": "^1.15.5"
"@rollup/rollup-darwin-arm64": "^4.54.0",
"@rollup/rollup-darwin-x64": "^4.54.0",
"@rollup/rollup-linux-x64-gnu": "^4.54.0",
"@swc/core-darwin-arm64": "^1.15.7",
"@swc/core-darwin-x64": "^1.15.7",
"@swc/core-linux-x64-gnu": "^1.15.7"
},
"overrides": {
"bootstrap": {

View File

@@ -43,7 +43,7 @@
REF_PATH_INJECTION_KEY,
ROOT_SCHEMA_INJECTION_KEY,
SCHEMA_DEFINITIONS_INJECTION_KEY,
UPDATE_TASK_FUNCTION_INJECTION_KEY
UPDATE_YAML_FUNCTION_INJECTION_KEY
} from "../../no-code/injectionKeys";
import {NoCodeProps} from "../../flows/noCodeTypes";
import {deepEqual} from "../../../utils/utils";
@@ -68,7 +68,7 @@
dashboardStore.sourceCode = YAML_UTILS.stringify(app);
}
provide(UPDATE_TASK_FUNCTION_INJECTION_KEY, (yaml) => {
provide(UPDATE_YAML_FUNCTION_INJECTION_KEY, (yaml) => {
editorUpdate(yaml)
})

View File

@@ -19,7 +19,8 @@
import {Chart, getDashboard} from "../composables/useDashboards";
import {useChartGenerator} from "../composables/useDashboards";
import {useBreakpoints, breakpointsElement} from "@vueuse/core";
const verticalLayout = useBreakpoints(breakpointsElement).smallerOrEqual("sm");
import {customBarLegend} from "../composables/useLegend";
import {useTheme} from "../../../utils/utils";
@@ -102,7 +103,7 @@
beginAtZero: true,
position: "left",
...DEFAULTS,
display: props.short ? false : true,
display: verticalLayout.value ? false : (props.short ? false : true),
ticks: {
...DEFAULTS.ticks,
callback: value => isDurationAgg() ? Utils.humanDuration(value) : value

View File

@@ -36,6 +36,9 @@
import KestraUtils, {useTheme} from "../../../utils/utils";
import {FilterObject} from "../../../utils/filters";
import {useBreakpoints, breakpointsElement} from "@vueuse/core";
const verticalLayout = useBreakpoints(breakpointsElement).smallerOrEqual("sm");
import {useI18n} from "vue-i18n";
const {t} = useI18n();
@@ -129,7 +132,7 @@
},
position: "left",
...DEFAULTS,
display: props.short || props.execution ? false : true,
display: verticalLayout.value ? false : (props.short || props.execution ? false : true),
ticks: {
...DEFAULTS.ticks,
callback: (value: any) => isDuration(aggregator.value[0]?.[1]?.field) ? KestraUtils.humanDuration(value) : value
@@ -143,7 +146,7 @@
},
position: "right",
...DEFAULTS,
display: props.short ? false : true,
display: verticalLayout.value ? false : (props.short ? false : true),
ticks: {
...DEFAULTS.ticks,
callback: (value: any) => isDuration(aggregator.value[1]?.[1]?.field) ? KestraUtils.humanDuration(value) : value

View File

@@ -25,21 +25,6 @@
<Row :rows="general" />
</div>
<el-divider />
<div class="labels">
<Row :rows="[{icon: LabelMultiple, label: $t('labels')}]">
<template #action>
<SetLabels :execution />
</template>
</Row>
<Labels :labels="execution.labels || []" />
</div>
<el-divider />
<div class="metadata">
<Row :rows="metadata" />
</div>
<el-divider />
<div class="actions">
<Row
@@ -60,6 +45,21 @@
</el-col>
</el-row>
</div>
<el-divider />
<div class="metadata">
<Row :rows="metadata" />
</div>
<el-divider />
<div class="labels">
<Row :rows="[{icon: LabelMultiple, label: $t('labels')}]">
<template #action>
<SetLabels :execution />
</template>
</Row>
<Labels :labels="execution.labels || []" />
</div>
</div>
</el-splitter-panel>
@@ -192,7 +192,7 @@
import ErrorAlert from "./components/main/ErrorAlert.vue";
import Id from "../../Id.vue";
import Cascader from "./components/main/cascaders/Cascader.vue";
import Cascader, {type Element} from "./components/main/cascaders/Cascader.vue";
import TimeSeries from "../../dashboard/sections/TimeSeries.vue";
import PrevNext from "./components/main/PrevNext.vue";
@@ -406,7 +406,7 @@
);
};
const cascaders = [
const cascaders: Element[] = [
{
title: t("variables"),
empty: t("no_variables"),

View File

@@ -83,13 +83,20 @@
children?: Node[];
}
const props = defineProps<{
type DebugTypes = "outputs" | "trigger";
export type Element = {
title: string;
empty: string;
elements?: Record<string, any>;
includeDebug?: "outputs" | "trigger";
execution: Execution;
}>();
includeDebug?: DebugTypes | undefined;
}
const props = defineProps<
Element & {
execution: Execution;
}
>();
const path = ref<string>("");

View File

@@ -103,6 +103,10 @@ export function useValues(label: string | undefined, t?: ReturnType<typeof useI1
STATUSES: buildFromArray(["PENDING", "ACCEPTED", "EXPIRED"]),
AGGREGATIONS: buildFromArray(["SUM", "AVG", "MIN", "MAX"]),
RELATIVE_DATE,
TRIGGER_STATES:[
{label: t("filter.triggerState.enabled"), value: "enabled"},
{label: t("filter.triggerState.disabled"), value: "disabled"}
]
};
return {VALUES, getRelativeDateLabel};

View File

@@ -41,9 +41,9 @@ export const useTriggerFilter = (): ComputedRef<FilterConfiguration> => {
return [...current, `${(previousCombination ? previousCombination + "." : "")}${part}`];
}, []);
}))].map(namespace => ({
label: namespace,
value: namespace
}));
label: namespace,
value: namespace
}));
}
return [];
},
@@ -116,8 +116,22 @@ export const useTriggerFilter = (): ComputedRef<FilterConfiguration> => {
],
valueType: "text",
searchable: true,
},
{
key: "triggerState",
label: t("filter.triggerState.label"),
description: t("filter.triggerState.description"),
comparators: [
Comparators.EQUALS,
Comparators.NOT_EQUALS
],
valueType: "select",
valueProvider: async () => {
const {VALUES} = useValues("triggers");
return VALUES.TRIGGER_STATES;
}
}
]
};
});
};
};

View File

@@ -1,16 +1,13 @@
<template>
<el-tooltip placement="bottom" :content="t('playground.tooltip_persistence')">
<el-switch v-model="playgroundStore.enabled" :activeText="t('playground.toggle')" class="toggle" :class="{'is-active': playgroundStore.enabled}" />
<el-tooltip placement="bottom" :content="$t('playground.tooltip_persistence')">
<el-switch v-model="playgroundStore.enabled" :activeText="$t('playground.toggle')" class="toggle" :class="{'is-active': playgroundStore.enabled}" />
</el-tooltip>
</template>
<script setup lang="ts">
import {useI18n} from "vue-i18n";
import {usePlaygroundStore} from "../../stores/playground";
const {t} = useI18n();
const playgroundStore = usePlaygroundStore();
</script>
<style scoped lang="scss">

View File

@@ -6,7 +6,7 @@
<Keyboard />
</el-icon>
<span class="fs-6">
{{ t("editor_shortcuts.label") }}
{{ $t("editor_shortcuts.label") }}
</span>
</div>
</template>
@@ -27,7 +27,7 @@
</template>
</div>
<div class="text-break">
{{ t(command.description) }}
{{ $t(command.description) }}
</div>
</div>
</div>
@@ -35,11 +35,9 @@
</template>
<script setup lang="ts">
import {useI18n} from "vue-i18n";
import Keyboard from "vue-material-design-icons/Keyboard.vue";
import {useKeyShortcuts} from "../../utils/useKeyShortcuts";
const {t} = useI18n();
const {isKeyShortcutsDialogShown} = useKeyShortcuts();
const commands = [

View File

@@ -97,7 +97,6 @@
<script setup lang="ts">
import {
computed,
getCurrentInstance,
h,
inject,
onBeforeUnmount,
@@ -126,7 +125,7 @@
import uniqBy from "lodash/uniqBy";
import {useI18n} from "vue-i18n";
import {ElDatePicker} from "element-plus";
import {Moment} from "moment";
import moment, {Moment} from "moment";
import PlaceholderContentWidget from "../../composables/monaco/PlaceholderContentWidget";
import Utils from "../../utils/utils";
import {hashCode} from "../../utils/global";
@@ -137,7 +136,6 @@
import EditorType = editor.EditorType;
import {useRoute} from "vue-router";
const currentInstance = getCurrentInstance()!;
const {t} = useI18n();
const textAreaValue = computed({
@@ -371,8 +369,7 @@
}
}, {deep: true});
const nowMoment: Moment = currentInstance.appContext.config.globalProperties.$moment().startOf("day");
const nowMoment: Moment = moment().startOf("day");
function addedSuggestRows(mutations: MutationRecord[]) {
return mutations.flatMap(({addedNodes}) => {
const nodes = [...addedNodes];
@@ -461,7 +458,7 @@
endColumn: wordAtPosition?.endColumn ?? position?.column
},
// We don't use the selectedDate directly because if user modifies the input value directly it doesn't work otherwise
text: `${currentInstance.appContext.config.globalProperties.$moment(
text: `${moment(
datePicker.value!.$el.nextElementSibling.querySelector("input").value
).toISOString(true)} `,
forceMoveMarkers: true

View File

@@ -4,7 +4,7 @@
id="side-menu"
:menu
@update:collapsed="onToggleCollapse"
width="268px"
width="280px"
:collapsed="collapsed"
linkComponentName="LeftMenuLink"
hideToggle

View File

@@ -1,11 +1,11 @@
<template>
<nav class="d-flex align-items-center w-100 gap-3 top-bar">
<SidebarToggleButton
v-if="layoutStore.sideMenuCollapsed"
@toggle="layoutStore.setSideMenuCollapsed(false)"
/>
<div class="d-flex flex-column flex-grow-1 flex-shrink-1 overflow-hidden top-title">
<div class="d-flex align-items-end gap-2">
<SidebarToggleButton
v-if="layoutStore.sideMenuCollapsed"
@toggle="layoutStore.setSideMenuCollapsed(false)"
/>
<div class="d-flex flex-column gap-2">
<el-breadcrumb v-if="breadcrumb">
<el-breadcrumb-item v-for="(item, x) in breadcrumb" :key="x" :class="{'pe-none': item.disabled}">

View File

@@ -43,7 +43,9 @@
BLOCK_SCHEMA_PATH_INJECTION_KEY,
CLOSE_TASK_FUNCTION_INJECTION_KEY,
CREATE_TASK_FUNCTION_INJECTION_KEY,
CREATING_FLOW_INJECTION_KEY,
CREATING_TASK_INJECTION_KEY,
DEFAULT_NAMESPACE_INJECTION_KEY,
EDIT_TASK_FUNCTION_INJECTION_KEY,
EDITING_TASK_INJECTION_KEY,
FIELDNAME_INJECTION_KEY,
@@ -55,7 +57,7 @@
REF_PATH_INJECTION_KEY,
ROOT_SCHEMA_INJECTION_KEY,
SCHEMA_DEFINITIONS_INJECTION_KEY,
UPDATE_TASK_FUNCTION_INJECTION_KEY,
UPDATE_YAML_FUNCTION_INJECTION_KEY,
} from "./injectionKeys";
import {useFlowFields, SECTIONS_IDS} from "./utils/useFlowFields";
import debounce from "lodash/debounce";
@@ -65,6 +67,7 @@
import {useKeyboardSave} from "./utils/useKeyboardSave";
import {deepEqual} from "../../utils/utils";
import {useScrollMemory} from "../../composables/useScrollMemory";
import {defaultNamespace} from "../../composables/useNamespaces";
const props = defineProps<NoCodeProps>();
@@ -166,6 +169,8 @@
provide(REF_PATH_INJECTION_KEY, props.refPath);
provide(PANEL_INJECTION_KEY, panel)
provide(POSITION_INJECTION_KEY, props.position ?? "after");
provide(CREATING_FLOW_INJECTION_KEY, flowStore.isCreating ?? false);
provide(DEFAULT_NAMESPACE_INJECTION_KEY, computed(() => flowStore.flow?.namespace ?? defaultNamespace() ?? "company.team"));
provide(CREATING_TASK_INJECTION_KEY, props.creatingTask);
provide(EDITING_TASK_INJECTION_KEY, props.editingTask);
provide(FIELDNAME_INJECTION_KEY, props.fieldName);
@@ -184,7 +189,7 @@
emit("closeTask")
})
provide(UPDATE_TASK_FUNCTION_INJECTION_KEY, (yaml) => {
provide(UPDATE_YAML_FUNCTION_INJECTION_KEY, (yaml) => {
editorUpdate(yaml)
})

View File

@@ -44,7 +44,6 @@
<script setup lang="ts">
import {computed, inject, ref} from "vue";
import {BLOCK_SCHEMA_PATH_INJECTION_KEY} from "../../injectionKeys";
import {useFlowStore} from "../../../../stores/flow";
import Creation from "./taskList/buttons/Creation.vue";
import Element from "./taskList/Element.vue";
import * as YAML_UTILS from "@kestra-io/ui-libs/flow-yaml-utils";
@@ -53,7 +52,7 @@
import {
CREATING_TASK_INJECTION_KEY, FULL_SCHEMA_INJECTION_KEY, FULL_SOURCE_INJECTION_KEY,
PARENT_PATH_INJECTION_KEY, REF_PATH_INJECTION_KEY,
PARENT_PATH_INJECTION_KEY, REF_PATH_INJECTION_KEY, UPDATE_YAML_FUNCTION_INJECTION_KEY,
} from "../../injectionKeys";
import {SECTIONS_MAP} from "../../../../utils/constants";
import {getValueAtJsonPath} from "../../../../utils/utils";
@@ -83,8 +82,6 @@
inheritAttrs: false
});
const flowStore = useFlowStore();
interface Task {
id:string,
type:string
@@ -150,6 +147,8 @@
const movedIndex = ref(-1);
const updateYaml = inject(UPDATE_YAML_FUNCTION_INJECTION_KEY, () => {});
const moveElement = (
items: Record<string, any>[] | undefined,
elementID: string,
@@ -171,7 +170,7 @@
movedIndex.value = -1;
}, 200);
flowStore.flowYaml =
updateYaml(
YAML_UTILS.swapBlocks({
source:flow.value,
section: SECTIONS_MAP[section.value.toLowerCase() as keyof typeof SECTIONS_MAP],
@@ -179,6 +178,7 @@
key2:items[newIndex][keyName],
keyName,
})
);
};
const fullSchema = inject(FULL_SCHEMA_INJECTION_KEY, ref<Record<string, any>>({}));

View File

@@ -8,18 +8,17 @@
</template>
<script lang="ts" setup>
import {computed, onMounted} from "vue";
import {useFlowStore} from "../../../../stores/flow";
import {onMounted, inject, computed, provide} from "vue";
import NamespaceSelect from "../../../namespaces/components/NamespaceSelect.vue";
import {CREATING_FLOW_INJECTION_KEY, DEFAULT_NAMESPACE_INJECTION_KEY} from "../../injectionKeys";
const modelValue = defineModel<string>();
const flowStore = useFlowStore();
const isCreating = computed(() => flowStore.isCreating);
const isCreating = inject(CREATING_FLOW_INJECTION_KEY, false);
const defaultNamespace = inject(DEFAULT_NAMESPACE_INJECTION_KEY, computed(() => ""));
provide(DEFAULT_NAMESPACE_INJECTION_KEY, computed(() => modelValue.value || defaultNamespace.value));
onMounted(() => {
const flowNamespace = flowStore.flow?.namespace;
const flowNamespace = defaultNamespace.value;
if (!modelValue.value && flowNamespace) {
modelValue.value = flowNamespace;
}

View File

@@ -28,7 +28,15 @@
</Wrapper>
</template>
</el-collapse-item>
<el-collapse-item name="general" v-if="generalProperties?.length" :title="$t('no_code.sections.general')">
<template v-for="[fieldKey, fieldSchema] in generalProperties" :key="fieldKey">
<Wrapper>
<template #tasks>
<TaskObjectField v-bind="fieldProps(fieldKey, fieldSchema)" />
</template>
</Wrapper>
</template>
</el-collapse-item>
<el-collapse-item name="deprecated" v-if="deprecatedProperties?.length" :title="$t('no_code.sections.deprecated')">
<template v-for="[fieldKey, fieldSchema] in deprecatedProperties" :key="fieldKey">
<Wrapper>
@@ -125,6 +133,16 @@
return value?.$deprecated;
}
function isPartOfGroup(value: any, groups: string[]) {
if (value?.allOf) {
return value.allOf.some((item: any) => isPartOfGroup(item, groups));
}
if (value?.anyOf) {
return value.anyOf.some((item: any) => isPartOfGroup(item, groups));
}
return value?.$group && groups.includes(value.$group);
}
const filteredProperties = computed<Entry[]>(() => {
const propertiesProc = (props.properties ?? props.schema?.properties);
const isOutputsContext = props.root?.startsWith("outputs[") || false;
@@ -159,9 +177,17 @@
const protectedRequiredProperties = computed<Entry[]>(() => {
return requiredProperties.value.length ? requiredProperties.value : sortedProperties.value;
});
const connectionProperties = computed<Entry[]>(() => {
return props.merge ? [] : sortedProperties.value.filter(([p, v]) => v && !isRequired(p) && isPartOfGroup(v, ["connection"]));
});
const optionalProperties = computed<Entry[]>(() => {
return props.merge ? [] : sortedProperties.value.filter(([p, v]) => v && !isRequired(p) && !isDeprecated(v) && v.$group !== "connection");
return props.merge ? [] : sortedProperties.value.filter(([p, v]) => v && !isRequired(p) && !isDeprecated(v) && !isPartOfGroup(v, ["core","connection"]));
});
const generalProperties = computed<Entry[]>(() => {
return props.merge ? [] : sortedProperties.value.filter(([p, v]) => v && !isRequired(p) && !isDeprecated(v) && isPartOfGroup(v, ["core"]));
});
const deprecatedProperties = computed<Entry[]>(() => {
@@ -169,9 +195,6 @@
return props.merge ? [] : sortedProperties.value.filter(([k, v]) => v && isDeprecated(v) && obj[k] !== undefined);
});
const connectionProperties = computed<Entry[]>(() => {
return props.merge ? [] : sortedProperties.value.filter(([p, v]) => v && v.$group === "connection" && !isRequired(p));
});
function onInput(value: any) {
emit("update:modelValue", collapseEmptyValues(value));

View File

@@ -24,6 +24,7 @@ export const POSITION_INJECTION_KEY = Symbol("position-injection-key") as Inject
* NOTE: different from the `isCreating` flag coming from the store. `isCreating` refers to the Complete flow being in creation
*/
export const CREATING_TASK_INJECTION_KEY = Symbol("creating-injection-key") as InjectionKey<boolean>
export const CREATING_FLOW_INJECTION_KEY = Symbol("creating-flow-injection-key") as InjectionKey<boolean>
/**
* When creating anew task, allows to specify a field where the new task should be injected.
* @example
@@ -51,9 +52,9 @@ export const EDIT_TASK_FUNCTION_INJECTION_KEY = Symbol("edit-function-injection-
*/
export const CLOSE_TASK_FUNCTION_INJECTION_KEY = Symbol("close-function-injection-key") as InjectionKey<() => void>
/**
* We call this function when a task is changed, as soon as the first click or type is done
* Call this function to update the full Yaml content
*/
export const UPDATE_TASK_FUNCTION_INJECTION_KEY = Symbol("update-function-injection-key") as InjectionKey<(yaml: string) => void>
export const UPDATE_YAML_FUNCTION_INJECTION_KEY = Symbol("update-function-injection-key") as InjectionKey<(yaml: string) => void>
/**
* Set this to override the contents of the no-code editor with a component of your choice
* This is used to display the metadata edition inputs
@@ -92,4 +93,6 @@ export const SCHEMA_DEFINITIONS_INJECTION_KEY = Symbol("schema-definitions-injec
export const DATA_TYPES_MAP_INJECTION_KEY = Symbol("data-types-injection-key") as InjectionKey<ComputedRef<Record<string, string[] | undefined>>>
export const ON_TASK_EDITOR_CLICK_INJECTION_KEY = Symbol("on-task-editor-click-injection-key") as InjectionKey<(elt?: Partial<NoCodeElement>) => void>;
export const ON_TASK_EDITOR_CLICK_INJECTION_KEY = Symbol("on-task-editor-click-injection-key") as InjectionKey<(elt?: Partial<NoCodeElement>) => void>;
export const DEFAULT_NAMESPACE_INJECTION_KEY = Symbol("default-namespace-injection-key") as InjectionKey<ComputedRef<string>>;

View File

@@ -16,7 +16,7 @@
import {PLUGIN_DEFAULTS_SECTION, SECTIONS_MAP} from "../../../utils/constants";
import {
CLOSE_TASK_FUNCTION_INJECTION_KEY,
UPDATE_TASK_FUNCTION_INJECTION_KEY,
UPDATE_YAML_FUNCTION_INJECTION_KEY,
FULL_SOURCE_INJECTION_KEY, CREATING_TASK_INJECTION_KEY,
PARENT_PATH_INJECTION_KEY, POSITION_INJECTION_KEY,
REF_PATH_INJECTION_KEY, EDIT_TASK_FUNCTION_INJECTION_KEY,
@@ -37,7 +37,7 @@
const fieldName = inject(FIELDNAME_INJECTION_KEY, undefined);
const blockSchemaPath = inject(BLOCK_SCHEMA_PATH_INJECTION_KEY, ref(""));
const updateTask = inject(UPDATE_TASK_FUNCTION_INJECTION_KEY, () => {})
const updateTask = inject(UPDATE_YAML_FUNCTION_INJECTION_KEY, () => {})
const closeTaskAddition = inject(
CLOSE_TASK_FUNCTION_INJECTION_KEY,

View File

@@ -3,7 +3,7 @@
<template #additional-right>
<ul>
<li>
<el-button v-if="canCreate" tag="router-link" :to="{name: 'flows/create', query: {namespace: $route.query.namespace}}" :icon="Plus" type="primary">
<el-button v-if="canCreate" tag="router-link" :to="{name: 'flows/create', query: {namespace: $route.query.namespace}}" :icon="Plus" type="secondary">
{{ $t('create_flow') }}
</el-button>
</li>
@@ -30,7 +30,7 @@
<el-button
v-if="isOSS"
@click="startTour"
:icon="Plus"
:icon="Compass"
size="large"
type="primary"
class="px-3 p-4 section-1-link product-link"
@@ -39,7 +39,7 @@
</el-button>
<el-button
v-else
:icon="Plus"
:icon="Compass"
tag="router-link"
:to="{name: 'flows/create'}"
size="large"
@@ -74,6 +74,7 @@
import {useCoreStore} from "../../stores/core";
import {useI18n} from "vue-i18n";
import Plus from "vue-material-design-icons/Plus.vue";
import Compass from "vue-material-design-icons/Compass.vue";
import Play from "vue-material-design-icons/Play.vue";
import OnboardingBottom from "override/components/OnboardingBottom.vue";
import kestraWelcome from "../../assets/onboarding/kestra_welcome.svg";

View File

@@ -156,7 +156,7 @@
<el-form-item :label="$t('secret.key')" prop="key">
<el-input v-model="secret.key" :disabled="secret.update" required />
</el-form-item>
<el-form-item v-if="!secret.update" :label="$t('secret.name')" prop="value">
<el-form-item v-if="!secret.update" :label="$t('secret.name')" prop="value" required>
<MultilineSecret v-model="secret.value" :placeholder="secretModalTitle" />
</el-form-item>
<el-form-item v-if="secret.update" :label="$t('secret.name')" prop="value">

View File

@@ -1,3 +1,4 @@
import {computed, watch} from "vue";
import {useI18n} from "vue-i18n";
import {configureMonacoYaml} from "monaco-yaml";
import * as monaco from "monaco-editor/esm/vs/editor/editor.api";
@@ -21,6 +22,7 @@ import {
registerPebbleAutocompletion
} from "./pebbleLanguageConfigurator";
import {usePluginsStore} from "../../../stores/plugins";
import {useBlueprintsStore} from "../../../stores/blueprints";
import {languages} from "monaco-editor/esm/vs/editor/editor.api";
import CompletionItem = languages.CompletionItem;
@@ -34,11 +36,14 @@ export class YamlLanguageConfigurator extends AbstractLanguageConfigurator {
}
async configureLanguage(pluginsStore: ReturnType<typeof usePluginsStore>) {
const validateYAML = computed(() => useBlueprintsStore().validateYAML);
watch(validateYAML, (shouldValidate) => configureMonacoYaml(monaco, {validate: shouldValidate}));
configureMonacoYaml(monaco, {
enableSchemaRequest: true,
hover: localStorage.getItem("hoverTextEditor") === "true",
completion: true,
validate: true,
validate: validateYAML.value ?? true,
format: true,
schemas: yamlSchemas()
});

View File

@@ -1,5 +1,11 @@
<template>
<SideBar v-if="menu" :menu :showLink="showLink" @menu-collapse="onCollapse">
<SideBar
v-if="menu"
:menu
:showLink
@menu-collapse="onCollapse"
:class="{overlay: verticalLayout}"
>
<template #footer>
<Auth />
</template>
@@ -11,6 +17,9 @@
import SideBar from "../../components/layout/SideBar.vue";
import Auth from "../../override/components/auth/Auth.vue";
import {useBreakpoints, breakpointsElement} from "@vueuse/core";
const verticalLayout = useBreakpoints(breakpointsElement).smallerOrEqual("sm");
withDefaults(defineProps<{
showLink?: boolean
}>(), {

View File

@@ -56,7 +56,10 @@
<div v-if="!system && blueprint.tags?.length > 0" class="tags-section">
<span v-for="tag in processedTags(blueprint.tags)" :key="tag.original" class="tag-item">{{ tag.display }}</span>
</div>
<div class="text-section">
<div v-if="blueprint.template" class="tags-section">
<span class="tag-item">{{ $t('template') }}</span>
</div>
<div class="text-section">
<h3 class="title">
{{ blueprint.title ?? blueprint.id }}
</h3>
@@ -151,6 +154,7 @@
id: string;
tags: string[];
title?: string;
template?: Record<string, any>;
}[] | undefined>(undefined);
const error = ref(false);
const icon = {ContentCopy};

View File

@@ -2,7 +2,7 @@
<Navbar :title="routeInfo.title">
<template #additional-right>
<Action
v-if="canCreate"
v-if="!isOSS && canCreate"
:label="t('create')"
:to="{name: 'namespaces/create', params: {tab: 'edit'}}"
/>
@@ -142,6 +142,8 @@
const systemNamespace = computed(
() => miscStore.configs?.systemNamespace || "system",
);
const isOSS = computed(() => useMiscStore().configs?.edition === "OSS")
const namespacesHierarchy = computed(() => {
if (namespaces.value === undefined || namespaces.value.length === 0) {

View File

@@ -1,45 +1,70 @@
import {computed} from "vue";
import {useRoute, useRouter} from "vue-router";
import {useRoute, useRouter, type RouteRecordNameGeneric} from "vue-router";
import {useI18n} from "vue-i18n";
import {useMiscStore} from "override/stores/misc";
import {getDashboard} from "../../components/dashboard/composables/useDashboards";
// Main icons
import ChartLineVariant from "vue-material-design-icons/ChartLineVariant.vue";
import FileTreeOutline from "vue-material-design-icons/FileTreeOutline.vue";
import LayersTripleOutline from "vue-material-design-icons/LayersTripleOutline.vue";
import ContentCopy from "vue-material-design-icons/ContentCopy.vue";
import TimelineClockOutline from "vue-material-design-icons/TimelineClockOutline.vue";
import TimelineTextOutline from "vue-material-design-icons/TimelineTextOutline.vue";
import BallotOutline from "vue-material-design-icons/BallotOutline.vue";
import ShieldAccountVariantOutline from "vue-material-design-icons/ShieldAccountVariantOutline.vue";
import ViewDashboardVariantOutline from "vue-material-design-icons/ViewDashboardVariantOutline.vue";
import Connection from "vue-material-design-icons/Connection.vue";
import DotsSquare from "vue-material-design-icons/DotsSquare.vue";
import FormatListGroupPlus from "vue-material-design-icons/FormatListGroupPlus.vue";
import DatabaseOutline from "vue-material-design-icons/DatabaseOutline.vue";
import ShieldKeyOutline from "vue-material-design-icons/ShieldKeyOutline.vue";
import PlayOutline from "vue-material-design-icons/PlayOutline.vue";
import FileDocumentOutline from "vue-material-design-icons/FileDocumentOutline.vue";
import FlaskOutline from "vue-material-design-icons/FlaskOutline.vue";
// import PackageVariantClosed from "vue-material-design-icons/PackageVariantClosed.vue";
import FolderOpenOutline from "vue-material-design-icons/FolderOpenOutline.vue";
import PuzzleOutline from "vue-material-design-icons/PuzzleOutline.vue";
import ShapePlusOutline from "vue-material-design-icons/ShapePlusOutline.vue";
import OfficeBuildingOutline from "vue-material-design-icons/OfficeBuildingOutline.vue";
import ServerNetworkOutline from "vue-material-design-icons/ServerNetworkOutline.vue";
// Blueprints icons
import Wrench from "vue-material-design-icons/Wrench.vue";
// Tenant Administration icons
import Monitor from "vue-material-design-icons/Monitor.vue";
import DatabaseOutline from "vue-material-design-icons/DatabaseOutline.vue";
import LockOutline from "vue-material-design-icons/LockOutline.vue";
import LightningBolt from "vue-material-design-icons/LightningBolt.vue";
import Battery40 from "vue-material-design-icons/Battery40.vue";
import ShieldAccount from "vue-material-design-icons/ShieldAccount.vue";
export type MenuItem = {
title: string;
routes?: RouteRecordNameGeneric[];
href?: {
path?: string,
name: string,
params?: Record<string, any>,
query?: Record<string, any>
},
child?: MenuItem[],
disabled?: boolean,
name: string;
params?: Record<string, any>;
query?: Record<string, any>;
};
icon?: {
element?: any;
class?: any;
};
child?: MenuItem[];
attributes?: {
locked?: boolean;
};
hidden?: boolean;
};
export function useLeftMenu() {
const {t} = useI18n({useScope: "global"});
const $route = useRoute();
const $router = useRouter();
const miscStore = useMiscStore();
const {t} = useI18n({useScope: "global"});
const configs = useMiscStore().configs;
/**
* Returns all route names that start with the given route
* @param route
* @returns
* Returns the names of all registered routes whose name starts with the given prefix.
*
* @param route - The route name prefix to match against.
* @returns An array of route names starting with the provided prefix.
*/
function routeStartWith(route: string) {
return $router
@@ -50,140 +75,145 @@ export function useLeftMenu() {
.map((r) => r.name);
}
const flatMenuItems = (items: MenuItem[]): MenuItem[] => {
return items.flatMap(item => item.child ? [item, ...flatMenuItems(item.child)] : [item])
}
const menu = computed(() => {
const generatedMenu = [
const menu = computed<MenuItem[]>(() => {
return [
{
title: t("dashboards.labels.plural"),
href: {
name: "home",
params: {dashboard: getDashboard($route, "id")},
params: {
dashboard: getDashboard($route, "id"),
},
},
title: t("dashboards.labels.plural"),
icon: {
element: ViewDashboardVariantOutline,
class: "menu-icon",
element: ChartLineVariant,
},
},
{
href: {name: "flows/list"},
routes: routeStartWith("flows"),
title: t("flows"),
routes: routeStartWith("flows"),
href: {
name: "flows/list",
},
icon: {
element: FileTreeOutline,
class: "menu-icon",
},
exact: false,
},
{
href: {name: "apps/list"},
routes: routeStartWith("apps"),
title: t("apps"),
routes: routeStartWith("apps"),
href: {
name: "apps/list",
},
icon: {
element: FormatListGroupPlus,
class: "menu-icon",
element: LayersTripleOutline,
},
attributes: {
locked: true,
},
},
{
href: {name: "templates/list"},
routes: routeStartWith("templates"),
title: t("templates"),
icon: {
element: ContentCopy,
class: "menu-icon",
},
hidden: !miscStore.configs?.isTemplateEnabled,
},
{
href: {name: "executions/list"},
routes: routeStartWith("executions"),
title: t("executions"),
routes: routeStartWith("executions"),
href: {
name: "executions/list",
},
icon: {
element: TimelineClockOutline,
class: "menu-icon",
element: PlayOutline,
},
},
{
href: {name: "logs/list"},
routes: routeStartWith("logs"),
title: t("logs"),
routes: routeStartWith("logs"),
href: {
name: "logs/list",
},
icon: {
element: TimelineTextOutline,
class: "menu-icon",
element: FileDocumentOutline,
},
},
{
href: {name: "tests/list"},
routes: routeStartWith("tests"),
title: t("demos.tests.label"),
routes: routeStartWith("tests"),
href: {
name: "tests/list",
},
icon: {
element: FlaskOutline,
class: "menu-icon"
},
attributes: {
locked: true,
},
},
// TODO: To add Assets entry here in future release
// Uncomment PackageVariantClosed on line 25 and use as the icon
{
href: {name: "namespaces/list"},
routes: routeStartWith("namespaces"),
title: t("namespaces"),
routes: routeStartWith("namespaces"),
href: {
name: "namespaces/list",
},
icon: {
element: DotsSquare,
class: "menu-icon",
element: FolderOpenOutline,
},
},
{
href: {name: "kv/list"},
routes: routeStartWith("kv"),
title: t("kv.name"),
title: t("templates"),
routes: routeStartWith("templates"),
href: {
name: "templates/list",
},
icon: {
element: DatabaseOutline,
class: "menu-icon",
element: ContentCopy,
},
hidden: !configs?.isTemplateEnabled,
},
{
title: t("plugins.names"),
routes: routeStartWith("plugins"),
href: {
name: "plugins/list",
},
icon: {
element: PuzzleOutline,
},
},
{
href: {name: "secrets/list"},
routes: routeStartWith("secrets"),
title: t("secret.names"),
icon: {
element: ShieldKeyOutline,
class: "menu-icon",
},
attributes: {
locked: true,
},
},
{
routes: routeStartWith("blueprints"),
title: t("blueprints.title"),
routes: routeStartWith("blueprints"),
icon: {
element: BallotOutline,
class: "menu-icon",
element: ShapePlusOutline,
},
child: [
{
title: t("blueprints.custom"),
routes: routeStartWith("blueprints/flow"),
attributes: {
locked: true,
},
routes: routeStartWith("blueprints/flow/custom"),
href: {
name: "blueprints",
params: {kind: "flow", tab: "custom"},
params: {
kind: "flow",
tab: "custom",
},
},
icon: {
element: Wrench,
},
attributes: {
locked: true,
},
},
{
title: t("blueprints.flows"),
routes: routeStartWith("blueprints/flow"),
routes: routeStartWith("blueprints/flow/community"),
href: {
name: "blueprints",
params: {kind: "flow", tab: "community"},
params: {
kind: "flow",
tab: "community",
},
},
icon: {
element: FileTreeOutline,
},
},
{
@@ -191,91 +221,144 @@ export function useLeftMenu() {
routes: routeStartWith("blueprints/dashboard"),
href: {
name: "blueprints",
params: {kind: "dashboard", tab: "community"},
params: {
kind: "dashboard",
tab: "community",
},
},
icon: {
element: ChartLineVariant,
},
},
],
},
{
href: {name: "plugins/list"},
routes: routeStartWith("plugins"),
title: t("plugins.names"),
title: t("tenant.name"),
routes: [
"admin/stats",
"kv",
"secrets",
"admin/triggers",
"admin/auditlogs",
"admin/iam",
"admin/concurrency-limits",
]
.map(routeStartWith)
.find((routes) => routes.length > 0),
icon: {
element: Connection,
class: "menu-icon",
},
},
{
title: t("administration"),
routes: routeStartWith("admin"),
icon: {
element: ShieldAccountVariantOutline,
class: "menu-icon",
element: OfficeBuildingOutline,
},
child: [
{
href: {name: "admin/iam"},
routes: routeStartWith("admin/iam"),
title: t("iam"),
attributes: {
locked: true,
},
},
{
href: {name: "admin/auditlogs/list"},
routes: routeStartWith("admin/auditlogs"),
title: t("auditlogs"),
attributes: {
locked: true,
},
},
{
href: {name: "admin/triggers"},
routes: routeStartWith("admin/triggers"),
title: t("triggers"),
},
{
href: {name: "admin/instance"},
routes: routeStartWith("admin/instance"),
title: t("instance"),
attributes: {
locked: true,
},
},
{
href: {name: "admin/tenants/list"},
routes: routeStartWith("admin/tenants"),
title: t("tenant.names"),
attributes: {
locked: true,
},
},
{
href: {name: "admin/concurrency-limits"},
routes: routeStartWith("admin/concurrency-limits"),
title: t("concurrency limits"),
hidden: !miscStore.configs?.isConcurrencyViewEnabled,
},
{
href: {name: "admin/stats"},
routes: routeStartWith("admin/stats"),
title: t("system overview"),
routes: routeStartWith("admin/stats"),
href: {
name: "admin/stats",
},
icon: {
element: Monitor,
},
},
{
title: t("kv.name"),
routes: routeStartWith("kv"),
href: {
name: "kv/list",
},
icon: {
element: DatabaseOutline,
},
},
{
title: t("secret.names"),
routes: routeStartWith("secrets"),
href: {
name: "secrets/list",
},
icon: {
element: LockOutline,
},
attributes: {
locked: true,
},
},
{
title: t("triggers"),
routes: routeStartWith("admin/triggers"),
href: {
name: "admin/triggers",
},
icon: {
element: LightningBolt,
},
},
{
title: t("auditlogs"),
routes: routeStartWith("admin/auditlogs"),
href: {
name: "admin/auditlogs/list",
},
icon: {
element: FileDocumentOutline,
},
attributes: {
locked: true,
},
},
{
title: t("concurrency limits"),
routes: routeStartWith("admin/concurrency-limits"),
href: {
name: "admin/concurrency-limits",
},
icon: {
element: Battery40,
},
hidden: !configs?.isConcurrencyViewEnabled,
},
{
title: t("iam"),
routes: routeStartWith("admin/iam"),
href: {
name: "admin/iam",
},
icon: {
element: ShieldAccount,
},
attributes: {
locked: true,
},
},
],
},
{
title: t("instance"),
routes: routeStartWith("admin/instance"),
href: {
name: "admin/instance",
},
icon: {
element: ServerNetworkOutline,
},
attributes: {
locked: true,
},
},
].map((item: MenuItem) => {
if (item.icon?.element) {
item.icon.class = "menu-icon"; // Add default class to all menu icons
}
];
flatMenuItems(generatedMenu).forEach(menuItem => {
if (menuItem.href !== undefined && menuItem.href?.name === $route.name) {
menuItem.href.query = {...$route.query, ...menuItem.href?.query};
if (item.href && item.href?.name === $route.name) {
item.href.query = {
...$route.query,
...item.href?.query,
};
}
return item;
});
return generatedMenu;
});
return {
routeStartWith,
menu
};
return {menu};
}

View File

@@ -99,7 +99,6 @@ export default [
//Namespaces
{name: "namespaces/list", path: "/:tenant?/namespaces", component: () => import("override/components/namespaces/Namespaces.vue")},
{name: "namespaces/create", path: "/:tenant?/namespaces/new/:tab?", component: () => import("../components/namespaces/Namespace.vue")},
{name: "namespaces/update", path: "/:tenant?/namespaces/edit/:id/:tab?", component: () => import("../components/namespaces/Namespace.vue")},
//Docs
@@ -110,7 +109,7 @@ export default [
//Admin
{name: "admin/triggers", path: "/:tenant?/admin/triggers", component: () => import("../components/admin/Triggers.vue")},
{name: "admin/stats", path: "/:tenant?/admin/stats", component: () => import("override/components/admin/stats/Stats.vue")},
{name: "admin/stats", path: "/:tenant?/admin/stats/:type?", component: () => import("override/components/admin/stats/Stats.vue")},
{name: "admin/concurrency-limits", path: "/:tenant?/admin/concurrency-limits", component: () => import("../components/admin/ConcurrencyLimits.vue")},
//Setup

View File

@@ -25,6 +25,8 @@ interface Blueprint {
[key: string]: any;
}
export type TemplateArgument = Record<string, Input>;
export interface BlueprintTemplate {
source: string;
templateArguments: Record<string, Input>;
@@ -55,6 +57,8 @@ export const useBlueprintsStore = defineStore("blueprints", () => {
const source = ref<string | undefined>(undefined);
const graph = ref<any | undefined>(undefined);
const validateYAML = ref<boolean>(true); // Used to enable/disable YAML validation in Monaco editor, for the purpose of Templated Blueprints
const getBlueprints = async (options: Options) => {
const PARAMS = {params: options.params, ...VALIDATE};
@@ -166,6 +170,8 @@ export const useBlueprintsStore = defineStore("blueprints", () => {
source,
graph,
validateYAML,
getBlueprints,
getBlueprint,
getBlueprintSource,

View File

@@ -1,208 +1,237 @@
@import "@kestra-io/ui-libs/src/scss/variables.scss";
#app {
.v-sidebar-menu.vsm_expanded.overlay {
position: absolute;
}
#app {
.vsm--icon {
transition: left 0.2s ease;
font-size: 1.5em;
background-color: transparent !important;
padding-bottom: 15px;
width: 30px !important;
z-index: 20; // in collapsed menu, keep the icon above the opening menu
.vsm--item {
padding: 0 30px;
transition: padding 0.2s ease;
}
svg {
position: relative;
margin-top: 13px;
.vsm--icon {
width: 20px;
margin-right: calc($spacer / 2);
transition: left 0.2s ease;
background-color: transparent !important;
padding-bottom: 15px;
svg {
height: 20px !important;
width: 20px !important;
position: relative;
margin-top: 13px;
}
}
.vsm--title {
font-size: $font-size-sm;
&>span {
width: 100%;
}
}
.vsm--child {
.vsm--item {
padding: 0;
.vsm--title {
font-size: $font-size-xs;
}
}
// Make Plugins icon appear as outline
.vsm--link[href*="plugins"] .vsm--icon svg {
fill: none !important;
stroke: currentColor !important;
stroke-width: 1.5 !important;
.vsm--icon {
width: 1rem;
svg {
height: 1rem !important;
width: 1rem !important;
}
}
}
.vsm--link {
height: 30px;
padding: 0.25rem 0.5rem;
margin-bottom: 0.3rem;
border-radius: .25rem;
transition: padding 0.2s ease;
color: var(--ks-content-primary);
box-shadow: none;
&_active,
body &_active:hover {
background-color: var(--ks-button-background-primary) !important;
color: var(--ks-button-content-primary);
font-weight: normal;
}
.vsm--item {
padding: 0 30px;
transition: padding 0.2s ease;
&.vsm--link_open,
&.vsm--link_open:hover {
background-color: var(--ks-background-left-menu);
color: var(--ks-content-primary);
}
.vsm--child {
.vsm--item {
padding: 0;
.vsm--title {
padding-left: 10px;
&_disabled {
pointer-events: auto;
opacity: 1;
}
&:hover,
body &_hover {
background-color: var(--ks-button-background-secondary-hover);
}
.el-tooltip__trigger {
display: flex;
}
&>span {
max-width: 100%;
}
}
.vsm--link_open {
position: relative !important;
z-index: 3;
}
.vsm_collapsed .vsm--link_open {
position: static !important;
}
.vsm--child .vsm--link {
padding: 0 0.2rem;
position: relative !important;
margin-left: 1.8rem;
&.vsm--link_level-3 {
margin-left: 3.6rem;
& span {
margin-left: calc($spacer / 4);
}
}
.vsm--icon {
margin-left: calc($spacer / 2);
color: var(--ks-content-secondary);
}
&.vsm--link_active .vsm--icon {
color: var(--ks-button-content-primary);
}
&:before {
content: "";
position: absolute;
left: -.8rem;
height: 150%;
border: 2px solid var(--ks-border-primary);
border-top: 0;
border-right: 0;
z-index: 2;
// mask the right half of the object and the top border
clip-path: polygon(50% 8px, 50% 100%, 0 100%, 0 8px);
}
}
.vsm--title span:first-child {
flex-grow: 0;
}
.vsm--link_open.vsm--link_active {
.vsm--title,
.vsm--icon {
color: var(--ks-button-content-primary);
}
}
.vsm--arrow_default {
width: 8px;
&:before {
border-left-width: 1px;
border-bottom-width: 1px;
height: 4px;
width: 4px;
top: 3px;
}
}
a.vsm--link_active[href="#"] {
cursor: initial !important;
}
.vsm--dropdown {
background-color: var(--ks-background-left-menu);
border-radius: 4px;
margin-bottom: .5rem;
.vsm--title {
top: 3px;
}
}
.vsm--scroll-thumb {
background: var(--ks-border-primary) !important;
border-radius: 8px;
}
.vsm--mobile-bg {
border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
}
.vsm_collapsed {
.logo {
>* {
left: 10px;
span.img {
background-size: 207px 55px;
}
}
}
.vsm--link {
padding: 0.3rem 0.5rem;
margin-bottom: 0.3rem;
border-radius: .25rem;
transition: padding 0.2s ease;
color: var(--ks-content-primary);
box-shadow: none;
padding-left: 13px;
&_active, body &_active:hover {
background-color: var(--ks-button-background-primary) !important;
color: var(--ks-button-content-primary);
font-weight: normal;
}
&.vsm--link_open, &.vsm--link_open:hover {
background-color: var(--ks-background-left-menu);
color: var(--ks-content-primary);
}
&_disabled {
pointer-events: auto;
opacity: 1;
}
&:hover, body &_hover {
background-color: var(--ks-button-background-secondary-hover);
}
.el-tooltip__trigger {
display: flex;
}
& > span{
max-width: 100%;
}
}
.vsm--link_open{
position: relative !important;
z-index: 3;
}
.vsm_collapsed .vsm--link_open{
position: static !important;
}
.vsm--child .vsm--link{
padding: 0 0.2rem;
position: relative!important;
font-size: 14px;
margin-left: 1.8rem;
.vsm--icon {
margin-right:4px;
color: var(--ks-content-secondary);
}
&.vsm--link_active .vsm--icon{
&.vsm--link_hover {
background-color: var(--ks-button-background-primary);
color: var(--ks-button-content-primary);
}
&:before{
content: "";
position: absolute;
left: -.8rem;
top: -2.5rem;
border-radius: 8px;
width: 1.6rem;
height: 170%;
border: 2px solid var(--ks-border-primary);
border-top:0;
border-right:0;
z-index: 2;
// mask the right half of the object and the top border
clip-path: polygon(50% 8px, 50% 100%, 0 100%, 0 8px);
}
}
.vsm--title span:first-child{
flex-grow: 0;
}
.vsm--link_open.vsm--link_active {
.vsm--title, .vsm--icon {
color: var(--ks-button-content-primary);
}
}
.vsm--arrow_default{
width: 8px;
&:before{
border-left-width: 1px;
border-bottom-width: 1px;
height: 4px;
width: 4px;
top: 3px;
}
}
a.vsm--link_active[href="#"] {
cursor: initial !important;
}
.vsm--dropdown {
background-color: var(--ks-background-left-menu);
border-radius: 4px;
margin-bottom: .5rem;
.vsm--title {
top: 3px;
}
}
.vsm--scroll-thumb {
background: var(--ks-border-primary) !important;
border-radius: 8px;
}
.vsm--mobile-bg {
border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
}
.vsm_collapsed {
.logo {
> * {
left: 10px;
span.img {
background-size: 207px 55px;
}
}
}
.vsm--link {
padding-left: 13px;
&.vsm--link_hover {
background-color: var(--ks-button-background-primary);
color: var(--ks-button-content-primary);
}
}
.vsm--item {
padding: 0 5px;
}
.el-button {
margin-right: 0;
}
}
.el-tooltip__trigger .lock-icon.material-design-icon > .material-design-icon__svg {
bottom: 0 !important;
margin-left: 5px;
}
.vsm--item {
position: relative;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 10px;
height: 1.25rem;
z-index: 5;
background: linear-gradient(to top, var(--ks-background-left-menu), transparent);
opacity: 0.18;
}
padding: 0 5px;
}
}
.el-button {
margin-right: 0;
}
}
.el-tooltip__trigger .lock-icon.material-design-icon>.material-design-icon__svg {
bottom: 0 !important;
margin-left: 5px;
}
.vsm--item {
position: relative;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 10px;
height: 1.25rem;
z-index: 5;
background: linear-gradient(to top, var(--ks-background-left-menu), transparent);
opacity: 0.18;
}
}
}

View File

@@ -883,6 +883,12 @@
"description": "Nach Trigger-ID filtern",
"label": "Trigger-ID"
},
"triggerState": {
"description": "Nach Trigger-Zustand filtern",
"disabled": "Deaktiviert",
"enabled": "Aktiviert",
"label": "Trigger-Zustand"
},
"update": "Aktualisieren",
"value": "Wert",
"workerId": {
@@ -1081,6 +1087,7 @@
"min": "Min",
"minutes": "Minuten",
"missingSource": "Fehlende Quelle",
"modify_inputs": "Eingaben ändern",
"monogram": "Monogramm",
"months": "Monate",
"more_actions": "Weitere Aktionen",
@@ -1220,6 +1227,7 @@
},
"fields": {
"general": {
"checks": "Überprüfungen",
"concurrency": "Nebenläufigkeit",
"disabled": "Deaktiviert",
"labels": "Labels",
@@ -1307,7 +1315,7 @@
"next": "Weiter",
"no_flows": "Keine Flows unter der tutorial Namespace verfügbar.",
"previous": "Zurück",
"skip": "Tutorial überspringen",
"skip": "Produkt-Tour überspringen",
"steps": {
"0": {
"content": "Wir freuen uns, dass Sie hier sind.<br />Lassen Sie uns Ihren ersten Flow erstellen.",
@@ -1467,6 +1475,7 @@
"resumed confirm": "Sind Sie sicher, dass Sie die Ausführung <code>{id}</code> fortsetzen möchten?",
"resumed done": "Ausführung ist fortgesetzt",
"resumed title": "Ausführung <code>{id}</code> fortsetzen",
"reuse_original_inputs": "Ursprüngliche Inputs wiederverwenden",
"revision": "Revision",
"revisions": "Revisionen",
"row count": "Zeilenanzahl",
@@ -1855,7 +1864,7 @@
},
"welcome aboard": "🚀 Willkommen bei Kestra!",
"welcome aboard content": "Nutzen Sie unsere geführte Tour, um Ihren ersten Flow zu erstellen, und schauen Sie sich Blueprints an, um weitere Beispiele zu finden.",
"welcome button create": "Meinen ersten Flow erstellen",
"welcome button create": "Produkt-Tour starten",
"welcome display require": "Führen Sie Ihren <strong>ersten Flow</strong> aus, um loszulegen",
"welcome_page": {
"guide": "Benötigen Sie Unterstützung, um Ihren ersten flow auszuführen?",

View File

@@ -196,6 +196,8 @@
"replayed": "Execution is replayed",
"replay confirm": "Are you sure you want to replay this execution <code>{id}</code> and create a new one?",
"replay with inputs": "Replay with inputs",
"reuse_original_inputs": "Reuse original inputs",
"modify_inputs": "Modify inputs",
"replay the execution": "Replay the execution <code>{executionId}</code> for the flow <code>{flowId}</code>",
"prefill inputs": "Prefill",
"current": "current",
@@ -538,7 +540,7 @@
"welcome aboard": "\uD83D\uDE80 Welcome to Kestra!",
"welcome aboard content": "Use our Guided Tour to create your first flow and check Blueprints to find more examples.",
"welcome display require": "Run your <strong>first flow</strong> to get started",
"welcome button create": "Create my first flow",
"welcome button create": "Start Product Tour",
"live help": "Live help",
"show task documentation": "Show task documentation",
"hide task documentation": "Hide task documentation",
@@ -945,7 +947,7 @@
"next": "Next",
"previous": "Previous",
"finish": "Finish",
"skip": "Skip Tutorial",
"skip": "Skip Product Tour",
"no_flows": "No flows available under tutorial namespace.",
"steps": {
"0": {
@@ -1250,7 +1252,8 @@
"disabled": "Disabled",
"listeners": "Listeners",
"taskDefaults": "Task Defaults",
"workerGroup": "Worker Group"
"workerGroup": "Worker Group",
"checks": "Checks"
}
},
"select": {
@@ -1727,6 +1730,12 @@
"label": "Trigger Execution ID",
"description": "Filter by trigger execution ID"
},
"triggerState":{
"label": " Trigger State",
"description": "Filter by trigger state",
"enabled": "Enabled",
"disabled": "Disabled"
},
"scope_flow": {
"label": "Scope",
"description": "Filter by flow scope"

View File

@@ -883,6 +883,12 @@
"description": "Filtrar por trigger ID",
"label": "ID de Trigger"
},
"triggerState": {
"description": "Filtrar por estado del trigger",
"disabled": "Desactivado",
"enabled": "Habilitado",
"label": "Estado del Trigger"
},
"update": "Actualizar",
"value": "Valor",
"workerId": {
@@ -1081,6 +1087,7 @@
"min": "Min",
"minutes": "Minutos",
"missingSource": "Fuente faltante",
"modify_inputs": "Modificar inputs",
"monogram": "Monograma",
"months": "Meses",
"more_actions": "Más acciones",
@@ -1220,6 +1227,7 @@
},
"fields": {
"general": {
"checks": "Comprobaciones",
"concurrency": "Concurrente",
"disabled": "Desactivado",
"labels": "Etiquetas",
@@ -1307,7 +1315,7 @@
"next": "Siguiente",
"no_flows": "No hay flows disponibles bajo el namespace del tutorial.",
"previous": "Anterior",
"skip": "Saltar Tutorial",
"skip": "Omitir recorrido del producto",
"steps": {
"0": {
"content": "Estamos encantados de tenerte aquí.<br />Vamos a crear tu primer flow.",
@@ -1467,6 +1475,7 @@
"resumed confirm": "¿Estás seguro de reanudar la ejecución <code>{id}</code>?",
"resumed done": "La ejecución se ha reanudado",
"resumed title": "Reanudar ejecución <code>{id}</code>",
"reuse_original_inputs": "Reutilizar inputs originales",
"revision": "Revisión",
"revisions": "Revisiones",
"row count": "Recuento de filas",
@@ -1855,7 +1864,7 @@
},
"welcome aboard": "🚀 ¡Bienvenido a Kestra!",
"welcome aboard content": "Usa nuestro Tour Guiado para crear tu primer flow y revisa los Blueprints para encontrar más ejemplos.",
"welcome button create": "Crear mi primer flow",
"welcome button create": "Iniciar Tour del Producto",
"welcome display require": "Ejecuta tu <strong>primer flow</strong> para comenzar",
"welcome_page": {
"guide": "¿Necesitas orientación para ejecutar tu primer flow?",

View File

@@ -883,6 +883,12 @@
"description": "Filtrer par trigger ID",
"label": "ID du trigger"
},
"triggerState": {
"description": "Filtrer par état du trigger",
"disabled": "Désactivé",
"enabled": "Activé",
"label": "État du Trigger"
},
"update": "Mettre à jour",
"value": "Valeur",
"workerId": {
@@ -1081,6 +1087,7 @@
"min": "Minimum",
"minutes": "Minutes",
"missingSource": "Source manquant",
"modify_inputs": "Modifier les inputs",
"monogram": "Monogramme",
"months": "Mois",
"more_actions": "Plus d'actions",
@@ -1220,6 +1227,7 @@
},
"fields": {
"general": {
"checks": "Vérifications",
"concurrency": "Concurrence",
"disabled": "Désactivé",
"labels": "Étiquettes",
@@ -1307,7 +1315,7 @@
"next": "Suivant",
"no_flows": "Aucun flux disponible dans l'espace de noms du tutoriel.",
"previous": "Précédent",
"skip": "Passer le tutoriel",
"skip": "Passer la visite guidée du produit",
"steps": {
"0": {
"content": "Nous sommes ravis de vous avoir ici.<br />Créons votre premier flux.",
@@ -1467,6 +1475,7 @@
"resumed confirm": "Êtes-vous sur de vouloir reprendre l'exécution <code>{id}</code>?",
"resumed done": "L'exécution est reprise",
"resumed title": "Reprendre l'exécution <code>{id}</code>",
"reuse_original_inputs": "Réutiliser les inputs d'origine",
"revision": "Révision",
"revisions": "Révisions",
"row count": "Nombre de lignes",
@@ -1855,7 +1864,7 @@
},
"welcome aboard": "🚀 Bienvenue à bord !",
"welcome aboard content": "Tout est prêt pour Kestra, commencez la création de votre flow et admirez la magie !",
"welcome button create": "Créer mon premier flow",
"welcome button create": "Démarrer la visite guidée du produit",
"welcome display require": "Prêt à commencer à utiliser Kestra ? Créons ensemble <strong>votre premier flow</strong> !",
"welcome_page": {
"guide": "Besoin d'aide pour exécuter votre premier flow ?",

View File

@@ -883,6 +883,12 @@
"description": "ट्रिगर ID द्वारा फ़िल्टर करें",
"label": "ट्रिगर ID"
},
"triggerState": {
"description": "ट्रिगर स्थिति द्वारा फ़िल्टर करें",
"disabled": "अक्षम",
"enabled": "सक्रिय",
"label": "ट्रिगर स्थिति"
},
"update": "अपडेट",
"value": "मान",
"workerId": {
@@ -1081,6 +1087,7 @@
"min": "न्यूनतम",
"minutes": "मिनट्स",
"missingSource": "स्रोत अनुपलब्ध",
"modify_inputs": "इनपुट्स संशोधित करें",
"monogram": "मोनोग्राम",
"months": "महीने",
"more_actions": "अधिक क्रियाएँ",
@@ -1220,6 +1227,7 @@
},
"fields": {
"general": {
"checks": "जांचें",
"concurrency": "समानांतरता",
"disabled": "अक्षम",
"labels": "लेबल्स",
@@ -1307,7 +1315,7 @@
"next": "अगला",
"no_flows": "ट्यूटोरियल namespace के अंतर्गत कोई flows उपलब्ध नहीं हैं।",
"previous": "पिछला",
"skip": "ट्यूटोरियल छोड़ें",
"skip": "उत्पाद टूर छोड़ें",
"steps": {
"0": {
"content": "हमें खुशी है कि आप यहाँ हैं।<br />आइए अपना पहला flow बनाएं।",
@@ -1467,6 +1475,7 @@
"resumed confirm": "क्या आप वाकई निष्पादन <code>{id}</code> को पुनः आरंभ करना चाहते हैं?",
"resumed done": "निष्पादन पुनः आरंभ किया गया है",
"resumed title": "निष्पादन <code>{id}</code> पुनः आरंभ करें",
"reuse_original_inputs": "मूल inputs का पुनः उपयोग करें",
"revision": "संशोधन",
"revisions": "पुनरीक्षण",
"row count": "पंक्ति संख्या",
@@ -1855,7 +1864,7 @@
},
"welcome aboard": "🚀 केस्ट्रा में आपका स्वागत है!",
"welcome aboard content": "अपना पहला flow बनाने के लिए हमारे Guided Tour का उपयोग करें और अधिक उदाहरण खोजने के लिए Blueprints देखें।",
"welcome button create": "मेरा पहला flow बनाएं",
"welcome button create": "उत्पाद यात्रा शुरू करें",
"welcome display require": "शुरू करने के लिए अपना <strong>पहला flow</strong> चलाएँ",
"welcome_page": {
"guide": "क्या आपको अपना पहला flow निष्पादित करने के लिए मार्गदर्शन चाहिए?",

View File

@@ -883,6 +883,12 @@
"description": "Filtra per trigger ID",
"label": "ID del trigger"
},
"triggerState": {
"description": "Filtra per stato del trigger",
"disabled": "Disabilitato",
"enabled": "Abilitato",
"label": "Stato del Trigger"
},
"update": "Aggiorna",
"value": "Valore",
"workerId": {
@@ -1081,6 +1087,7 @@
"min": "Min",
"minutes": "Minuti",
"missingSource": "Sorgente mancante",
"modify_inputs": "Modifica input",
"monogram": "Monogramma",
"months": "Mesi",
"more_actions": "Altre azioni",
@@ -1220,6 +1227,7 @@
},
"fields": {
"general": {
"checks": "Controlli",
"concurrency": "Concorrenza",
"disabled": "Disabilitato",
"labels": "Etichette",
@@ -1307,7 +1315,7 @@
"next": "Successivo",
"no_flows": "Nessun flow disponibile sotto il namespace del tutorial.",
"previous": "Precedente",
"skip": "Salta Tutorial",
"skip": "Salta il Tour del Prodotto",
"steps": {
"0": {
"content": "Siamo entusiasti di averti qui.<br />Creiamo il tuo primo flow.",
@@ -1467,6 +1475,7 @@
"resumed confirm": "Sei sicuro di voler riprendere l'esecuzione <code>{id}</code>?",
"resumed done": "L'esecuzione è stata ripresa",
"resumed title": "Riprendi esecuzione <code>{id}</code>",
"reuse_original_inputs": "Riutilizza gli input originali",
"revision": "Revisione",
"revisions": "Revisions",
"row count": "Conteggio righe",
@@ -1855,7 +1864,7 @@
},
"welcome aboard": "🚀 Benvenuto su Kestra!",
"welcome aboard content": "Usa il nostro Tour Guidato per creare il tuo primo flow e controlla i Blueprints per trovare altri esempi.",
"welcome button create": "Crea il mio primo flow",
"welcome button create": "Inizia il Tour del Prodotto",
"welcome display require": "Esegui il tuo <strong>primo flow</strong> per iniziare",
"welcome_page": {
"guide": "Hai bisogno di assistenza per eseguire il tuo primo flow?",

View File

@@ -883,6 +883,12 @@
"description": "トリガーIDでフィルター",
"label": "トリガーID"
},
"triggerState": {
"description": "トリガー状態でフィルター",
"disabled": "無効",
"enabled": "有効",
"label": "トリガー状態"
},
"update": "更新",
"value": "値",
"workerId": {
@@ -1081,6 +1087,7 @@
"min": "Min",
"minutes": "分",
"missingSource": "ソースが見つかりません",
"modify_inputs": "入力を変更",
"monogram": "モノグラム",
"months": "月",
"more_actions": "その他のアクション",
@@ -1220,6 +1227,7 @@
},
"fields": {
"general": {
"checks": "チェック",
"concurrency": "並行性",
"disabled": "無効",
"labels": "ラベル",
@@ -1307,7 +1315,7 @@
"next": "次へ",
"no_flows": "チュートリアルnamespaceに利用可能なflowはありません。",
"previous": "前へ",
"skip": "チュートリアルをスキップ",
"skip": "プロダクトツアーをスキップ",
"steps": {
"0": {
"content": "ここに来てくれてとても嬉しいです。<br />最初のflowを作成しましょう。",
@@ -1467,6 +1475,7 @@
"resumed confirm": "実行<code>{id}</code>を再開してもよろしいですか?",
"resumed done": "実行が再開されました",
"resumed title": "実行<code>{id}</code>を再開",
"reuse_original_inputs": "元のinputを再利用",
"revision": "リビジョン",
"revisions": "リビジョン",
"row count": "行数",
@@ -1855,7 +1864,7 @@
},
"welcome aboard": "🚀 Kestraへようこそ",
"welcome aboard content": "ガイド付きツアーを利用して最初のflowを作成し、Blueprintsでさらに多くの例を見つけてください。",
"welcome button create": "最初のflowを作成",
"welcome button create": "プロダクトツアーを開始",
"welcome display require": "<strong>最初のflow</strong>を実行して始めましょう",
"welcome_page": {
"guide": "最初のflowを実行するためのガイダンスが必要ですか",

View File

@@ -883,6 +883,12 @@
"description": "트리거 ID로 필터링",
"label": "트리거 ID"
},
"triggerState": {
"description": "트리거 상태별 필터링",
"disabled": "비활성화됨",
"enabled": "사용 가능",
"label": "트리거 상태"
},
"update": "업데이트",
"value": "값",
"workerId": {
@@ -1081,6 +1087,7 @@
"min": "Min",
"minutes": "분",
"missingSource": "소스 누락",
"modify_inputs": "입력 수정",
"monogram": "모노그램",
"months": "개월",
"more_actions": "추가 작업",
@@ -1220,6 +1227,7 @@
},
"fields": {
"general": {
"checks": "점검",
"concurrency": "병행성",
"disabled": "비활성화됨",
"labels": "레이블",
@@ -1307,7 +1315,7 @@
"next": "다음",
"no_flows": "튜토리얼 namespace에 사용할 수 있는 flow가 없습니다.",
"previous": "이전",
"skip": "튜토리얼 건너뛰기",
"skip": "제품 투어 건너뛰기",
"steps": {
"0": {
"content": "여기 오신 것을 환영합니다.<br />첫 번째 flow를 만들어 봅시다.",
@@ -1467,6 +1475,7 @@
"resumed confirm": "실행 <code>{id}</code>을(를) 재개하시겠습니까?",
"resumed done": "실행이 재개되었습니다.",
"resumed title": "실행 <code>{id}</code> 재개",
"reuse_original_inputs": "원래 input 재사용",
"revision": "수정본",
"revisions": "수정본들",
"row count": "행 수",
@@ -1855,7 +1864,7 @@
},
"welcome aboard": "🚀 Kestra에 오신 것을 환영합니다!",
"welcome aboard content": "가이드 투어를 사용하여 첫 번째 flow를 만들고 Blueprints에서 더 많은 예제를 확인하세요.",
"welcome button create": "첫 번째 flow 만들기",
"welcome button create": "제품 투어 시작",
"welcome display require": "<strong>첫 번째 flow</strong>를 실행하여 시작하세요",
"welcome_page": {
"guide": "첫 번째 flow를 실행하는 데 도움이 필요하신가요?",

View File

@@ -883,6 +883,12 @@
"description": "Filtruj według trigger ID",
"label": "Identyfikator Trigger"
},
"triggerState": {
"description": "Filtruj według stanu triggera",
"disabled": "Wyłączone",
"enabled": "Włączone",
"label": "Stan Trigger"
},
"update": "Aktualizuj",
"value": "Wartość",
"workerId": {
@@ -1081,6 +1087,7 @@
"min": "Min",
"minutes": "Minuty",
"missingSource": "Brak źródła",
"modify_inputs": "Modyfikuj inputy",
"monogram": "Monogram",
"months": "Miesiące",
"more_actions": "Więcej akcji",
@@ -1220,6 +1227,7 @@
},
"fields": {
"general": {
"checks": "Kontrole",
"concurrency": "Współbieżność",
"disabled": "Wyłączony",
"labels": "Etykiety",
@@ -1307,7 +1315,7 @@
"next": "Następny",
"no_flows": "Brak flowów w namespace o nazwie tutorial.",
"previous": "Poprzedni",
"skip": "Pomiń samouczek",
"skip": "Pomiń Przewodnik po Produkcie",
"steps": {
"0": {
"content": "Jesteśmy zachwyceni, że jesteś tutaj.<br />Stwórzmy twój pierwszy flow.",
@@ -1467,6 +1475,7 @@
"resumed confirm": "Czy na pewno chcesz wznowić wykonanie <code>{id}</code>?",
"resumed done": "Wykonanie zostało wznowione",
"resumed title": "Wznów wykonanie <code>{id}</code>",
"reuse_original_inputs": "Ponownie użyj oryginalnych inputów",
"revision": "Wersja",
"revisions": "Wersje",
"row count": "Liczba wierszy",
@@ -1855,7 +1864,7 @@
},
"welcome aboard": "🚀 Witamy w Kestra!",
"welcome aboard content": "Skorzystaj z naszego Przewodnika, aby stworzyć swój pierwszy flow i sprawdź Blueprints, aby znaleźć więcej przykładów.",
"welcome button create": "Stwórz mój pierwszy flow",
"welcome button create": "Rozpocznij Przewodnik po Produkcie",
"welcome display require": "Uruchom swój <strong>pierwszy flow</strong>, aby rozpocząć",
"welcome_page": {
"guide": "Potrzebujesz wskazówek, jak uruchomić swój pierwszy flow?",

View File

@@ -883,6 +883,12 @@
"description": "Filtrar por trigger ID",
"label": "ID do Trigger"
},
"triggerState": {
"description": "Filtrar por estado do trigger",
"disabled": "Desativado",
"enabled": "Habilitado",
"label": "Estado do Trigger"
},
"update": "Atualizar",
"value": "Valor",
"workerId": {
@@ -1081,6 +1087,7 @@
"min": "Min",
"minutes": "Minutos",
"missingSource": "Fonte ausente",
"modify_inputs": "Modificar inputs",
"monogram": "Monograma",
"months": "Meses",
"more_actions": "Mais Ações",
@@ -1220,6 +1227,7 @@
},
"fields": {
"general": {
"checks": "Verificações",
"concurrency": "Concorrência",
"disabled": "Desativado",
"labels": "Etiquetas",
@@ -1307,7 +1315,7 @@
"next": "Próximo",
"no_flows": "Não há flows disponíveis no namespace do tutorial.",
"previous": "Anterior",
"skip": "Pular Tutorial",
"skip": "Pular Tour do Produto",
"steps": {
"0": {
"content": "Estamos entusiasmados em tê-lo aqui.<br />Vamos criar seu primeiro flow.",
@@ -1467,6 +1475,7 @@
"resumed confirm": "Tem certeza de que deseja retomar a execução <code>{id}</code>?",
"resumed done": "Execução foi retomada",
"resumed title": "Retomar execução <code>{id}</code>",
"reuse_original_inputs": "Reutilizar inputs originais",
"revision": "Revisão",
"revisions": "Revisões",
"row count": "Contagem de linhas",
@@ -1855,7 +1864,7 @@
},
"welcome aboard": "🚀 Bem-vindo ao Kestra!",
"welcome aboard content": "Use nosso Tour Guiado para criar seu primeiro flow e confira os Blueprints para encontrar mais exemplos.",
"welcome button create": "Criar meu primeiro flow",
"welcome button create": "Iniciar Tour do Produto",
"welcome display require": "Execute seu <strong>primeiro flow</strong> para começar",
"welcome_page": {
"guide": "Precisa de orientação para executar seu primeiro flow?",

View File

@@ -883,6 +883,12 @@
"description": "Filtrar por trigger ID",
"label": "ID do Trigger"
},
"triggerState": {
"description": "Filtrar por estado do trigger",
"disabled": "Desativado",
"enabled": "Habilitado",
"label": "Estado do Trigger"
},
"update": "Atualizar",
"value": "Valor",
"workerId": {
@@ -1081,6 +1087,7 @@
"min": "Min",
"minutes": "Minutos",
"missingSource": "Fonte ausente",
"modify_inputs": "Modificar inputs",
"monogram": "Monograma",
"months": "Meses",
"more_actions": "Mais Ações",
@@ -1220,6 +1227,7 @@
},
"fields": {
"general": {
"checks": "Verificações",
"concurrency": "Concorrência",
"disabled": "Desativado",
"labels": "Etiquetas",
@@ -1307,7 +1315,7 @@
"next": "Próximo",
"no_flows": "Não há flows disponíveis no namespace do tutorial.",
"previous": "Anterior",
"skip": "Pular Tutorial",
"skip": "Pular Tour do Produto",
"steps": {
"0": {
"content": "Estamos entusiasmados em tê-lo aqui.<br />Vamos criar seu primeiro flow.",
@@ -1467,6 +1475,7 @@
"resumed confirm": "Tem certeza de que deseja retomar a execução <code>{id}</code>?",
"resumed done": "Execução foi retomada",
"resumed title": "Retomar execução <code>{id}</code>",
"reuse_original_inputs": "Reutilizar inputs originais",
"revision": "Revisão",
"revisions": "Revisões",
"row count": "Contagem de linhas",
@@ -1855,7 +1864,7 @@
},
"welcome aboard": "🚀 Bem-vindo ao Kestra!",
"welcome aboard content": "Use nosso Tour Guiado para criar seu primeiro flow e confira os Blueprints para encontrar mais exemplos.",
"welcome button create": "Criar meu primeiro flow",
"welcome button create": "Iniciar Tour do Produto",
"welcome display require": "Execute seu <strong>primeiro flow</strong> para começar",
"welcome_page": {
"guide": "Precisa de orientação para executar seu primeiro flow?",

View File

@@ -883,6 +883,12 @@
"description": "Фильтр по trigger ID",
"label": "ID триггера"
},
"triggerState": {
"description": "Фильтр по состоянию trigger",
"disabled": "Отключено",
"enabled": "Включено",
"label": "Состояние Trigger"
},
"update": "Обновить",
"value": "Значение",
"workerId": {
@@ -1081,6 +1087,7 @@
"min": "Мин",
"minutes": "Минуты",
"missingSource": "Отсутствует источник",
"modify_inputs": "Изменить inputs",
"monogram": "Монограмма",
"months": "Месяцы",
"more_actions": "Больше действий",
@@ -1220,6 +1227,7 @@
},
"fields": {
"general": {
"checks": "Проверки",
"concurrency": "Конкурентность",
"disabled": "Отключено",
"labels": "Метки",
@@ -1307,7 +1315,7 @@
"next": "Далее",
"no_flows": "Нет доступных flows в namespace учебника.",
"previous": "Назад",
"skip": "Пропустить учебник",
"skip": "Пропустить ознакомительный тур с продуктом",
"steps": {
"0": {
"content": "Мы рады видеть вас здесь.<br />Давайте создадим ваш первый flow.",
@@ -1467,6 +1475,7 @@
"resumed confirm": "Вы уверены, что хотите возобновить выполнение <code>{id}</code>?",
"resumed done": "Выполнение возобновлено",
"resumed title": "Возобновить выполнение <code>{id}</code>",
"reuse_original_inputs": "Повторно использовать оригинальные inputы",
"revision": "Редакция",
"revisions": "Редакции",
"row count": "Количество строк",
@@ -1855,7 +1864,7 @@
},
"welcome aboard": "🚀 Добро пожаловать в Kestra!",
"welcome aboard content": "Используйте наше Руководство, чтобы создать ваш первый flow и ознакомьтесь с Blueprints для поиска дополнительных примеров.",
"welcome button create": "Создать мой первый flow",
"welcome button create": "Начать ознакомительный тур с продуктом",
"welcome display require": "Запустите ваш <strong>первый flow</strong>, чтобы начать",
"welcome_page": {
"guide": "Нужна помощь в выполнении вашего первого flow?",

View File

@@ -883,6 +883,12 @@
"description": "按 trigger ID 筛选",
"label": "触发器 ID"
},
"triggerState": {
"description": "按触发器状态筛选",
"disabled": "禁用",
"enabled": "启用",
"label": "触发状态"
},
"update": "更新",
"value": "值",
"workerId": {
@@ -1081,6 +1087,7 @@
"min": "最小",
"minutes": "分钟",
"missingSource": "缺少源",
"modify_inputs": "修改输入",
"monogram": "字母组合",
"months": "月份",
"more_actions": "更多操作",
@@ -1220,6 +1227,7 @@
},
"fields": {
"general": {
"checks": "检查",
"concurrency": "并发性",
"disabled": "禁用",
"labels": "标签",
@@ -1307,7 +1315,7 @@
"next": "下一步",
"no_flows": "教程命名空间下没有可用的流程。",
"previous": "上一步",
"skip": "跳过教程",
"skip": "跳过产品指南",
"steps": {
"0": {
"content": "我们很高兴你在这里。<br />让我们创建你的第一个流程。",
@@ -1467,6 +1475,7 @@
"resumed confirm": "确定要恢复执行 <code>{id}</code> 吗?",
"resumed done": "执行已恢复",
"resumed title": "恢复执行 <code>{id}</code>",
"reuse_original_inputs": "重用原始input",
"revision": "修订版",
"revisions": "修订版",
"row count": "行数",
@@ -1855,7 +1864,7 @@
},
"welcome aboard": "🚀 欢迎使用 Kestra!",
"welcome aboard content": "使用我们的引导游览来创建你的第一个流程,并查看蓝图以找到更多示例。",
"welcome button create": "创建我的第一个流程",
"welcome button create": "开始产品导览",
"welcome display require": "运行你的 <strong>第一个流程</strong> 以开始",
"welcome_page": {
"guide": "需要指导来执行您的第一个flow吗",

View File

@@ -25,7 +25,7 @@ public class ConcurrencyLimitController {
@ExecuteOn(TaskExecutors.IO)
@Get(uri = "/search")
@Operation(tags = {"Flows", "Executions"}, summary = "Search for flow concurrency limits")
@Operation(tags = {"Flows"}, summary = "Search for flow concurrency limits")
public PagedResults<ConcurrencyLimit> searchConcurrencyLimits() {
var results = concurrencyLimitService.find(tenantService.resolveTenant());
return PagedResults.of(new ArrayListTotal<>(results, results.size()));
@@ -33,7 +33,7 @@ public class ConcurrencyLimitController {
@ExecuteOn(TaskExecutors.IO)
@Put("/{namespace}/{flowId}")
@Operation(tags = {"Flows", "Executions"}, summary = "Update a flow concurrency limit")
@Operation(tags = {"Flows"}, summary = "Update a flow concurrency limit")
public HttpResponse<ConcurrencyLimit> updateConcurrencyLimit(@Body ConcurrencyLimit concurrencyLimit) {
var existing = concurrencyLimitService.findById(concurrencyLimit.getTenantId(), concurrencyLimit.getNamespace(), concurrencyLimit.getFlowId());
if (existing.isEmpty()) {

View File

@@ -747,11 +747,13 @@ public class ExecutionController {
return flowInputOutput.readExecutionInputs(flow, current, inputs)
.flatMap(executionInputs -> {
Check.Behavior behavior = Check.resolveBehavior(flowService.getFailedChecks(flow, executionInputs));
List<Check> failed = flowService.getFailedChecks(flow, executionInputs);
Check.Behavior behavior = Check.resolveBehavior(failed);
if (Check.Behavior.BLOCK_EXECUTION.equals(behavior)) {
return Mono.error(new IllegalArgumentException(
"Flow execution blocked: one or more condition checks evaluated to false."
));
+ "\nFailed checks: " + failed.stream().map(Check::getMessage).collect(Collectors.joining(", ")
)));
}
final Execution executionWithInputs = Optional.of(current.withInputs(executionInputs))
@@ -1036,9 +1038,9 @@ public class ExecutionController {
for (String executionId : executionsId) {
Optional<Execution> execution = executionRepository.findById(tenantService.resolveTenant(), executionId);
if (execution.isPresent() && !execution.get().getState().isFailed()) {
if (execution.isPresent() && !execution.get().getState().canBeRestarted()) {
invalids.add(ManualConstraintViolation.of(
"execution not in state FAILED",
"execution not in state PAUSED or terminated",
executionId,
String.class,
"execution",

View File

@@ -6,6 +6,7 @@ import io.kestra.core.models.Label;
import io.kestra.core.models.executions.Execution;
import io.kestra.core.models.flows.Flow;
import io.kestra.core.models.flows.FlowForExecution;
import io.kestra.core.models.flows.check.Check;
import io.kestra.core.models.property.Property;
import io.kestra.core.models.tasks.TaskForExecution;
import io.kestra.core.models.triggers.AbstractTriggerForExecution;
@@ -530,6 +531,39 @@ class ExecutionControllerTest {
assertThat(csv).contains("id");
}
@Test
void shouldBlockExecutionAndThrowCheckErrorMessage() {
String namespaceId = "io.othercompany";
String flowId = "flowWithCheck";
createFlowWithFailingCheck(namespaceId, flowId);
HttpClientResponseException e = assertThrows(
HttpClientResponseException.class,
() ->
client.toBlocking().retrieve(
HttpRequest.POST("/api/v1/main/executions/" + namespaceId + "/" + flowId, null),
Execution.class
)
);
assertThat(e.getMessage()).contains("No VM provided");
}
void createFlowWithFailingCheck(String namespaceId, String flowId) {
Flow create = Flow.builder()
.id(flowId)
.tenantId(MAIN_TENANT)
.namespace(namespaceId)
.checks(List.of(Check.builder().condition("{{ [] | length > 0 }}").message("No VM provided").style(Check.Style.ERROR).behavior(Check.Behavior.BLOCK_EXECUTION).build()))
.tasks(Collections.singletonList(Return.builder().id("test").type(Return.class.getName()).format(Property.of("test")).build()))
.build();
client.toBlocking().retrieve(
HttpRequest.POST("/api/v1/main/flows", create),
Flow.class
);
}
void createAndExecuteFlow() {
String namespaceId = "io.othercompany";
String flowId = "flowId";
@@ -550,4 +584,5 @@ class ExecutionControllerTest {
Execution.class
);
}
}

View File

@@ -9,12 +9,4 @@ public class WorkerSecurityService {
public State.Type callInSecurityContext(AbstractWorkerCallable callable) {
return callable.call();
}
public boolean isInSecurityContext() {
throw new UnsupportedOperationException();
}
public AbstractWorkerCallable getCallable() {
throw new UnsupportedOperationException();
}
}