Skip to content

upgrade jspdf to 4.0#678

Merged
ps48 merged 5 commits intoopensearch-project:mainfrom
ps48:jspdf-4.0
Jan 23, 2026
Merged

upgrade jspdf to 4.0#678
ps48 merged 5 commits intoopensearch-project:mainfrom
ps48:jspdf-4.0

Conversation

@ps48
Copy link
Copy Markdown
Member

@ps48 ps48 commented Jan 23, 2026

Summary

Upgrade the jspdf dependency from version 3.0.4 to 4.0.0 in the dashboards-reporting plugin.

Breaking Changes Analysis

jspdf 4.0.0 introduces one breaking change:

  • Node.js file system access: File system access is now restricted by default in Node.js environments.

This change does not affect the dashboards-reporting plugin because:

  • jspdf is used in public/components/visual_report/generate_report.ts (browser context)
  • The browser usage only calls: new jsPDF(), setFillColor(), rect(), addImage(), and save()
  • These APIs remain unchanged in 4.0.0

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.

Signed-off-by: ps48 <pshenoy36@gmail.com>
Signed-off-by: ps48 <pshenoy36@gmail.com>
OPENSEARCH_DASHBOARDS_VERSION: 'main'
OPENSEARCH_VERSION: '3.0.0-beta1'
OPENSEARCH_PLUGIN_VERSION: '3.0.0.0-beta1'
OPENSEARCH_VERSION: '3.5.0'
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.

FYI I believe we can get rid of these and get the value from this repo instead (either via package.json or opensearch_dashboards.json)

I'm trying to fix cypress, ftr and verify-binary-installation on cwperks#1

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yes, let me fix that!

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.

Main problem now is changing the steps to downloading the snapshots of the plugins. https://aws.oss.sonatype.org has been decommissioned and was replaced with https://ci.opensearch.org/ci/dbc/snapshots/maven/org/opensearch/plugin/opensearch-job-scheduler/3.5.0.0-SNAPSHOT/


on: [push, pull_request]
env:
OPENSEARCH_VERSION: '3.0.0-beta1'
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.

FYI to fix this check simply requires changing uses: derek-ho/start-opensearch@v2 to uses: derek-ho/start-opensearch@v9

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

updated thanks!

Signed-off-by: ps48 <pshenoy36@gmail.com>
ps48 added 2 commits January 23, 2026 14:19
Signed-off-by: ps48 <pshenoy36@gmail.com>
Signed-off-by: ps48 <pshenoy36@gmail.com>
@ps48
Copy link
Copy Markdown
Member Author

ps48 commented Jan 23, 2026

⎿ yarn run v1.22.22
    $ ../../node_modules/cypress/bin/cypress run --browser chrome --headless --spec
    .cypress/integration/01-create.spec.ts

    DevTools listening on ws://127.0.0.1:57918/devtools/browser/24812b66-9749-4ac9-9f54-a97ec1df3568

    Opening `/dev/tty` failed (6): Device not configured
    ================================================================================

      (Run Starting)

      ┌──────────────────────────────────────────────────────────────────────────────────────────────
    ──┐
      │ Cypress:        13.17.0
      │
      │ Browser:        Chrome 144 (headless)
      │
      │ Node Version:   v22.22.0 (/Users/sgguruda/.nvm/versions/node/v22.22.0/bin/node)
      │
      │ Specs:          1 found (01-create.spec.ts)
      │
      │ Searched:       .cypress/integration/01-create.spec.ts
      │
      └──────────────────────────────────────────────────────────────────────────────────────────────
    ──┘


    ─────────────────────────────────────────────────────────────────────────────────────────────────
    ───


      Running:  01-create.spec.ts                                                               (1 of
     1)
    Browserslist: caniuse-lite is outdated. Please run:
      npx update-browserslist-db@latest
      Why you should do it regularly: https://github.com/browserslist/update-db#readme


      Adding sample data
        ✓ Adds sample data (16211ms)

      Cypress
        ✓ Visits Reporting homepage (2090ms)
        ✓ Visit Create page (7045ms)
        ✓ Create a new on-demand dashboard report definition (8119ms)
        ✓ Create a new on-demand visualization report definition (8054ms)
        ✓ Create a new on-demand saved search report definition (8151ms)
        ✓ Create a new dashboard daily recurring report definition (8273ms)
        ✓ Create a new visualization daily recurring report definition (8159ms)
        ✓ Create a new saved search daily recurring report definition (7720ms)
        ✓ Create a new dashboard interval recurring report definition (8525ms)
        ✓ Create a new visualization interval recurring report definition (7439ms)
        ✓ Create a new saved search interval recurring report definition (9585ms)
        ✓ Create a dashboard cron-based report definition (8061ms)
        ✓ Create a visualization cron-based report definition (7840ms)
        ✓ Create a saved search cron-based report definition (7963ms)


      15 passing (2m)


      (Results)

      ┌──────────────────────────────────────────────────────────────────────────────────────────────
    ──┐
      │ Tests:        15
      │
      │ Passing:      15
      │
      │ Failing:      0
      │
      │ Pending:      0
      │
      │ Skipped:      0
      │
      │ Screenshots:  0
      │
      │ Video:        true
      │
      │ Duration:     2 minutes, 3 seconds
      │
      │ Spec Ran:     01-create.spec.ts
      │
      └──────────────────────────────────────────────────────────────────────────────────────────────
    ──┘


      (Video)

      -  Video output: /Users/sgguruda/work/opensource/repos/reviews/re-review/OpenSearch-Dashboards/
    plugins/dashboards-reporting/.cypress/videos/01-create.spec.ts.mp4


    Opening `/dev/tty` failed (6): Device not configured
    ================================================================================

      (Run Finished)


           Spec                                              Tests  Passing  Failing  Pending
    Skipped
      ┌──────────────────────────────────────────────────────────────────────────────────────────────
    ──┐
      │ ✔  01-create.spec.ts                        02:03       15       15        -        -
     - │
      └──────────────────────────────────────────────────────────────────────────────────────────────
    ──┘
        ✔  All specs passed!                        02:03       15       15        -        -
     -

    Done in 132.66s.


⏺ Bash(yarn cypress:run --browser chrome --headless --spec ".cypress/integration/02-edit.spec.ts" 2>&1)
  ⎿ yarn run v1.22.22
    $ ../../node_modules/cypress/bin/cypress run --browser chrome --headless --spec
    .cypress/integration/02-edit.spec.ts

    DevTools listening on ws://127.0.0.1:58983/devtools/browser/898fba4b-5a54-45f7-ba0c-c72d07405dce

    Opening `/dev/tty` failed (6): Device not configured
    ================================================================================

      (Run Starting)

      ┌──────────────────────────────────────────────────────────────────────────────────────────────
    ──┐
      │ Cypress:        13.17.0
      │
      │ Browser:        Chrome 144 (headless)
      │
      │ Node Version:   v22.22.0 (/Users/sgguruda/.nvm/versions/node/v22.22.0/bin/node)
      │
      │ Specs:          1 found (02-edit.spec.ts)
      │
      │ Searched:       .cypress/integration/02-edit.spec.ts
      │
      └──────────────────────────────────────────────────────────────────────────────────────────────
    ──┘


    ─────────────────────────────────────────────────────────────────────────────────────────────────
    ───


      Running:  02-edit.spec.ts                                                                 (1 of
     1)
    Browserslist: caniuse-lite is outdated. Please run:
      npx update-browserslist-db@latest
      Why you should do it regularly: https://github.com/browserslist/update-db#readme


      Cypress
        ✓ Visit edit page, update name and description (27347ms)
        ✓ Visit edit page, change report trigger (26461ms)
        ✓ Visit edit page, change report trigger back (26420ms)


      3 passing (1m)


      (Results)

      ┌──────────────────────────────────────────────────────────────────────────────────────────────
    ──┐
      │ Tests:        3
      │
      │ Passing:      3
      │
      │ Failing:      0
      │
      │ Pending:      0
      │
      │ Skipped:      0
      │
      │ Screenshots:  0
      │
      │ Video:        true
      │
      │ Duration:     1 minute, 20 seconds
      │
      │ Spec Ran:     02-edit.spec.ts
      │
      └──────────────────────────────────────────────────────────────────────────────────────────────
    ──┘


      (Video)

      -  Video output: /Users/sgguruda/work/opensource/repos/reviews/re-review/OpenSearch-Dashboards/
    plugins/dashboards-reporting/.cypress/videos/02-edit.spec.ts.mp4


    Opening `/dev/tty` failed (6): Device not configured
    ================================================================================

      (Run Finished)


           Spec                                              Tests  Passing  Failing  Pending
    Skipped
      ┌──────────────────────────────────────────────────────────────────────────────────────────────
    ──┐
      │ ✔  02-edit.spec.ts                          01:20        3        3        -        -
     - │
      └──────────────────────────────────────────────────────────────────────────────────────────────
    ──┘
        ✔  All specs passed!                        01:20        3        3        -        -
     -

    Done in 88.34s.

















⏺ Bash(yarn cypress:run --browser chrome --headless --spec ".cypress/integration/03-details.spec.ts" 2>&1)
  ⎿ yarn run v1.22.22
    $ ../../node_modules/cypress/bin/cypress run --browser chrome --headless --spec
    .cypress/integration/03-details.spec.ts

    DevTools listening on ws://127.0.0.1:59670/devtools/browser/859fa72d-960a-47cb-bba8-90d04238adaf

    Opening `/dev/tty` failed (6): Device not configured
    ================================================================================

      (Run Starting)

      ┌──────────────────────────────────────────────────────────────────────────────────────────────
    ──┐
      │ Cypress:        13.17.0
      │
      │ Browser:        Chrome 144 (headless)
      │
      │ Node Version:   v22.22.0 (/Users/sgguruda/.nvm/versions/node/v22.22.0/bin/node)
      │
      │ Specs:          1 found (03-details.spec.ts)
      │
      │ Searched:       .cypress/integration/03-details.spec.ts
      │
      └──────────────────────────────────────────────────────────────────────────────────────────────
    ──┘


    ─────────────────────────────────────────────────────────────────────────────────────────────────
    ───


      Running:  03-details.spec.ts                                                              (1 of
     1)
    Browserslist: caniuse-lite is outdated. Please run:
      npx update-browserslist-db@latest
      Why you should do it regularly: https://github.com/browserslist/update-db#readme


      Cypress
        ✓ Visit report definition details page (5262ms)
        ✓ Go to edit report definition from report definition details (5295ms)
        ✓ Verify report source URL on report definition details (5207ms)
        ✓ Delete report definition from details page (7943ms)
        ✓ Visit report details page (5215ms)
        ✓ Verify report source URL on report details (5226ms)


      6 passing (34s)


      (Results)

      ┌──────────────────────────────────────────────────────────────────────────────────────────────
    ──┐
      │ Tests:        6
      │
      │ Passing:      6
      │
      │ Failing:      0
      │
      │ Pending:      0
      │
      │ Skipped:      0
      │
      │ Screenshots:  0
      │
      │ Video:        true
      │
      │ Duration:     34 seconds
      │
      │ Spec Ran:     03-details.spec.ts
      │
      └──────────────────────────────────────────────────────────────────────────────────────────────
    ──┘


      (Video)

      -  Video output: /Users/sgguruda/work/opensource/repos/reviews/re-review/OpenSearch-Dashboards/
    plugins/dashboards-reporting/.cypress/videos/03-details.spec.ts.mp4


    Opening `/dev/tty` failed (6): Device not configured
    ================================================================================

      (Run Finished)


           Spec                                              Tests  Passing  Failing  Pending
    Skipped
      ┌──────────────────────────────────────────────────────────────────────────────────────────────
    ──┐
      │ ✔  03-details.spec.ts                       00:34        6        6        -        -
     - │
      └──────────────────────────────────────────────────────────────────────────────────────────────
    ──┘
        ✔  All specs passed!                        00:34        6        6        -        -
     -

    Done in 42.19s.







@ps48 ps48 merged commit 44e67d8 into opensearch-project:main Jan 23, 2026
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants