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 condition to determine if the date field's value is an array #299

Merged
merged 9 commits into from
Feb 20, 2024

Conversation

rupal-bq
Copy link
Contributor

@rupal-bq rupal-bq commented Feb 18, 2024

Description

  • Fix condition to determine if the date field's value is an array
  • Add loose flag to OSD bootstrap to fix
ERROR [single_version_dependencies] Multiple version ranges for the same dependency
      were found declared across different package.json files. Please consolidate
      those to match across all package.json files. Different versions for the
      same dependency is not supported.

      If you have questions about this please reach out to the operations team.

      The conflicting dependencies are:

        cypress
          9.5.4 => opensearch-dashboards
          ^13.6.0 => reports-dashboards
error Command failed with exit code 1.

Issues Resolved

opensearch-project/reporting#932
#257

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Feb 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (58d52f7) 74.47% compared to head (b026112) 74.47%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #299   +/-   ##
=======================================
  Coverage   74.47%   74.47%           
=======================================
  Files          30       30           
  Lines        1904     1904           
  Branches      410      410           
=======================================
  Hits         1418     1418           
  Misses        483      483           
  Partials        3        3           
Flag Coverage Δ
dashboards-report 74.47% <ø> (ø)

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.

Signed-off-by: Rupal Mahajan <[email protected]>
Signed-off-by: Rupal Mahajan <[email protected]>
This reverts commit 0db4d73.

Signed-off-by: Rupal Mahajan <[email protected]>
Signed-off-by: Rupal Mahajan <[email protected]>
Signed-off-by: Rupal Mahajan <[email protected]>
Signed-off-by: Rupal Mahajan <[email protected]>
Copy link
Contributor

@RyanL1997 RyanL1997 left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together @rupal-bq! I just left some minor reviews

@@ -150,7 +150,7 @@ jobs:

- name: Run Cypress tests
run: |
yarn cypress:run --browser chrome --headless --spec '.cypress/integration/*'
yarn cypress:run --browser chrome --headless
Copy link
Contributor

Choose a reason for hiding this comment

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

Oops good catch on this, seems like we don't need to specify the spec for this directory setup. Thanks!

@@ -27,7 +27,7 @@ another JDK installation, e.g. `RUNTIME_JAVA_HOME=/usr/lib/jvm/jdk-8`.
cd plugins
git clone https://github.com/opensearch-project/dashboards-reporting.git
```
1. Run `yarn osd bootstrap` inside `OpenSearch-Dashboards/plugins/dashboards-reporting`.
1. Run `yarn osd bootstrap --single-version=loose` inside `OpenSearch-Dashboards/plugins/dashboards-reporting`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

fieldDateValue.length !== 0 &&
fieldDateValue instanceof Array
dateValue.length !== 0 &&
dateValue instanceof Array
) {
fieldDateValue.forEach((element, index) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just for my knowledge, why whats the difference between fieldDateValue and dateValue above. Cuz I saw the change was trying to switch to dateValue .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Originally the variable was dateValue for this condition but was mistakenly changed in different PR which caused TypeError: Cannot create property '0' on number '1700813322772'. Reverting to fix the issue.

@rupal-bq rupal-bq merged commit 2d39d24 into opensearch-project:main Feb 20, 2024
11 of 12 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 20, 2024
* Change cypress version

Signed-off-by: Rupal Mahajan <[email protected]>

* Fix condition to check if date field

Signed-off-by: Rupal Mahajan <[email protected]>

* Fix cypress test

Signed-off-by: Rupal Mahajan <[email protected]>

* update cypress e2e workflow

Signed-off-by: Rupal Mahajan <[email protected]>

* Revert "update cypress e2e workflow"

This reverts commit 0db4d73.

Signed-off-by: Rupal Mahajan <[email protected]>

* Fix cypress error

Signed-off-by: Rupal Mahajan <[email protected]>

* Try cypress CI without --spec

Signed-off-by: Rupal Mahajan <[email protected]>

* Revert cypress to v13.6.0

Signed-off-by: Rupal Mahajan <[email protected]>

---------

Signed-off-by: Rupal Mahajan <[email protected]>
(cherry picked from commit 2d39d24)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
rupal-bq pushed a commit that referenced this pull request Feb 20, 2024
… (#305)

* Change cypress version



* Fix condition to check if date field



* Fix cypress test



* update cypress e2e workflow



* Revert "update cypress e2e workflow"

This reverts commit 0db4d73.



* Fix cypress error



* Try cypress CI without --spec



* Revert cypress to v13.6.0



---------


(cherry picked from commit 2d39d24)

Signed-off-by: Rupal Mahajan <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@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.

4 participants