Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dynamicConfigService mock import #7922

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

huyaboo
Copy link
Member

@huyaboo huyaboo commented Aug 29, 2024

Description

This PR separates mock files from index, which fixes the build artifact not bootstrapping

Issues Resolved

closes #7911

Testing the changes

Built artifact and it starts (opensearch was not started hence the ECONNREFUSED error)

05:57:45 opensearch-dashboards-3.0.0-SNAPSHOT-linux-x64 ±|mock-fix ✗|→ ./bin/opensearch-dashboards
  log   [17:57:52.601] [info][plugins-service] Plugin "applicationConfig" is disabled.
  log   [17:57:52.604] [info][plugins-service] Plugin "cspHandler" is disabled.
  log   [17:57:52.605] [info][plugins-service] Plugin "dataSource" is disabled.
  log   [17:57:52.605] [info][plugins-service] Plugin "visTypeXy" is disabled.
  log   [17:57:52.606] [info][plugins-service] Plugin "workspace" is disabled.
  log   [17:57:52.651] [info][dynamic-config-service] registering middleware to inject context to AsyncLocalStorage
[agentkeepalive:deprecated] options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead
  log   [17:57:52.696] [info][plugins-system] Setting up [40] plugins: [usageCollection,opensearchDashboardsUsageCollection,opensearchDashboardsLegacy,mapsLegacy,share,opensearchUiShared,legacyExport,embeddable,expressions,data,savedObjects,queryEnhancements,home,apmOss,dashboard,visualizations,visTypeVega,visTypeTimeline,visTypeTable,visTypeMarkdown,visBuilder,visAugmenter,tileMap,regionMap,inputControlVis,visualize,management,indexPatternManagement,dataSourceManagement,console,advancedSettings,dataExplorer,charts,visTypeVislib,visTypeTimeseries,visTypeTagcloud,visTypeMetric,discover,savedObjectsManagement,bfetch]
[agentkeepalive:deprecated] options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead
  log   [17:57:52.740] [info][plugins][queryEnhancements] queryEnhancements: Setup complete
[agentkeepalive:deprecated] options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead
  log   [17:57:52.901] [info][dynamic-config-service] initiating start()
  log   [17:57:52.902] [info][dynamic-config-service] finished start()
  log   [17:57:52.918] [info][savedobjects-service] Waiting until all OpenSearch nodes are compatible with OpenSearch Dashboards before starting saved objects migrations...
  log   [17:57:52.928] [error][data][opensearch] [ConnectionError]: connect ECONNREFUSED 127.0.0.1:9200
  log   [17:57:52.938] [error][savedobjects-service] Unable to retrieve version information from OpenSearch nodes.
  log   [17:57:55.428] [error][data][opensearch] [ConnectionError]: connect ECONNREFUSED 127.0.0.1:9200
  log   [17:57:57.929] [error][data][opensearch] [ConnectionError]: connect ECONNREFUSED 127.0.0.1:9200
  log   [17:58:00.430] [error][data][opensearch] [ConnectionError]: connect ECONNREFUSED 127.0.0.1:9200

Changelog

  • fix: Fix dynamicConfigService so that build artifact bootstraps

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link

codecov bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.31%. Comparing base (a0365d8) to head (48c1321).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7922      +/-   ##
==========================================
+ Coverage   64.30%   64.31%   +0.01%     
==========================================
  Files        3674     3674              
  Lines       81135    81135              
  Branches    12926    12926              
==========================================
+ Hits        52173    52182       +9     
+ Misses      25751    25742       -9     
  Partials     3211     3211              
Flag Coverage Δ
Linux_1 30.21% <14.28%> (ø)
Linux_2 56.22% <100.00%> (+0.03%) ⬆️
Linux_3 40.62% <14.28%> (ø)
Linux_4 31.40% <14.28%> (ø)
Windows_1 30.23% <14.28%> (ø)
Windows_2 56.17% <100.00%> (+0.03%) ⬆️
Windows_3 40.62% <14.28%> (ø)
Windows_4 31.40% <14.28%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

zhyuanqi
zhyuanqi previously approved these changes Aug 29, 2024
Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
@ruanyl ruanyl merged commit b370871 into opensearch-project:main Sep 2, 2024
66 of 67 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-7922-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b370871035314bc966b16c7de3c780bb3c3af9f7
# Push it to GitHub
git push --set-upstream origin backport/backport-7922-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-7922-to-2.x.

@ruanyl
Copy link
Member

ruanyl commented Sep 2, 2024

cc @huyaboo Backport failed

huyaboo added a commit to huyaboo/OpenSearch-Dashboards that referenced this pull request Sep 2, 2024
* Add dynamic config service to core

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add opensearch client implementation

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add descriptions for the DAO clients

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Refactor DynamicConfigService

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Refactor dynamic config service start

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

---------

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
(cherry picked from commit 8a96664)

Fix issue when bootstrapping on 2.x (opensearch-project#7901)

* Fix issue bootstrapping dynamic config service

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Changeset file for PR opensearch-project#7901 created/updated

---------

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 07504f6)

Fix mock import (opensearch-project#7922)

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
(cherry picked from commit b370871)
BionIT pushed a commit that referenced this pull request Sep 3, 2024
* Add dynamic config service to core

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add opensearch client implementation

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add descriptions for the DAO clients

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Refactor DynamicConfigService

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Refactor dynamic config service start

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

---------

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
(cherry picked from commit 8a96664)

Fix issue when bootstrapping on 2.x (#7901)

* Fix issue bootstrapping dynamic config service

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Changeset file for PR #7901 created/updated

---------

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 07504f6)

Fix mock import (#7922)

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
(cherry picked from commit b370871)

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
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.

[BUG] The latest artifact is not able to run.
5 participants