Skip to content

Enhance Wazuh integration by adding version, revision, and stage on wz dashboard - #1327

Merged
yenienserrano merged 8 commits into
mainfrom
enhancement/8550-enhance-the-download-and-install-the-agent-command
Jun 5, 2026
Merged

Enhance Wazuh integration by adding version, revision, and stage on wz dashboard#1327
yenienserrano merged 8 commits into
mainfrom
enhancement/8550-enhance-the-download-and-install-the-agent-command

Conversation

@felipegonzalezmv

Copy link
Copy Markdown

Description

Removes the hardcoded release suffix from the Deploy new agent wizard. Package names and download URLs now use the Wazuh build metadata from core.injectedMetadata (getWazuhStage / getWazuhRevision), initialized in plugin setup via initWazuhBuildInfoFromCore.

  • Pre-releases: stage in the package name (e.g. beta2) and staging URLs.
  • Production: revision in the package name (e.g. 01) and production URLs.

Requires a companion wazuh-dashboard PR that exposes getWazuhStage() and getWazuhRevision() to plugins and sets wazuh.stage in the dashboard package.json.

Issues Resolved

Evidence

Step Expected result
Endpoints summary → Deploy new agent → Linux → RPM amd64 Command includes wazuh-agent-<version>-<stage>.x86_64.rpm and matching staging URL
Change wazuh.stage in wazuh-dashboard/package.json and restart OSD Package name and URL reflect the new stage without rebuilding the plugin
Production build (stage empty) Package uses revision and packages.wazuh.com/production/... URL

Test

  1. Set "stage": "beta x" under wazuh in wazuh-dashboard/Version.json.
  2. Restart the dashboard (yarn start --no-base-path in the dev container).
  3. Open Deploy new agent → Linux → RPM amd64 and verify package name and download URL contain beta x.
  4. Change stage (or clear it for production) and confirm commands update after restart.

Check List

  • All tests pass (yarn test:jest)
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff
  • Companion wazuh-dashboard PR linked

…data. Update related interfaces and mocks to support new properties across the application.
@github-actions

github-actions Bot commented May 29, 2026

Copy link
Copy Markdown

🔗 Workflow run · commit ca0a78ef286a8362f6609ca05a6a426ca778e442

❌ 16 Jest Test Failure(s)

📄 junit-jest-group2-Linux/TEST-Jest Tests.xml

❌ OpenSearchDashboardsRequest headers property exposes authorization header if secured = false (0.001s)

Jest Tests.src/core/server/http/router

TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
    at Object.<anonymous> (/home/runner/work/wazuh-dashboard/wazuh-dashboard/src/core/server/http/http_service.test.ts:150:10)

❌ logs error if already set up (0.003s)

Jest Tests.src/core/server/http

Error: expect(received).toMatchSnapshot(properties)

Snapshot name: `RenderingService setup() render() renders "core" page 1`

- Snapshot  - 1
+ Received  + 9

@@ -24,10 +24,13 @@
        "branch": Any<String>,
        "buildNum": Any<Number>,
  … (26 more lines)

❌ RenderingService setup() render() renders "core" page for blank basepath (0.012s)

Jest Tests.src/core/server/rendering

Error: expect(received).toMatchSnapshot(properties)

Snapshot name: `RenderingService setup() render() renders "core" page for blank basepath 1`

- Snapshot  - 1
+ Received  + 9

@@ -24,10 +24,13 @@
        "branch": Any<String>,
        "buildNum": Any<Number>,
  … (26 more lines)

❌ RenderingService setup() render() renders "core" page driven by defaults (0.009s)

Jest Tests.src/core/server/rendering

Error: expect(received).toMatchSnapshot(properties)

Snapshot name: `RenderingService setup() render() renders "core" page driven by defaults 1`

- Snapshot  - 1
+ Received  + 9

@@ -24,10 +24,13 @@
        "branch": Any<String>,
        "buildNum": Any<Number>,
  … (26 more lines)

❌ RenderingService setup() render() renders "core" page driven by settings (0.009s)

Jest Tests.src/core/server/rendering

Error: expect(received).toMatchSnapshot(properties)

Snapshot name: `RenderingService setup() render() renders "core" page driven by settings 1`

- Snapshot  - 1
+ Received  + 9

@@ -24,10 +24,13 @@
        "branch": Any<String>,
        "buildNum": Any<Number>,
  … (26 more lines)

❌ RenderingService setup() render() renders "core" page with no defaults or overrides (0.010s)

Jest Tests.src/core/server/rendering

Error: expect(received).toMatchSnapshot(properties)

Snapshot name: `RenderingService setup() render() renders "core" page with no defaults or overrides 1`

- Snapshot  - 1
+ Received  + 9

@@ -24,10 +24,13 @@
        "branch": Any<String>,
        "buildNum": Any<Number>,
  … (26 more lines)

❌ RenderingService setup() render() renders "core" with excluded user settings (0.009s)

Jest Tests.src/core/server/rendering

Error: expect(received).toMatchSnapshot(properties)

Snapshot name: `RenderingService setup() render() renders "core" with excluded user settings 1`

- Snapshot  - 1
+ Received  + 9

@@ -24,10 +24,13 @@
        "branch": Any<String>,
        "buildNum": Any<Number>,
  … (26 more lines)

❌ RenderingService setup() render() renders "core" from legacy request (0.007s)

Jest Tests.src/core/server/rendering

Error: expect(received).toMatchSnapshot(properties)

Snapshot name: `RenderingService setup() render() renders "core" from legacy request 1`

- Snapshot  - 1
+ Received  + 9

@@ -24,10 +24,13 @@
        "branch": Any<String>,
        "buildNum": Any<Number>,
  … (26 more lines)

❌ ApmSystem setup does not init apm if no config provided (0.002s)

Jest Tests.src/core/public

Error: expect(received).toMatchSnapshot(hint)

Snapshot name: `correctly creates default environment in dev mode when isDevClusterMaster (deprecated) is true: env properties 1`

- Snapshot  - 0
+ Received  + 3

@@ -28,10 +28,13 @@
      "branch": "some-branch",
      "buildNum": 9007199254740991,
  … (17 more lines)

❌ correctly creates default environment in dev mode when isDevClusterManager is true (0.002s)

Jest Tests.packages/osd-config/src

Error: expect(received).toMatchSnapshot(hint)

Snapshot name: `correctly creates default environment in dev mode when isDevClusterManager is true: env properties 1`

- Snapshot  - 0
+ Received  + 3

@@ -28,10 +28,13 @@
      "branch": "some-branch",
      "buildNum": 9007199254740991,
  … (17 more lines)

❌ correctly creates default environment in dev mode when isDevClusterManager and isDevClusterMaster both are true (0.002s)

Jest Tests.packages/osd-config/src

Error: expect(received).toMatchSnapshot(hint)

Snapshot name: `correctly creates default environment in dev mode when isDevClusterManager and isDevClusterMaster both are true: env properties 1`

- Snapshot  - 0
+ Received  + 3

@@ -28,10 +28,13 @@
      "branch": "some-branch",
      "buildNum": 9007199254740991,
  … (17 more lines)

❌ correctly creates default environment in prod distributable mode. (0.002s)

Jest Tests.packages/osd-config/src

Error: expect(received).toMatchSnapshot(hint)

Snapshot name: `correctly creates default environment in prod distributable mode.: env properties 1`

- Snapshot  - 0
+ Received  + 3

@@ -28,10 +28,13 @@
      "branch": "feature-v1",
      "buildNum": 100,
  … (17 more lines)

❌ correctly creates default environment in prod non-distributable mode. (0.002s)

Jest Tests.packages/osd-config/src

Error: expect(received).toMatchSnapshot(hint)

Snapshot name: `correctly creates default environment in prod non-distributable mode.: env properties 1`

- Snapshot  - 0
+ Received  + 3

@@ -28,10 +28,13 @@
      "branch": "feature-v1",
      "buildNum": 9007199254740991,
  … (17 more lines)

❌ correctly creates default environment if --env.name is supplied. (0.002s)

Jest Tests.packages/osd-config/src

Error: expect(received).toMatchSnapshot(hint)

Snapshot name: `correctly creates default environment if \`--env.name\` is supplied.: dev env properties 1`

- Snapshot  - 0
+ Received  + 3

@@ -29,10 +29,13 @@
      "branch": "feature-v1",
      "buildNum": 9007199254740991,
  … (17 more lines)
Error: expect(received).toMatchSnapshot(hint)

Snapshot name: `correctly creates default environment if \`--env.name\` is supplied.: prod env properties 1`

- Snapshot  - 0
+ Received  + 3

@@ -29,10 +29,13 @@
      "branch": "feature-v1",
      "buildNum": 9007199254740991,
  … (17 more lines)

❌ correctly creates environment with constructor. (0.002s)

Jest Tests.packages/osd-config/src

Error: expect(received).toMatchSnapshot(hint)

Snapshot name: `correctly creates environment with constructor.: env properties 1`

- Snapshot  - 0
+ Received  + 3

@@ -28,10 +28,13 @@
      "branch": "feature-v1",
      "buildNum": 100,
  … (17 more lines)

❌ CelestialCard Group functionality renders group toggle button when isGroup is true (0.019s)

Jest Tests.packages/osd-apm-topology/src/components/celestial_card

Error: expect(received).toMatchSnapshot()

Snapshot name: `Header help menu hides survey link 1`

- Snapshot  - 1
+ Received  + 0

@@ -1853,11 +1853,10 @@
                            </span>
                          </a>
  … (15 more lines)

16 failure(s) across 1 suite(s). Full XML reports are in the junit-jest-* artifacts.

…faces

This commit introduces a new step in the build workflow to set the production flag in VERSION.json based on the deployment stage. Additionally, it updates various interfaces and mocks across the application to include the new  property, ensuring consistent handling of this metadata throughout the codebase.
@felipegonzalezmv felipegonzalezmv self-assigned this May 29, 2026
This commit removes the production flag handling from the build workflow and integrates it directly into the package.json during the build process. It also introduces a new WazuhBuildInfo interface to encapsulate version, revision, stage, and production status, updating various components and mocks across the application to utilize this new structure for consistent metadata management.
@Ripdiegozz
Ripdiegozz self-requested a review June 1, 2026 19:24

@Ripdiegozz Ripdiegozz left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Tests:

I'm getting the following error when installing the wazuh-dashboard dependencies:

Server output:

wazuh-dashboard enhancement/8550-enhance-the-download-and-install-the-agent-command ? ✗ yarn osd bootstrap
yarn run v1.22.19
$ scripts/use_node scripts/osd bootstrap
 info [opensearch-dashboards] running yarn

$ scripts/use_node ./preinstall_check
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Resolution field "typescript@4.6.4" is incompatible with requested version "typescript@^5.3.3"
warning Resolution field "typescript@4.6.4" is incompatible with requested version "typescript@~4.5.2"
warning Lockfile has incorrect entry for "serialize-javascript@^6.0.2". Ignoring it.
(node:220735) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
warning Resolution field "langsmith@0.4.7" is incompatible with requested version "langsmith@^0.3.67"
[3/5] Fetching packages...
warning bare-fs@4.0.1: The engine "bare" appears to be invalid.
warning bare-os@3.5.1: The engine "bare" appears to be invalid.
warning @zip.js/zip.js@2.8.16: The engine "deno" appears to be invalid.
warning @zip.js/zip.js@2.8.16: The engine "bun" appears to be invalid.
[4/5] Linking dependencies...
warning "workspace-aggregator-ef4ea71e-e774-4e34-9aae-3927edc79b45 > osd_tp_run_pipeline > @elastic/eui@1.22.1" has incorrect peer dependency "@types/react@^16.9.34".
warning "workspace-aggregator-ef4ea71e-e774-4e34-9aae-3927edc79b45 > osd_tp_run_pipeline > @elastic/eui@1.22.1" has incorrect peer dependency "@types/react-dom@^16.9.6".
warning "workspace-aggregator-ef4ea71e-e774-4e34-9aae-3927edc79b45 > osd_tp_run_pipeline > @elastic/eui@1.22.1" has incorrect peer dependency "react@^16.12".
warning "workspace-aggregator-ef4ea71e-e774-4e34-9aae-3927edc79b45 > osd_tp_run_pipeline > @elastic/eui@1.22.1" has incorrect peer dependency "react-dom@^16.12".
warning "@elastic/eui > react-ace@7.0.5" has incorrect peer dependency "react@^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0".
warning "@elastic/eui > react-ace@7.0.5" has incorrect peer dependency "react-dom@^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0".
warning "@elastic/eui > react-beautiful-dnd > use-memo-one@1.1.2" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning "@elastic/eui > react-focus-on > react-style-singleton@2.1.1" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning "@elastic/eui > react-focus-on > use-callback-ref@1.2.5" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning "@elastic/eui > react-focus-on > use-sidecar@1.0.5" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning "@elastic/eui > react-focus-on > react-focus-lock > react-clientside-effect@1.2.5" has incorrect peer dependency "react@^15.3.0 || ^16.0.0 || ^17.0.0".
warning "@elastic/eui > react-focus-on > react-remove-scroll > react-remove-scroll-bar@2.2.0" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning "@osd/apm-topology > @osd/i18n > react-intl@2.9.0" has incorrect peer dependency "react@^0.14.9 || ^15.0.0 || ^16.0.0".
warning "@osd/interpreter > url-loader@2.3.0" has incorrect peer dependency "webpack@^4.0.0".
warning " > @elastic/charts@31.1.0" has incorrect peer dependency "react@^16.12.0".
warning " > @elastic/charts@31.1.0" has incorrect peer dependency "react-dom@^16.12.0".
warning "@osd/ui-framework > @osd/optimizer > @osd/ui-shared-deps > react-router > mini-create-react-context@0.4.1" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0".
warning "workspace-aggregator-ef4ea71e-e774-4e34-9aae-3927edc79b45 > http-aws-es@6.0.1" has unmet peer dependency "aws-sdk@^2.138.0".
warning "workspace-aggregator-ef4ea71e-e774-4e34-9aae-3927edc79b45 > http-aws-es@6.0.1" has incorrect peer dependency "elasticsearch@^15.0.0".
warning " > @cypress/webpack-preprocessor@6.0.2" has unmet peer dependency "@babel/preset-env@^7.0.0".
warning " > @cypress/webpack-preprocessor@6.0.2" has incorrect peer dependency "babel-loader@^8.3 || ^9".
warning "react-grid-layout > react-resizable@1.11.1" has incorrect peer dependency "react@0.14.x || 15.x || 16.x || 17.x".
warning "react-grid-layout > react-resizable@1.11.1" has incorrect peer dependency "react-dom@0.14.x || 15.x || 16.x || 17.x".
warning " > react-sizeme@2.6.12" has incorrect peer dependency "react@^0.14.0 || ^15.0.0-0 || ^16.0.0".
warning " > react-sizeme@2.6.12" has incorrect peer dependency "react-dom@^0.14.0 || ^15.0.0-0 || ^16.0.0".
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
[5/5] Building fresh packages...
success Saved lockfile.
$ scripts/use_node scripts/postinstall
Patching node_modules/font-awesome/scss/_variables.scss
Patching node_modules/@elastic/charts/dist/theme.scss
Patching node_modules/rison-node/js/rison.js

 succ yarn.lock analysis completed without any issues
 info [@osd/cross-platform] running [osd:bootstrap] script
 info [@osd/stylelint-plugin-stylelint] running [osd:bootstrap] script
 info [@osd/test-subj-selector] running [osd:bootstrap] script
 info [@osd/utility-types] running [osd:bootstrap] script
(node:220720) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
 succ [@osd/test-subj-selector] bootstrap complete
 succ [@osd/utility-types] bootstrap complete
 succ [@osd/stylelint-plugin-stylelint] bootstrap complete
 succ [@osd/cross-platform] bootstrap complete
 info [@osd/config-schema] running [osd:bootstrap] script
 info [@osd/std] running [osd:bootstrap] build targets
 succ [@osd/config-schema] bootstrap complete
(node:222019) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:222018) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
 succ [@osd/std] bootstrap complete
 info [@osd/logging] running [osd:bootstrap] script
 info [@osd/utils] running [osd:bootstrap] script
 succ [@osd/logging] bootstrap complete
 succ [@osd/utils] bootstrap complete
 info [@osd/apm-config-loader] running [osd:bootstrap] script
 info [@osd/dev-utils] running [osd:bootstrap] script
 succ [@osd/apm-config-loader] bootstrap complete
 succ [@osd/dev-utils] bootstrap complete
 info [@osd/ace] running [osd:bootstrap] build targets
 info [@osd/analytics] running [osd:bootstrap] script
 info [@osd/antlr-grammar] running [osd:bootstrap] script
 info [@osd/config] running [osd:bootstrap] script
(node:222469) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
 succ [@osd/analytics] bootstrap complete
 info [@osd/i18n] running [osd:bootstrap] build targets
 succ [@osd/config] bootstrap complete
 info [@osd/opensearch] running [osd:bootstrap] script
 succ [@osd/ace] bootstrap complete
 info [@osd/plugin-generator] running [osd:bootstrap] script
(node:222572) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:222571) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
 succ [@osd/opensearch] bootstrap complete
 info [@osd/telemetry-tools] running [osd:bootstrap] script
 succ [@osd/i18n] bootstrap complete
 info [@osd/test] running [osd:bootstrap] script
 succ [@osd/plugin-generator] bootstrap complete
 succ [@osd/telemetry-tools] bootstrap complete
 succ [@osd/antlr-grammar] bootstrap complete
 succ [@osd/test] bootstrap complete
 info [@osd/apm-topology] running [osd:bootstrap] script
 info [@osd/interpreter] running [osd:bootstrap] script
 info [@osd/monaco] running [osd:bootstrap] script
 info [@osd/opensearch-archiver] running [osd:bootstrap] script
 succ [@osd/interpreter] bootstrap complete
 succ [@osd/opensearch-archiver] bootstrap complete
 succ [@osd/monaco] bootstrap complete
 succ [@osd/apm-topology] bootstrap complete
 info [@osd/ui-shared-deps] running [osd:bootstrap] script
 succ [@osd/ui-shared-deps] bootstrap complete
 info [@osd/optimizer] running [osd:bootstrap] script
^[[D succ [@osd/optimizer] bootstrap complete
 info [@osd/plugin-helpers] running [osd:bootstrap] script
 succ [@osd/plugin-helpers] bootstrap complete
 info [opensearch-dashboards] running [osd:bootstrap] script
ERROR [bootstrap] failed:
ERROR Error: Command failed with exit code 1: /home/runner/.local/share/mise/installs/yarn/1.22.19/bin/yarn.js run osd:bootstrap
      error Command failed with exit code 1.
      $ scripts/use_node scripts/build_ts_refs && scripts/use_node scripts/register_git_hook
      ERROR Error: Command failed with exit code 2: /home/runner/Documents/Wazuh/repos/wazuh-dashboard/node_modules/typescript/bin/tsc -b tsconfig.refs.json --pretty
            src/core/public/injected_metadata/injected_metadata_service.mock.ts:81:48 - error TS2345: Argument of type '{ enabled: true; checks_enabled: string; retries_delay: number; interval: number; server_not_ready_troubleshooting_link: string; }' is not assignable to parameter of type 'HealthCheckConfig'.
              Property 'max_retries' is missing in type '{ enabled: true; checks_enabled: string; retries_delay: number; interval: number; server_not_ready_troubleshooting_link: string; }' but required in type 'Omit<HealthCheckConfigDefinition, "interval" | "retries_delay">'.

             81   setupContract.getHealthCheck.mockReturnValue({
                                                               ~
             82     enabled: true,
                ~~~~~~~~~~~~~~~~~~
            ... 
             86     server_not_ready_troubleshooting_link: 'https://example.healthcheck-docs.com',
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             87   });
                ~~~

              src/core/common/healthcheck/types.ts:31:3
                31   max_retries: number;
                     ~~~~~~~~~~~
                'max_retries' is declared here.

            src/core/public/plugins/plugins_service.test.ts:127:7 - error TS2322: Type 'Pick<Mocked<InjectedMetadataSetup>, "getInjectedVar" | "getBranding">' is not assignable to type 'Mocked<{ getInjectedVar: (name: string, defaultValue?: any) => unknown; getBranding: () => Branding; getWazuhBuildInfo: () => WazuhBuildInfo; }>'.
              Property 'getWazuhBuildInfo' is missing in type 'Pick<Mocked<InjectedMetadataSetup>, "getInjectedVar" | "getBranding">' but required in type '{ getInjectedVar: MockInstance<unknown, [name: string, defaultValue?: any]>; getBranding: MockInstance<Branding, []>; getWazuhBuildInfo: MockInstance<WazuhBuildInfo, []>; }'.

            127       injectedMetadata: pick(mockSetupDeps.injectedMetadata, 'getInjectedVar', 'getBranding'),
                      ~~~~~~~~~~~~~~~~

              src/core/public/index.ts:294:5
                294     getWazuhBuildInfo: () => WazuhBuildInfo;
                        ~~~~~~~~~~~~~~~~~
                'getWazuhBuildInfo' is declared here.
              src/core/public/index.ts:290:3
                290   injectedMetadata: {
                      ~~~~~~~~~~~~~~~~
                The expected type comes from property 'injectedMetadata' which is declared here on type 'DeeplyMocked<CoreSetup<object, unknown>>'

            src/core/public/plugins/plugins_service.test.ts:151:7 - error TS2322: Type 'Pick<Mocked<InjectedMetadataSetup>, "getInjectedVar" | "getBranding">' is not assignable to type 'Mocked<{ getInjectedVar: (name: string, defaultValue?: any) => unknown; getBranding: () => Branding; getWazuhBuildInfo: () => WazuhBuildInfo; }>'.
              Property 'getWazuhBuildInfo' is missing in type 'Pick<Mocked<InjectedMetadataSetup>, "getInjectedVar" | "getBranding">' but required in type '{ getInjectedVar: MockInstance<unknown, [name: string, defaultValue?: any]>; getBranding: MockInstance<Branding, []>; getWazuhBuildInfo: MockInstance<WazuhBuildInfo, []>; }'.

            151       injectedMetadata: pick(mockStartDeps.injectedMetadata, 'getInjectedVar', 'getBranding'),
                      ~~~~~~~~~~~~~~~~

              src/core/public/index.ts:363:5
                363     getWazuhBuildInfo: () => WazuhBuildInfo;
                        ~~~~~~~~~~~~~~~~~
                'getWazuhBuildInfo' is declared here.
              src/core/public/index.ts:359:3
                359   injectedMetadata: {
                      ~~~~~~~~~~~~~~~~
                The expected type comes from property 'injectedMetadata' which is declared here on type 'DeeplyMocked<CoreStart>'


            Found 3 errors.

                at makeError (/home/runner/Documents/Wazuh/repos/wazuh-dashboard/node_modules/execa/lib/error.js:59:11)
                at handlePromise (/home/runner/Documents/Wazuh/repos/wazuh-dashboard/node_modules/execa/index.js:114:26)
                at processTicksAndRejections (node:internal/process/task_queues:105:5)
                at buildRefs (/home/runner/Documents/Wazuh/repos/wazuh-dashboard/src/dev/typescript/build_refs.ts:41:5)
                at buildAllRefs (/home/runner/Documents/Wazuh/repos/wazuh-dashboard/src/dev/typescript/build_refs.ts:35:3)
                at description (/home/runner/Documents/Wazuh/repos/wazuh-dashboard/src/dev/typescript/build_refs.ts:51:7)
                at /home/runner/Documents/Wazuh/repos/wazuh-dashboard/packages/osd-dev-utils/target/run/run.js:64:13
                at withProcRunner (/home/runner/Documents/Wazuh/repos/wazuh-dashboard/packages/osd-dev-utils/target/proc_runner/with_proc_runner.js:45:9)
                at run (/home/runner/Documents/Wazuh/repos/wazuh-dashboard/packages/osd-dev-utils/target/run/run.js:63:9)
      info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
          at makeError (/home/runner/Documents/Wazuh/repos/wazuh-dashboard/packages/osd-pm/dist/index.js:27527:11)
          at handlePromise (/home/runner/Documents/Wazuh/repos/wazuh-dashboard/packages/osd-pm/dist/index.js:26461:26)
          at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
          at async /home/runner/Documents/Wazuh/repos/wazuh-dashboard/packages/osd-pm/dist/index.js:9283:11
          at async scheduleItem (/home/runner/Documents/Wazuh/repos/wazuh-dashboard/packages/osd-pm/dist/index.js:11336:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

This commit replaces the hardcoded health check configuration in the injected metadata service mock with a reference to the centralized healthCheckConfig. Additionally, it updates the PluginsService tests to include the new 'getWazuhBuildInfo' method in the injected metadata mock, ensuring consistency across the application.

@Ripdiegozz Ripdiegozz left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tests

  1. Endpoints summary > Deploy new agent > Linux > RPM amd64
Image
  1. Change wazuh.stage in wazuh-dashboard/VERSION.json and restart OSD
Image Image

🟡 CR: There are plenty of lint errors, please solve them.

@yenienserrano

Copy link
Copy Markdown
Member

Test 🟢

image image image image image image image image

yenienserrano
yenienserrano previously approved these changes Jun 3, 2026

@yenienserrano yenienserrano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🟢

@Desvelao
Desvelao requested a review from Ripdiegozz June 4, 2026 07:42
Ripdiegozz
Ripdiegozz previously approved these changes Jun 4, 2026
@Desvelao

Desvelao commented Jun 5, 2026

Copy link
Copy Markdown
Member

🟢 Test

Production package
root@ubuntu-2404:/home/vagrant# grep isProduction /usr/share/wazuh-dashboard/package.json 
    "isProduction": true
root@ubuntu-2404:/home/vagrant# cat /usr/share/wazuh-dashboard/VERSION.json
{
  "version": "5.0.0",
  "stage": "beta2",
  "commit": "0824ac1f-164b323-8ed8b43-9ac0be4-9f2508d-6c395bd-1e4a186"
}
image image image image image image image
Staged package
root@ubuntu-2404:/home/vagrant# grep isProduction /usr/share/wazuh-dashboard/package.json
    "isProduction": false
root@ubuntu-2404:/home/vagrant# cat /usr/share/wazuh-dashboard/VERSION.json
{
  "version": "5.0.0",
  "stage": "beta2",
  "commit": "0824ac1f-164b323-8ed8b43-9ac0be4-9f2508d-6c395bd-1e4a186"
}
image image image image image image image

Desvelao
Desvelao previously approved these changes Jun 5, 2026

@yenienserrano yenienserrano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🟢

@yenienserrano
yenienserrano merged commit 903ba6b into main Jun 5, 2026
31 of 64 checks passed
@yenienserrano
yenienserrano deleted the enhancement/8550-enhance-the-download-and-install-the-agent-command branch June 5, 2026 18:36
yenienserrano pushed a commit that referenced this pull request Jun 17, 2026
…z dashboard (#1327)

* Enhance Wazuh integration by adding version, revision, and stage metadata. Update related interfaces and mocks to support new properties across the application.

* Add production flag handling in VERSION.json and update related interfaces

This commit introduces a new step in the build workflow to set the production flag in VERSION.json based on the deployment stage. Additionally, it updates various interfaces and mocks across the application to include the new  property, ensuring consistent handling of this metadata throughout the codebase.

* Refactor Wazuh build metadata handling and update related interfaces

This commit removes the production flag handling from the build workflow and integrates it directly into the package.json during the build process. It also introduces a new WazuhBuildInfo interface to encapsulate version, revision, stage, and production status, updating various components and mocks across the application to utilize this new structure for consistent metadata management.

* Update health check mock and enhance injected metadata in tests

This commit replaces the hardcoded health check configuration in the injected metadata service mock with a reference to the centralized healthCheckConfig. Additionally, it updates the PluginsService tests to include the new 'getWazuhBuildInfo' method in the injected metadata mock, ensuring consistency across the application.

* fix prettier

* tmp change on workflow

* restore file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance the download and install the agent command

4 participants