From dfb8dec379a1e42413abf57d4ebf3f11d6d06504 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 10:02:00 +0100 Subject: [PATCH 01/14] Bump org.assertj:assertj-core from 3.26.3 to 3.27.0 (#21226) Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.26.3 to 3.27.0. - [Release notes](https://github.com/assertj/assertj/releases) - [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.26.3...assertj-build-3.27.0) --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ab2d666c4f6f..dae4fddcbbe4 100644 --- a/pom.xml +++ b/pom.xml @@ -188,7 +188,7 @@ 2.0.0.AM27 - 3.26.3 + 3.27.0 2.2.0 4.2.2 3.17.5 From 1feedba035a5dfbd50cf44ec743b89cfc1ce0ce2 Mon Sep 17 00:00:00 2001 From: Dennis Oelkers Date: Mon, 23 Dec 2024 14:51:04 +0100 Subject: [PATCH 02/14] Fixing exception when replaying search for security event. (#21225) --- .../src/views/logic/views/UseCreateViewForEvent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graylog2-web-interface/src/views/logic/views/UseCreateViewForEvent.ts b/graylog2-web-interface/src/views/logic/views/UseCreateViewForEvent.ts index b2327673b06a..58b071c4842a 100644 --- a/graylog2-web-interface/src/views/logic/views/UseCreateViewForEvent.ts +++ b/graylog2-web-interface/src/views/logic/views/UseCreateViewForEvent.ts @@ -236,7 +236,7 @@ export const UseCreateViewForEvent = ( const groupBy = eventDefinition?.config?.group_by ?? []; - const searchFilters = eventDefinition.config?.filters; + const searchFilters = eventDefinition?.config?.filters; return useMemo( () => ViewGenerator({ streams, streamCategories, timeRange, queryString, aggregations, groupBy, queryParameters, searchFilters }), From 6f9d69f13c0fa69982cf0c6140bc75debbacbb28 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:51:36 +0100 Subject: [PATCH 03/14] Updating yarn lockfile (#21146) Co-authored-by: Gary Bot --- graylog2-web-interface/yarn.lock | 246 ++++++++++++++++++++----------- 1 file changed, 162 insertions(+), 84 deletions(-) diff --git a/graylog2-web-interface/yarn.lock b/graylog2-web-interface/yarn.lock index f2fb0d6c79f8..aa23f8917a6f 100644 --- a/graylog2-web-interface/yarn.lock +++ b/graylog2-web-interface/yarn.lock @@ -3596,30 +3596,30 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@8.17.0": - version "8.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.17.0.tgz#2ee073c421f4e81e02d10e731241664b6253b23c" - integrity sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w== +"@typescript-eslint/eslint-plugin@8.18.1": + version "8.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.1.tgz#992e5ac1553ce20d0d46aa6eccd79dc36dedc805" + integrity sha512-Ncvsq5CT3Gvh+uJG0Lwlho6suwDfUXH0HztslDf5I+F2wAFAZMRwYLEorumpKLzmO2suAXZ/td1tBg4NZIi9CQ== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "8.17.0" - "@typescript-eslint/type-utils" "8.17.0" - "@typescript-eslint/utils" "8.17.0" - "@typescript-eslint/visitor-keys" "8.17.0" + "@typescript-eslint/scope-manager" "8.18.1" + "@typescript-eslint/type-utils" "8.18.1" + "@typescript-eslint/utils" "8.18.1" + "@typescript-eslint/visitor-keys" "8.18.1" graphemer "^1.4.0" ignore "^5.3.1" natural-compare "^1.4.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@8.17.0": - version "8.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.17.0.tgz#2ee972bb12fa69ac625b85813dc8d9a5a053ff52" - integrity sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg== +"@typescript-eslint/parser@8.18.1": + version "8.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.18.1.tgz#c258bae062778b7696793bc492249027a39dfb95" + integrity sha512-rBnTWHCdbYM2lh7hjyXqxk70wvon3p2FyaniZuey5TrcGBpfhVp0OxOa6gxr9Q9YhZFKyfbEnxc24ZnVbbUkCA== dependencies: - "@typescript-eslint/scope-manager" "8.17.0" - "@typescript-eslint/types" "8.17.0" - "@typescript-eslint/typescript-estree" "8.17.0" - "@typescript-eslint/visitor-keys" "8.17.0" + "@typescript-eslint/scope-manager" "8.18.1" + "@typescript-eslint/types" "8.18.1" + "@typescript-eslint/typescript-estree" "8.18.1" + "@typescript-eslint/visitor-keys" "8.18.1" debug "^4.3.4" "@typescript-eslint/scope-manager@8.0.1": @@ -3638,21 +3638,21 @@ "@typescript-eslint/types" "8.16.0" "@typescript-eslint/visitor-keys" "8.16.0" -"@typescript-eslint/scope-manager@8.17.0": - version "8.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.17.0.tgz#a3f49bf3d4d27ff8d6b2ea099ba465ef4dbcaa3a" - integrity sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg== +"@typescript-eslint/scope-manager@8.18.1": + version "8.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.18.1.tgz#52cedc3a8178d7464a70beffed3203678648e55b" + integrity sha512-HxfHo2b090M5s2+/9Z3gkBhI6xBH8OJCFjH9MhQ+nnoZqxU3wNxkLT+VWXWSFWc3UF3Z+CfPAyqdCTdoXtDPCQ== dependencies: - "@typescript-eslint/types" "8.17.0" - "@typescript-eslint/visitor-keys" "8.17.0" + "@typescript-eslint/types" "8.18.1" + "@typescript-eslint/visitor-keys" "8.18.1" -"@typescript-eslint/type-utils@8.17.0": - version "8.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.17.0.tgz#d326569f498cdd0edf58d5bb6030b4ad914e63d3" - integrity sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw== +"@typescript-eslint/type-utils@8.18.1": + version "8.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.18.1.tgz#10f41285475c0bdee452b79ff7223f0e43a7781e" + integrity sha512-jAhTdK/Qx2NJPNOTxXpMwlOiSymtR2j283TtPqXkKBdH8OAMmhiUfP0kJjc/qSE51Xrq02Gj9NY7MwK+UxVwHQ== dependencies: - "@typescript-eslint/typescript-estree" "8.17.0" - "@typescript-eslint/utils" "8.17.0" + "@typescript-eslint/typescript-estree" "8.18.1" + "@typescript-eslint/utils" "8.18.1" debug "^4.3.4" ts-api-utils "^1.3.0" @@ -3666,10 +3666,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.16.0.tgz#49c92ae1b57942458ab83d9ec7ccab3005e64737" integrity sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ== -"@typescript-eslint/types@8.17.0": - version "8.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.17.0.tgz#ef84c709ef8324e766878834970bea9a7e3b72cf" - integrity sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA== +"@typescript-eslint/types@8.18.1": + version "8.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.18.1.tgz#d7f4f94d0bba9ebd088de840266fcd45408a8fff" + integrity sha512-7uoAUsCj66qdNQNpH2G8MyTFlgerum8ubf21s3TSM3XmKXuIn+H2Sifh/ES2nPOPiYSRJWAk0fDkW0APBWcpfw== "@typescript-eslint/typescript-estree@8.0.1": version "8.0.1" @@ -3699,13 +3699,13 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/typescript-estree@8.17.0": - version "8.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.17.0.tgz#40b5903bc929b1e8dd9c77db3cb52cfb199a2a34" - integrity sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw== +"@typescript-eslint/typescript-estree@8.18.1": + version "8.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.1.tgz#2a86cd64b211a742f78dfa7e6f4860413475367e" + integrity sha512-z8U21WI5txzl2XYOW7i9hJhxoKKNG1kcU4RzyNvKrdZDmbjkmLBo8bgeiOJmA06kizLI76/CCBAAGlTlEeUfyg== dependencies: - "@typescript-eslint/types" "8.17.0" - "@typescript-eslint/visitor-keys" "8.17.0" + "@typescript-eslint/types" "8.18.1" + "@typescript-eslint/visitor-keys" "8.18.1" debug "^4.3.4" fast-glob "^3.3.2" is-glob "^4.0.3" @@ -3713,15 +3713,15 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/utils@8.17.0": - version "8.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.17.0.tgz#41c05105a2b6ab7592f513d2eeb2c2c0236d8908" - integrity sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w== +"@typescript-eslint/utils@8.18.1": + version "8.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.18.1.tgz#c4199ea23fc823c736e2c96fd07b1f7235fa92d5" + integrity sha512-8vikiIj2ebrC4WRdcAdDcmnu9Q/MXXwg+STf40BVfT8exDqBCUPdypvzcUPxEqRGKg9ALagZ0UWcYCtn+4W2iQ== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "8.17.0" - "@typescript-eslint/types" "8.17.0" - "@typescript-eslint/typescript-estree" "8.17.0" + "@typescript-eslint/scope-manager" "8.18.1" + "@typescript-eslint/types" "8.18.1" + "@typescript-eslint/typescript-estree" "8.18.1" "@typescript-eslint/utils@^6.0.0 || ^7.0.0 || ^8.0.0": version "8.0.1" @@ -3759,12 +3759,12 @@ "@typescript-eslint/types" "8.16.0" eslint-visitor-keys "^4.2.0" -"@typescript-eslint/visitor-keys@8.17.0": - version "8.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.17.0.tgz#4dbcd0e28b9bf951f4293805bf34f98df45e1aa8" - integrity sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg== +"@typescript-eslint/visitor-keys@8.18.1": + version "8.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.1.tgz#344b4f6bc83f104f514676facf3129260df7610a" + integrity sha512-Vj0WLm5/ZsD013YeUKn+K0y8p1M0jPpxOkKdbD1wB0ns53a5piVY02zjf072TblEweAbcYiFiPoSMF3kp+VhhQ== dependencies: - "@typescript-eslint/types" "8.17.0" + "@typescript-eslint/types" "8.18.1" eslint-visitor-keys "^4.2.0" "@ungap/structured-clone@^1.2.0": @@ -5015,6 +5015,14 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +call-bind-apply-helpers@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz#32e5892e6361b29b0b545ba6f7763378daca2840" + integrity sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -5043,6 +5051,14 @@ call-bind@^1.0.6, call-bind@^1.0.7: get-intrinsic "^1.2.4" set-function-length "^1.2.1" +call-bound@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.3.tgz#41cfd032b593e39176a71533ab4f384aa04fd681" + integrity sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA== + dependencies: + call-bind-apply-helpers "^1.0.1" + get-intrinsic "^1.2.6" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -6461,6 +6477,15 @@ dtype@^2.0.0: resolved "https://registry.yarnpkg.com/dtype/-/dtype-2.0.0.tgz#cd052323ce061444ecd2e8f5748f69a29be28434" integrity sha1-zQUjI84GFETs0uj1dI9popvihDQ= +dunder-proto@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + dup@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/dup/-/dup-1.0.0.tgz#51fc5ac685f8196469df0b905e934b20af5b4029" @@ -6962,6 +6987,11 @@ es-define-property@^1.0.0: dependencies: get-intrinsic "^1.2.4" +es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + es-errors@^1.2.1, es-errors@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" @@ -7220,15 +7250,15 @@ eslint-config-airbnb@19.0.4: dependencies: "@babel/eslint-parser" "7.16.5" "@tanstack/eslint-plugin-query" "4.36.1" - "@typescript-eslint/eslint-plugin" "8.17.0" - "@typescript-eslint/parser" "8.17.0" + "@typescript-eslint/eslint-plugin" "8.18.1" + "@typescript-eslint/parser" "8.18.1" eslint "8.57.0" eslint-config-airbnb "19.0.4" - eslint-import-resolver-webpack "0.13.9" + eslint-import-resolver-webpack "0.13.10" eslint-plugin-compat "4.2.0" - eslint-plugin-graylog "file:packages/eslint-plugin-graylog" + eslint-plugin-graylog "file:../../../../.cache/yarn/v6/npm-eslint-config-graylog-1.3.0-9f621c46-a952-421a-8e45-25a841612b8a-1734955858103/node_modules/eslint-plugin-graylog" eslint-plugin-import "2.25.3" - eslint-plugin-jest "28.9.0" + eslint-plugin-jest "28.10.0" eslint-plugin-jest-dom "5.5.0" eslint-plugin-jest-formatting "3.1.0" eslint-plugin-jsx-a11y "6.10.2" @@ -7244,18 +7274,18 @@ eslint-import-resolver-node@^0.3.6: debug "^3.2.7" resolve "^1.20.0" -eslint-import-resolver-webpack@0.13.9: - version "0.13.9" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.9.tgz#eee41e81dadcdf22ce5f2c6b75952f41e6ac11fa" - integrity sha512-yGngeefNiHXau2yzKKs2BNON4HLpxBabY40BGL/vUSKZtqzjlVsTTZm57jhHULhm+mJEwKsEIIN3NXup5AiiBQ== +eslint-import-resolver-webpack@0.13.10: + version "0.13.10" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.10.tgz#d5b69ca548190bd6fd517e5732d2b16cf884227a" + integrity sha512-ciVTEg7sA56wRMR772PyjcBRmyBMLS46xgzQZqt6cWBEKc7cK65ZSSLCTLVRu2gGtKyXUb5stwf4xxLBfERLFA== dependencies: debug "^3.2.7" enhanced-resolve "^0.9.1" find-root "^1.1.0" - hasown "^2.0.0" + hasown "^2.0.2" interpret "^1.4.0" - is-core-module "^2.13.1" - is-regex "^1.1.4" + is-core-module "^2.15.1" + is-regex "^1.2.0" lodash "^4.17.21" resolve "^2.0.0-next.5" semver "^5.7.2" @@ -7317,10 +7347,10 @@ eslint-plugin-jest-formatting@3.1.0: resolved "https://registry.yarnpkg.com/eslint-plugin-jest-formatting/-/eslint-plugin-jest-formatting-3.1.0.tgz#b26dd5a40f432b642dcc880021a771bb1c93dcd2" integrity sha512-XyysraZ1JSgGbLSDxjj5HzKKh0glgWf+7CkqxbTqb7zEhW7X2WHo5SBQ8cGhnszKN+2Lj3/oevBlHNbHezoc/A== -eslint-plugin-jest@28.9.0: - version "28.9.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-28.9.0.tgz#19168dfaed124339cd2252c4c4d1ac3688aeb243" - integrity sha512-rLu1s1Wf96TgUUxSw6loVIkNtUjq1Re7A9QdCCHSohnvXEBAjuL420h0T/fMmkQlNsQP2GhQzEUpYHPfxBkvYQ== +eslint-plugin-jest@28.10.0: + version "28.10.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-28.10.0.tgz#4b35b8abb0f7cfe699bff8d9060270a2ddd770ea" + integrity sha512-hyMWUxkBH99HpXT3p8hc7REbEZK3D+nk8vHXGgpB+XXsi0gO4PxMSP+pjfUzb67GnV9yawV9a53eUmcde1CCZA== dependencies: "@typescript-eslint/utils" "^6.0.0 || ^7.0.0 || ^8.0.0" @@ -8316,6 +8346,22 @@ get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: has-symbols "^1.0.3" hasown "^2.0.0" +get-intrinsic@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.6.tgz#43dd3dd0e7b49b82b2dfcad10dc824bf7fc265d5" + integrity sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA== + dependencies: + call-bind-apply-helpers "^1.0.1" + dunder-proto "^1.0.0" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + function-bind "^1.1.2" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.0.0" + get-nonce@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/get-nonce/-/get-nonce-1.0.1.tgz#fdf3f0278073820d2ce9426c18f07481b1e0cdf3" @@ -8695,6 +8741,11 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" +gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" @@ -8712,12 +8763,12 @@ graphemer@^1.4.0: "@tanstack/react-query" "4.36.1" "@types/jquery" "3.5.32" "@types/react" "18.3.13" - babel-preset-graylog "file:packages/babel-preset-graylog" - eslint-config-graylog "file:packages/eslint-config-graylog" + babel-preset-graylog "file:../../../../.cache/yarn/v6/npm-graylog-web-plugin-6.2.0-SNAPSHOT-095dc62a-9e26-4c50-b352-7f809b62b982-1734955857830/node_modules/babel-preset-graylog" + eslint-config-graylog "file:../../../../.cache/yarn/v6/npm-graylog-web-plugin-6.2.0-SNAPSHOT-095dc62a-9e26-4c50-b352-7f809b62b982-1734955857830/node_modules/eslint-config-graylog" formik "2.4.6" history "^5.3.0" html-webpack-plugin "^5.5.0" - jest-preset-graylog "file:packages/jest-preset-graylog" + jest-preset-graylog "file:../../../../.cache/yarn/v6/npm-graylog-web-plugin-6.2.0-SNAPSHOT-095dc62a-9e26-4c50-b352-7f809b62b982-1734955857830/node_modules/jest-preset-graylog" jquery "3.7.1" moment "2.30.1" moment-timezone "0.5.46" @@ -8842,6 +8893,11 @@ has-symbols@^1.0.3: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + has-tostringtag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" @@ -9533,12 +9589,12 @@ is-core-module@^2.13.0: dependencies: has "^1.0.3" -is-core-module@^2.13.1, is-core-module@^2.8.1: - version "2.13.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" - integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== +is-core-module@^2.15.1: + version "2.16.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" + integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== dependencies: - hasown "^2.0.0" + hasown "^2.0.2" is-core-module@^2.2.0: version "2.2.0" @@ -9554,6 +9610,13 @@ is-core-module@^2.8.0: dependencies: has "^1.0.3" +is-core-module@^2.8.1: + version "2.13.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + dependencies: + hasown "^2.0.0" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -9786,6 +9849,16 @@ is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-regex@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.2.1.tgz#76d70a3ed10ef9be48eb577887d74205bf0cad22" + integrity sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g== + dependencies: + call-bound "^1.0.2" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + is-set@^2.0.1, is-set@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" @@ -11284,6 +11357,11 @@ material-symbols@^0.22.0: resolved "https://registry.yarnpkg.com/material-symbols/-/material-symbols-0.22.2.tgz#a51f82aa4c3b8a0483bef186abb51f0707fd5fae" integrity sha512-guN2+CzAwxUfdXiuVHcdogDmvhzvRYxMakKd39WmYuyTPaN73UuNC5cH4d4/JVNaLT1EMM8W/4PqHqVBye3ZiA== +math-intrinsics@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + math-log2@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/math-log2/-/math-log2-1.0.1.tgz#fb8941be5f5ebe8979e718e6273b178e58694565" @@ -15021,7 +15099,7 @@ styled-components@6.1.1: version "1.0.0" dependencies: postcss-styled-syntax "0.7.0" - stylelint "16.11.0" + stylelint "16.12.0" stylelint-config-recommended "14.0.1" stylelint-config-standard "36.0.1" stylelint-config-styled-components "0.1.1" @@ -15043,10 +15121,10 @@ stylelint-config-styled-components@0.1.1: resolved "https://registry.yarnpkg.com/stylelint-config-styled-components/-/stylelint-config-styled-components-0.1.1.tgz#b408388d7c687833ab4be4c4e6522d97d2827ede" integrity sha512-z5Xz/9GmvxO6e/DLzBMwkB85zHxEEjN6K7Cj80Bi+o/9vR9eS3GX3E9VuMnX9WLFYulqbqLtTapGGY28JBiy9Q== -stylelint@16.11.0: - version "16.11.0" - resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-16.11.0.tgz#7eb653b007dc0b4366dc3aa7bfa94ced0c52f087" - integrity sha512-zrl4IrKmjJQ+h9FoMp69UMCq5SxeHk0URhxUBj4d3ISzo/DplOFBJZc7t7Dr6otB+1bfbbKNLOmCDpzKSlW+Nw== +stylelint@16.12.0: + version "16.12.0" + resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-16.12.0.tgz#13532dcbaed21348da0e9e0fb9a4e1e7f6dab2b8" + integrity sha512-F8zZ3L/rBpuoBZRvI4JVT20ZanPLXfQLzMOZg1tzPflRVh9mKpOZ8qcSIhh1my3FjAjZWG4T2POwGnmn6a6hbg== dependencies: "@csstools/css-parser-algorithms" "^3.0.4" "@csstools/css-tokenizer" "^3.0.3" @@ -15084,7 +15162,7 @@ stylelint@16.11.0: string-width "^4.2.3" supports-hyperlinks "^3.1.0" svg-tags "^1.0.0" - table "^6.8.2" + table "^6.9.0" write-file-atomic "^5.0.1" stylis@4.1.4: @@ -15198,10 +15276,10 @@ tabbable@^6.0.0: resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-6.2.0.tgz#732fb62bc0175cfcec257330be187dcfba1f3b97" integrity sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew== -table@^6.8.2: - version "6.8.2" - resolved "https://registry.yarnpkg.com/table/-/table-6.8.2.tgz#c5504ccf201213fa227248bdc8c5569716ac6c58" - integrity sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA== +table@^6.9.0: + version "6.9.0" + resolved "https://registry.yarnpkg.com/table/-/table-6.9.0.tgz#50040afa6264141c7566b3b81d4d82c47a8668f5" + integrity sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A== dependencies: ajv "^8.0.1" lodash.truncate "^4.4.2" From f1c71e66b2f824230c7de5b6f5d0768e52661a25 Mon Sep 17 00:00:00 2001 From: Dennis Oelkers Date: Fri, 27 Dec 2024 11:52:18 +0100 Subject: [PATCH 04/14] Enabling bulk actions for event definitions. (#21238) --- changelog/unreleased/pr-21238.toml | 4 ++ .../EventDefinitionsContainer.tsx | 46 +++++++++---------- 2 files changed, 27 insertions(+), 23 deletions(-) create mode 100644 changelog/unreleased/pr-21238.toml diff --git a/changelog/unreleased/pr-21238.toml b/changelog/unreleased/pr-21238.toml new file mode 100644 index 000000000000..6924c8105d84 --- /dev/null +++ b/changelog/unreleased/pr-21238.toml @@ -0,0 +1,4 @@ +type = "a" +message = "Enabling bulk actions for event definitions." + +pulls = ["21238"] diff --git a/graylog2-web-interface/src/components/event-definitions/event-definitions/EventDefinitionsContainer.tsx b/graylog2-web-interface/src/components/event-definitions/event-definitions/EventDefinitionsContainer.tsx index b437189e16c1..d2e309b21f94 100644 --- a/graylog2-web-interface/src/components/event-definitions/event-definitions/EventDefinitionsContainer.tsx +++ b/graylog2-web-interface/src/components/event-definitions/event-definitions/EventDefinitionsContainer.tsx @@ -15,7 +15,6 @@ * . */ import * as React from 'react'; -import { useCallback } from 'react'; import { QueryHelper, @@ -24,9 +23,9 @@ import { } from 'components/common'; import { Link } from 'components/common/router'; import Routes from 'routing/Routes'; -import type { ColumnRenderers } from 'components/common/EntityDataTable'; import FilterValueRenderers from 'components/streams/StreamsOverview/FilterValueRenderers'; import { keyFn, fetchEventDefinitions } from 'components/event-definitions/hooks/useEventDefinitions'; +import BulkActions from 'components/event-definitions/event-definitions/BulkActions'; import EventDefinitionActions from './EventDefinitionActions'; import SchedulingCell from './SchedulingCell'; @@ -35,7 +34,7 @@ import StatusCell from './StatusCell'; import type { EventDefinition } from '../event-definitions-types'; import { DEFAULT_LAYOUT, ADDITIONAL_ATTRIBUTES, COLUMNS_ORDER } from '../constants'; -const customColumnRenderers = (): ColumnRenderers => ({ +const customColumnRenderers = { attributes: { title: { renderCell: (title: string, eventDefinition) => ( @@ -62,28 +61,29 @@ const customColumnRenderers = (): ColumnRenderers => ({ staticWidth: 100, }, }, -}); - -const EventDefinitionsContainer = () => { - const columnRenderers = customColumnRenderers(); +}; - const renderEventDefinitionActions = useCallback((listItem: EventDefinition) => ( - - ), []); +const bulkSelection = { + actions: , - return ( - humanName="event definitions" - columnsOrder={COLUMNS_ORDER} - additionalAttributes={ADDITIONAL_ATTRIBUTES} - queryHelpComponent={} - tableLayout={DEFAULT_LAYOUT} - fetchEntities={fetchEventDefinitions} - entityActions={renderEventDefinitionActions} - keyFn={keyFn} - entityAttributesAreCamelCase={false} - filterValueRenderers={FilterValueRenderers} - columnRenderers={columnRenderers} /> - ); }; +const renderEventDefinitionActions = (listItem: EventDefinition) => ( + +); + +const EventDefinitionsContainer = () => ( + humanName="event definitions" + columnsOrder={COLUMNS_ORDER} + additionalAttributes={ADDITIONAL_ATTRIBUTES} + queryHelpComponent={} + tableLayout={DEFAULT_LAYOUT} + fetchEntities={fetchEventDefinitions} + entityActions={renderEventDefinitionActions} + keyFn={keyFn} + entityAttributesAreCamelCase={false} + filterValueRenderers={FilterValueRenderers} + columnRenderers={customColumnRenderers} + bulkSelection={bulkSelection} /> +); export default EventDefinitionsContainer; From 3ecf80dfd0dae60cfe8902c69a7bf2756a427711 Mon Sep 17 00:00:00 2001 From: Maksym Yadlovskyi Date: Mon, 30 Dec 2024 11:15:33 +0100 Subject: [PATCH 05/14] Add error handling for event definition bulk action on general perspective (#21248) * Add error handling for event definition delete bulk action * changelog * refactoring --- changelog/unreleased/issue-21248.toml | 4 ++++ .../event-definitions/event-definitions/BulkActions.tsx | 1 + 2 files changed, 5 insertions(+) create mode 100644 changelog/unreleased/issue-21248.toml diff --git a/changelog/unreleased/issue-21248.toml b/changelog/unreleased/issue-21248.toml new file mode 100644 index 000000000000..7433226acd9b --- /dev/null +++ b/changelog/unreleased/issue-21248.toml @@ -0,0 +1,4 @@ +type = "f" +message = "Add error handling for event definition bulk action on general perspective." + +pulls = ["21248"] diff --git a/graylog2-web-interface/src/components/event-definitions/event-definitions/BulkActions.tsx b/graylog2-web-interface/src/components/event-definitions/event-definitions/BulkActions.tsx index 5eb11247b1c9..524f07524098 100644 --- a/graylog2-web-interface/src/components/event-definitions/event-definitions/BulkActions.tsx +++ b/graylog2-web-interface/src/components/event-definitions/event-definitions/BulkActions.tsx @@ -122,6 +122,7 @@ const BulkActions = () => { if (failures?.length) { const notUpdatedDefinitionIds = failures.map(({ entity_id }) => entity_id); setSelectedEntities(notUpdatedDefinitionIds); + UserNotification.error(`${notUpdatedDefinitionIds.length} out of ${selectedItemsAmount} selected ${getDescriptor(selectedItemsAmount)} could not be ${actionType}d.`); } else { setSelectedEntities([]); UserNotification.success(`${selectedItemsAmount} ${getDescriptor(selectedItemsAmount)} ${StringUtils.pluralize(selectedItemsAmount, 'was', 'were')} ${actionType}d successfully.`, 'Success'); From 6864f1d6c55e150f856aeb50f977b1e2ec8fb8b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 15:12:06 +0100 Subject: [PATCH 06/14] Bump the typescript-eslint group (#21242) Bumps the typescript-eslint group in /graylog2-web-interface/packages/eslint-config-graylog with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 8.18.1 to 8.18.2 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.18.2/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.18.1 to 8.18.2 - [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.18.2/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: typescript-eslint - dependency-name: "@typescript-eslint/parser" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: typescript-eslint ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../packages/eslint-config-graylog/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graylog2-web-interface/packages/eslint-config-graylog/package.json b/graylog2-web-interface/packages/eslint-config-graylog/package.json index 6def3f4578eb..bccbf43dbccd 100644 --- a/graylog2-web-interface/packages/eslint-config-graylog/package.json +++ b/graylog2-web-interface/packages/eslint-config-graylog/package.json @@ -15,8 +15,8 @@ "dependencies": { "@babel/eslint-parser": "7.16.5", "@tanstack/eslint-plugin-query": "4.36.1", - "@typescript-eslint/eslint-plugin": "8.18.1", - "@typescript-eslint/parser": "8.18.1", + "@typescript-eslint/eslint-plugin": "8.18.2", + "@typescript-eslint/parser": "8.18.2", "eslint": "8.57.0", "eslint-config-airbnb": "19.0.4", "eslint-import-resolver-webpack": "0.13.10", From 6826b4ade0acc55ea51d4ad4bf18845c49b0c5af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 08:07:02 +0100 Subject: [PATCH 07/14] Bump the typescript-eslint group (#21253) Bumps the typescript-eslint group in /graylog2-web-interface/packages/eslint-config-graylog with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 8.18.2 to 8.19.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.19.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.18.2 to 8.19.0 - [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.19.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:production update-type: version-update:semver-minor dependency-group: typescript-eslint - dependency-name: "@typescript-eslint/parser" dependency-type: direct:production update-type: version-update:semver-minor dependency-group: typescript-eslint ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../packages/eslint-config-graylog/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graylog2-web-interface/packages/eslint-config-graylog/package.json b/graylog2-web-interface/packages/eslint-config-graylog/package.json index bccbf43dbccd..8779bcccf8dd 100644 --- a/graylog2-web-interface/packages/eslint-config-graylog/package.json +++ b/graylog2-web-interface/packages/eslint-config-graylog/package.json @@ -15,8 +15,8 @@ "dependencies": { "@babel/eslint-parser": "7.16.5", "@tanstack/eslint-plugin-query": "4.36.1", - "@typescript-eslint/eslint-plugin": "8.18.2", - "@typescript-eslint/parser": "8.18.2", + "@typescript-eslint/eslint-plugin": "8.19.0", + "@typescript-eslint/parser": "8.19.0", "eslint": "8.57.0", "eslint-config-airbnb": "19.0.4", "eslint-import-resolver-webpack": "0.13.10", From c43517c3b5b80da463f1e87493089e4dabd5e032 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 08:15:20 +0100 Subject: [PATCH 08/14] Bump org.freemarker:freemarker from 2.3.33 to 2.3.34 (#21236) Bumps org.freemarker:freemarker from 2.3.33 to 2.3.34. --- updated-dependencies: - dependency-name: org.freemarker:freemarker dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dae4fddcbbe4..560df0eea20e 100644 --- a/pom.xml +++ b/pom.xml @@ -117,7 +117,7 @@ 2.18.0 4.0.0 2.36.0 - 2.3.33 + 2.3.34 1.5.1 4.2.1 0.1.9-graylog-3 From 669e2d3e642bf3bbf022874ed8ee544287bf39b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 08:16:16 +0100 Subject: [PATCH 09/14] Bump nl.jqno.equalsverifier:equalsverifier from 3.17.5 to 3.18 (#21247) Bumps [nl.jqno.equalsverifier:equalsverifier](https://github.com/jqno/equalsverifier) from 3.17.5 to 3.18. - [Release notes](https://github.com/jqno/equalsverifier/releases) - [Changelog](https://github.com/jqno/equalsverifier/blob/main/CHANGELOG.md) - [Commits](https://github.com/jqno/equalsverifier/compare/equalsverifier-3.17.5...equalsverifier-3.18) --- updated-dependencies: - dependency-name: nl.jqno.equalsverifier:equalsverifier dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 560df0eea20e..d489ab6b750a 100644 --- a/pom.xml +++ b/pom.xml @@ -191,7 +191,7 @@ 3.27.0 2.2.0 4.2.2 - 3.17.5 + 3.18 1.5 4.13.2 5.11.4 From ef2248006b9dedb24ec98b536f9448c8de081890 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 08:19:51 +0100 Subject: [PATCH 10/14] Bump org.json:json from 20240303 to 20241224 (#21255) Bumps [org.json:json](https://github.com/douglascrockford/JSON-java) from 20240303 to 20241224. - [Release notes](https://github.com/douglascrockford/JSON-java/releases) - [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md) - [Commits](https://github.com/douglascrockford/JSON-java/commits) --- updated-dependencies: - dependency-name: org.json:json dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d489ab6b750a..61ec3d72a3d3 100644 --- a/pom.xml +++ b/pom.xml @@ -144,7 +144,7 @@ 7.0.3 2.13.0 0.9.15 - 20240303 + 20241224 2.9.0 3.9.0 0.9.0.1-7 From fc6bdb635f69cdc06387040783f73a89a1e74d49 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 08:23:07 +0100 Subject: [PATCH 11/14] Bump com.github.luben:zstd-jni from 1.5.6-8 to 1.5.6-9 (#21257) Bumps [com.github.luben:zstd-jni](https://github.com/luben/zstd-jni) from 1.5.6-8 to 1.5.6-9. - [Commits](https://github.com/luben/zstd-jni/compare/v1.5.6-8...v1.5.6-9) --- updated-dependencies: - dependency-name: com.github.luben:zstd-jni dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 61ec3d72a3d3..a04a4e65a3dc 100644 --- a/pom.xml +++ b/pom.xml @@ -179,7 +179,7 @@ 7.0.2 3.2.1 3.1.0 - 1.5.6-8 + 1.5.6-9 9.2.1 0.3.2 0.12.6 From f7e702b8f4096178109cc0ba33b9c82ba72fbc20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 08:24:04 +0100 Subject: [PATCH 12/14] Bump org.mockito:mockito-bom from 5.14.2 to 5.15.2 (#21259) Bumps [org.mockito:mockito-bom](https://github.com/mockito/mockito) from 5.14.2 to 5.15.2. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v5.14.2...v5.15.2) --- updated-dependencies: - dependency-name: org.mockito:mockito-bom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a04a4e65a3dc..0f3cbb9ada01 100644 --- a/pom.xml +++ b/pom.xml @@ -195,7 +195,7 @@ 1.5 4.13.2 5.11.4 - 5.14.2 + 5.15.2 5.5.0 1.19.0 1.20.4 From aa3ebf972a6d4d7adee08c89c25a18ef4be3c1b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 08:24:57 +0100 Subject: [PATCH 13/14] Bump org.assertj:assertj-core from 3.27.0 to 3.27.2 (#21267) Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.27.0 to 3.27.2. - [Release notes](https://github.com/assertj/assertj/releases) - [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.0...assertj-build-3.27.2) --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0f3cbb9ada01..d5c43742cae6 100644 --- a/pom.xml +++ b/pom.xml @@ -188,7 +188,7 @@ 2.0.0.AM27 - 3.27.0 + 3.27.2 2.2.0 4.2.2 3.18 From b8e039e105f8f87c94f9c3ae7f74cb16c62ad39f Mon Sep 17 00:00:00 2001 From: Jan Heise Date: Mon, 6 Jan 2025 12:17:12 +0100 Subject: [PATCH 14/14] Fix to load indices status in batches so that the URL used to call OpenSearch does not exceed maximum length (#21208) * fix to load status in batches so that the url does not get too long * partitioning over the length of the names, added changelog * fix calculation error * fix calculation error * switching approach * switching approach * fixing test * refactorings * fix error during refactorings * adding more block types * Fixing max --- changelog/unreleased/pr-21208.toml | 4 ++ .../elasticsearch7/IndicesAdapterES7.java | 16 ++++++-- .../blocks/BlockSettingsParser.java | 37 ++++++++++++------- .../opensearch2/IndicesAdapterOS2.java | 19 ++++++++-- .../blocks/BlockSettingsParser.java | 37 ++++++++++++------- .../blocks/BlockSettingsParserTest.java | 7 ++-- 6 files changed, 82 insertions(+), 38 deletions(-) create mode 100644 changelog/unreleased/pr-21208.toml diff --git a/changelog/unreleased/pr-21208.toml b/changelog/unreleased/pr-21208.toml new file mode 100644 index 000000000000..eb3b0b8ff1b8 --- /dev/null +++ b/changelog/unreleased/pr-21208.toml @@ -0,0 +1,4 @@ +type = "f" +message = "batching request for index block status if the combined length of the indices exceed the max possible URL length " + +pulls = ["21208"] diff --git a/graylog-storage-elasticsearch7/src/main/java/org/graylog/storage/elasticsearch7/IndicesAdapterES7.java b/graylog-storage-elasticsearch7/src/main/java/org/graylog/storage/elasticsearch7/IndicesAdapterES7.java index 5a82c91e9242..7d604e8461db 100644 --- a/graylog-storage-elasticsearch7/src/main/java/org/graylog/storage/elasticsearch7/IndicesAdapterES7.java +++ b/graylog-storage-elasticsearch7/src/main/java/org/graylog/storage/elasticsearch7/IndicesAdapterES7.java @@ -109,6 +109,11 @@ public class IndicesAdapterES7 implements IndicesAdapter { private final ClusterStateApi clusterStateApi; private final IndexTemplateAdapter indexTemplateAdapter; + // this is the maximum amount of bytes that the index list is supposed to fill in a request, + // it assumes that these don't need url encoding. If we exceed the maximum, we request settings for all indices + // and filter after wards + private final int MAX_INDICES_URL_LENGTH = 3000; + @Inject public IndicesAdapterES7(ElasticsearchClient client, StatsApi statsApi, @@ -435,14 +440,17 @@ public IndicesBlockStatus getIndicesBlocksStatus(final List indices) { if (indices == null || indices.isEmpty()) { throw new IllegalArgumentException("Expecting list of indices with at least one index present."); } - final GetSettingsRequest getSettingsRequest = new GetSettingsRequest() - .indices(indices.toArray(new String[]{})) + + final GetSettingsRequest request = new GetSettingsRequest() .indicesOptions(IndicesOptions.fromOptions(false, true, true, true)) - .names(new String[]{}); + .names("index.blocks.read", "index.blocks.write", "index.blocks.metadata", "index.blocks.read_only", "index.blocks.read_only_allow_delete"); + + final var maxLengthExceeded = String.join(",", indices).length() > MAX_INDICES_URL_LENGTH; + final GetSettingsRequest getSettingsRequest = maxLengthExceeded ? request : request.indices(indices.toArray(new String[]{})); return client.execute((c, requestOptions) -> { final GetSettingsResponse settingsResponse = c.indices().getSettings(getSettingsRequest, requestOptions); - return BlockSettingsParser.parseBlockSettings(settingsResponse); + return BlockSettingsParser.parseBlockSettings(settingsResponse, maxLengthExceeded ? Optional.of(indices) : Optional.empty()); }); } diff --git a/graylog-storage-elasticsearch7/src/main/java/org/graylog/storage/elasticsearch7/blocks/BlockSettingsParser.java b/graylog-storage-elasticsearch7/src/main/java/org/graylog/storage/elasticsearch7/blocks/BlockSettingsParser.java index a735b957784b..f073d6121e46 100644 --- a/graylog-storage-elasticsearch7/src/main/java/org/graylog/storage/elasticsearch7/blocks/BlockSettingsParser.java +++ b/graylog-storage-elasticsearch7/src/main/java/org/graylog/storage/elasticsearch7/blocks/BlockSettingsParser.java @@ -21,6 +21,9 @@ import org.graylog.shaded.elasticsearch7.org.elasticsearch.common.settings.Settings; import org.graylog2.indexer.indices.blocks.IndicesBlockStatus; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; @@ -29,23 +32,31 @@ public class BlockSettingsParser { static final String BLOCK_SETTINGS_PREFIX = "index.blocks."; public static IndicesBlockStatus parseBlockSettings(final GetSettingsResponse settingsResponse) { - IndicesBlockStatus result = new IndicesBlockStatus(); + return parseBlockSettings(settingsResponse, Optional.empty()); + } + + public static IndicesBlockStatus parseBlockSettings(final GetSettingsResponse settingsResponse, final Optional> indices) { + final IndicesBlockStatus result = new IndicesBlockStatus(); final ImmutableOpenMap indexToSettingsMap = settingsResponse.getIndexToSettings(); final String[] indicesInResponse = indexToSettingsMap.keys().toArray(String.class); - for (String index : indicesInResponse) { - final Settings blockSettings = indexToSettingsMap.get(index).getByPrefix(BLOCK_SETTINGS_PREFIX); - - if (!blockSettings.isEmpty()) { - final Set blockSettingsNames = blockSettings.names(); - final Set blockSettingsSetToTrue = blockSettingsNames.stream() - .filter(s -> blockSettings.getAsBoolean(s, false)) - .map(s -> BLOCK_SETTINGS_PREFIX + s) - .collect(Collectors.toSet()); - if (!blockSettingsSetToTrue.isEmpty()) { - result.addIndexBlocks(index, blockSettingsSetToTrue); + + indices.orElse(Arrays.stream(indicesInResponse).toList()).forEach(index -> { + final var settings = indexToSettingsMap.get(index); + if(settings != null) { + final Settings blockSettings = settings.getByPrefix(BLOCK_SETTINGS_PREFIX); + + if (!blockSettings.isEmpty()) { + final Set blockSettingsNames = blockSettings.names(); + final Set blockSettingsSetToTrue = blockSettingsNames.stream() + .filter(s -> blockSettings.getAsBoolean(s, false)) + .map(s -> BLOCK_SETTINGS_PREFIX + s) + .collect(Collectors.toSet()); + if (!blockSettingsSetToTrue.isEmpty()) { + result.addIndexBlocks(index, blockSettingsSetToTrue); + } } } - } + }); return result; } diff --git a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/IndicesAdapterOS2.java b/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/IndicesAdapterOS2.java index d015335b44e9..d79852836d72 100644 --- a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/IndicesAdapterOS2.java +++ b/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/IndicesAdapterOS2.java @@ -84,6 +84,7 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -97,6 +98,7 @@ import java.util.function.Consumer; import java.util.stream.Collectors; +import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.toList; import static org.graylog.storage.opensearch2.OpenSearchClient.withTimeout; @@ -109,6 +111,11 @@ public class IndicesAdapterOS2 implements IndicesAdapter { private final ClusterStateApi clusterStateApi; private final IndexTemplateAdapter indexTemplateAdapter; + // this is the maximum amount of bytes that the index list is supposed to fill in a request, + // it assumes that these don't need url encoding. If we exceed the maximum, we request settings for all indices + // and filter after wards + private final int MAX_INDICES_URL_LENGTH = 3000; + @Inject public IndicesAdapterOS2(OpenSearchClient client, StatsApi statsApi, @@ -431,19 +438,23 @@ public List getShardsInfo(String indexName) { return catApi.getShardsInfo(indexName); } + @Override public IndicesBlockStatus getIndicesBlocksStatus(final List indices) { if (indices == null || indices.isEmpty()) { throw new IllegalArgumentException("Expecting list of indices with at least one index present."); } - final GetSettingsRequest getSettingsRequest = new GetSettingsRequest() - .indices(indices.toArray(new String[]{})) + + final GetSettingsRequest request = new GetSettingsRequest() .indicesOptions(IndicesOptions.fromOptions(false, true, true, true)) - .names(new String[]{}); + .names("index.blocks.read", "index.blocks.write", "index.blocks.metadata", "index.blocks.read_only", "index.blocks.read_only_allow_delete"); + + final var maxLengthExceeded = String.join(",", indices).length() > MAX_INDICES_URL_LENGTH; + final GetSettingsRequest getSettingsRequest = maxLengthExceeded ? request : request.indices(indices.toArray(new String[]{})); return client.execute((c, requestOptions) -> { final GetSettingsResponse settingsResponse = c.indices().getSettings(getSettingsRequest, requestOptions); - return BlockSettingsParser.parseBlockSettings(settingsResponse); + return BlockSettingsParser.parseBlockSettings(settingsResponse, maxLengthExceeded ? Optional.of(indices) : Optional.empty()); }); } diff --git a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/blocks/BlockSettingsParser.java b/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/blocks/BlockSettingsParser.java index c7f6da23aa98..84ba9cbfe114 100644 --- a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/blocks/BlockSettingsParser.java +++ b/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/blocks/BlockSettingsParser.java @@ -20,6 +20,8 @@ import org.graylog.shaded.opensearch2.org.opensearch.action.admin.indices.settings.get.GetSettingsResponse; import org.graylog.shaded.opensearch2.org.opensearch.common.settings.Settings; +import java.util.List; +import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; @@ -28,23 +30,30 @@ public class BlockSettingsParser { static final String BLOCK_SETTINGS_PREFIX = "index.blocks."; public static IndicesBlockStatus parseBlockSettings(final GetSettingsResponse settingsResponse) { - IndicesBlockStatus result = new IndicesBlockStatus(); + return parseBlockSettings(settingsResponse, Optional.empty()); + } + + public static IndicesBlockStatus parseBlockSettings(final GetSettingsResponse settingsResponse, final Optional> indices) { + final IndicesBlockStatus result = new IndicesBlockStatus(); final var indexToSettingsMap = settingsResponse.getIndexToSettings(); - final String[] indicesInResponse = indexToSettingsMap.keySet().toArray(new String[0]); - for (String index : indicesInResponse) { - final Settings blockSettings = indexToSettingsMap.get(index).getByPrefix(BLOCK_SETTINGS_PREFIX); - - if (!blockSettings.isEmpty()) { - final Set blockSettingsNames = blockSettings.names(); - final Set blockSettingsSetToTrue = blockSettingsNames.stream() - .filter(s -> blockSettings.getAsBoolean(s, false)) - .map(s -> BLOCK_SETTINGS_PREFIX + s) - .collect(Collectors.toSet()); - if (!blockSettingsSetToTrue.isEmpty()) { - result.addIndexBlocks(index, blockSettingsSetToTrue); + + indices.orElse(indexToSettingsMap.keySet().stream().toList()).forEach(index -> { + final var settings = indexToSettingsMap.get(index); + if(settings != null) { + final Settings blockSettings = settings.getByPrefix(BLOCK_SETTINGS_PREFIX); + + if (!blockSettings.isEmpty()) { + final Set blockSettingsNames = blockSettings.names(); + final Set blockSettingsSetToTrue = blockSettingsNames.stream() + .filter(s -> blockSettings.getAsBoolean(s, false)) + .map(s -> BLOCK_SETTINGS_PREFIX + s) + .collect(Collectors.toSet()); + if (!blockSettingsSetToTrue.isEmpty()) { + result.addIndexBlocks(index, blockSettingsSetToTrue); + } } } - } + }); return result; } diff --git a/graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/blocks/BlockSettingsParserTest.java b/graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/blocks/BlockSettingsParserTest.java index b9382514c989..53123e253208 100644 --- a/graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/blocks/BlockSettingsParserTest.java +++ b/graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/blocks/BlockSettingsParserTest.java @@ -23,6 +23,7 @@ import java.util.Collection; import java.util.Map; +import java.util.Optional; import java.util.Set; import static org.junit.Assert.assertEquals; @@ -35,7 +36,7 @@ public class BlockSettingsParserTest { @Test public void noBlockedIndicesIdentifiedIfEmptyResponseParsed() { GetSettingsResponse emptyResponse = new GetSettingsResponse(Map.of(), Map.of()); - final IndicesBlockStatus indicesBlockStatus = BlockSettingsParser.parseBlockSettings(emptyResponse); + final IndicesBlockStatus indicesBlockStatus = BlockSettingsParser.parseBlockSettings(emptyResponse, Optional.empty()); assertNotNull(indicesBlockStatus); assertEquals(0, indicesBlockStatus.countBlockedIndices()); } @@ -44,7 +45,7 @@ public void noBlockedIndicesIdentifiedIfEmptyResponseParsed() { public void noBlockedIndicesIdentifiedIfEmptySettingsPresent() { var settingsBuilder = Map.of("index_0", Settings.builder().build()); GetSettingsResponse emptySettingsResponse = new GetSettingsResponse(settingsBuilder, Map.of()); - final IndicesBlockStatus indicesBlockStatus = BlockSettingsParser.parseBlockSettings(emptySettingsResponse); + final IndicesBlockStatus indicesBlockStatus = BlockSettingsParser.parseBlockSettings(emptySettingsResponse, Optional.empty()); assertNotNull(indicesBlockStatus); assertEquals(0, indicesBlockStatus.countBlockedIndices()); } @@ -64,7 +65,7 @@ public void parserProperlyResponseWithMultipleIndicesWithDifferentBlockSettings( .put("index.blocks.read_only_allow_delete", true) .build()); GetSettingsResponse settingsResponse = new GetSettingsResponse(settingsBuilder, Map.of()); - final IndicesBlockStatus indicesBlockStatus = BlockSettingsParser.parseBlockSettings(settingsResponse); + final IndicesBlockStatus indicesBlockStatus = BlockSettingsParser.parseBlockSettings(settingsResponse, Optional.empty()); assertNotNull(indicesBlockStatus); assertEquals(3, indicesBlockStatus.countBlockedIndices()); final Set blockedIndices = indicesBlockStatus.getBlockedIndices();