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

2 UTs are failing due to raw-loader dependency #832

Closed
jackiehanyang opened this issue Aug 7, 2024 · 1 comment
Closed

2 UTs are failing due to raw-loader dependency #832

jackiehanyang opened this issue Aug 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jackiehanyang
Copy link
Collaborator

The following UTs starting failing after 7/29.

Checked and confirmed the following things:

Tests failed due to unrelated issue:

Summary of all failing tests
FAIL public/components/FeatureAnywhereContextMenu/AssociatedDetectors/containers/__tests__/AssociatedDetectors.test.tsx
  ● Test suite failed to run

    Cannot find module '!!raw-loader!../../target/public/xjson.editor.worker.js' from '../../packages/osd-monaco/target/xjson/language.js'

    Require stack:
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/packages/osd-monaco/target/xjson/language.js
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/packages/osd-monaco/target/xjson/index.js
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/packages/osd-monaco/target/index.js
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/data/public/antlr/opensearch_sql/code_completion.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/data/public/plugin.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/data/public/index.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/saved_objects/public/saved_object/helpers/serialize_saved_object.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/saved_objects/public/saved_object/helpers/build_saved_object.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/saved_objects/public/saved_object/saved_object.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/saved_objects/public/saved_object/index.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/saved_objects/public/plugin.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/saved_objects/public/index.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/vis_augmenter/public/saved_augment_vis/saved_augment_vis.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/vis_augmenter/public/saved_augment_vis/index.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/vis_augmenter/public/plugin.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/vis_augmenter/public/index.ts
      public/components/FeatureAnywhereContextMenu/AssociatedDetectors/containers/AssociatedDetectors.tsx
      public/components/FeatureAnywhereContextMenu/AssociatedDetectors/containers/__tests__/AssociatedDetectors.test.tsx

      37 | import { registerWorker } from '../worker_store';
      38 | // @ts-ignore
    > 39 | import workerSrc from '!!raw-loader!../../target/public/xjson.editor.worker.js';
         | ^
      40 |
      41 | const wps = new WorkerProxyService();
      42 |

      at Resolver.resolveModule (../../node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.<anonymous> (../../packages/osd-monaco/src/xjson/language.ts:39:1)
      at Object.<anonymous> (../../packages/osd-monaco/src/xjson/index.ts:34:1)
      at Object.<anonymous> (../../packages/osd-monaco/src/index.ts:32:1)
      at Object.<anonymous> (../../src/plugins/data/public/antlr/opensearch_sql/code_completion.ts:6:1)
      at Object.<anonymous> (../../src/plugins/data/public/plugin.ts:96:1)
      at Object.<anonymous> (../../src/plugins/data/public/index.ts:500:1)
      at Object.<anonymous> (../../src/plugins/saved_objects/public/saved_object/helpers/serialize_saved_object.ts:34:1)
      at Object.<anonymous> (../../src/plugins/saved_objects/public/saved_object/helpers/build_saved_object.ts:34:1)
      at Object.<anonymous> (../../src/plugins/saved_objects/public/saved_object/saved_object.ts:42:1)

FAIL public/expressions/__tests__/overlay_anomalies.test.ts
  ● Test suite failed to run

    Cannot find module '!!raw-loader!../../target/public/xjson.editor.worker.js' from '../../packages/osd-monaco/target/xjson/language.js'

    Require stack:
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/packages/osd-monaco/target/xjson/language.js
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/packages/osd-monaco/target/xjson/index.js
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/packages/osd-monaco/target/index.js
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/data/public/antlr/opensearch_sql/code_completion.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/data/public/plugin.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/data/public/index.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/saved_objects/public/saved_object/helpers/serialize_saved_object.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/saved_objects/public/saved_object/helpers/build_saved_object.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/saved_objects/public/saved_object/saved_object.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/saved_objects/public/saved_object/index.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/saved_objects/public/plugin.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/saved_objects/public/index.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/vis_augmenter/public/saved_augment_vis/saved_augment_vis.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/vis_augmenter/public/saved_augment_vis/index.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/vis_augmenter/public/plugin.ts
      /Users/runner/work/anomaly-detection-dashboards-plugin/anomaly-detection-dashboards-plugin/OpenSearch-Dashboards/src/plugins/vis_augmenter/public/index.ts
      public/expressions/helpers.ts
      public/expressions/__tests__/overlay_anomalies.test.ts

      37 | import { registerWorker } from '../worker_store';
      38 | // @ts-ignore
    > 39 | import workerSrc from '!!raw-loader!../../target/public/xjson.editor.worker.js';
         | ^
      40 |
      41 | const wps = new WorkerProxyService();
      42 |

      at Resolver.resolveModule (../../node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.<anonymous> (../../packages/osd-monaco/src/xjson/language.ts:39:1)
      at Object.<anonymous> (../../packages/osd-monaco/src/xjson/index.ts:34:1)
      at Object.<anonymous> (../../packages/osd-monaco/src/index.ts:32:1)
      at Object.<anonymous> (../../src/plugins/data/public/antlr/opensearch_sql/code_completion.ts:6:1)
      at Object.<anonymous> (../../src/plugins/data/public/plugin.ts:96:1)
      at Object.<anonymous> (../../src/plugins/data/public/index.ts:500:1)
      at Object.<anonymous> (../../src/plugins/saved_objects/public/saved_object/helpers/serialize_saved_object.ts:34:1)
      at Object.<anonymous> (../../src/plugins/saved_objects/public/saved_object/helpers/build_saved_object.ts:34:1)
      at Object.<anonymous> (../../src/plugins/saved_objects/public/saved_object/saved_object.ts:42:1)


Test Suites: 2 failed, 1 skipped, 77 passed, 79 of 80 total
Tests:       2 skipped, 371 passed, 373 total
Snapshots:   71 passed, 71 total
Time:        139.013 s
@kaituo
Copy link
Collaborator

kaituo commented Aug 7, 2024

created an issue in Dashboards since the changes there broke our tests: opensearch-project/OpenSearch-Dashboards#7648

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants