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

[FEAT] - Updates and Refactoring for Node 20 #34

Closed
12 of 14 tasks
dgrebb opened this issue Oct 20, 2023 · 12 comments
Closed
12 of 14 tasks

[FEAT] - Updates and Refactoring for Node 20 #34

dgrebb opened this issue Oct 20, 2023 · 12 comments
Assignees
Labels
dependencies enhancement New feature or request

Comments

@dgrebb
Copy link
Owner

dgrebb commented Oct 20, 2023

Requirements

The project should be installed and run with Node 20. As gaps are identified, create issues for larger lifts, or add tasks below to upgrade specific dependencies one at a time.

Tasks

Compatibility Tests

  • test Node 14
  • test Node 16
  • test Node 18
@dgrebb dgrebb added the enhancement New feature or request label Oct 20, 2023
@dgrebb dgrebb added this to the Node Support (>=18.0.0) milestone Oct 20, 2023
@dgrebb dgrebb self-assigned this Oct 20, 2023
@garris
Copy link
Collaborator

garris commented Oct 20, 2023

2 things I'd add...

  • P0 – validate sanity-test-docker
  • as a P1 – validate that basic tests pass in the ember-backstop project as well. There is some risk that changes to remote could cause a regression there.

@dgrebb
Copy link
Owner Author

dgrebb commented Oct 24, 2023

@garris FYA — BackstopJS master works on Node 20 out of the box :)

I'll keep this open as the main issue for all dependency updates pending what we decide in #39.

@dgrebb
Copy link
Owner Author

dgrebb commented Oct 27, 2023

@garris great progress! Please see below failing functional (manual), unit, and integration tests.

Here's a comparison between the feature branch and upstream master

Functional Tests Performed

  • npm run init
  • npm run reference
  • npm run test
  • npm run remote
  • npm run stop
  • npm run approve
  • npm run openReport
  • npm run report
  • npm run unit-test - fails — details below in "Unit Tests Performed"
  • npm run build-compare - fails — to be addressed with [BUG] - Update Compare application, dependencies, and webpack configuration #38
  • npm run dev-compare - fails — to be addressed with [BUG] - Update Compare application, dependencies, and webpack configuration #38
  • npm run genConfig - fails — should this be makeConfig, and exposed in runner.js?
  • npm run echo - fails (should this be exposed in runner.js?)
  • npm run integration-test - fails — genConfig is not exposed publicly
  • npm run sanity-test
  • npm run smoke-test - succeeds? mismatch errors found; report opens in browser
  • npm run smoke-test-docker - succeeds? mismatch errors found; report opens in
  • npm run smoke-test-playwright-docker - succeeds? mismatch errors found; report opens in browser
  • npm run sanity-test-palywright - succeeds? mismatch errors found; report opens in browser
  • npm run kill-zombies
  • npm run copy-report-bundle
  • build-and-copy-report-bundle - fails — to be addressed with [BUG] - Update Compare application, dependencies, and webpack configuration #38
  • publish-npm
  • npm run build-docker
  • npm run docker-load
  • publish-docker
  • build-and-publish
  • npm run init-docker-builder

Unit Tests Performed

All passing, except compare_spec.js — where are img1.png and img2.png?

  compare
    - should resolve if compare-hashes succeed
    - should resolve if compare-hashes fail, but compare-resemble succeeds
    - should reject if compare-hashes and compare-resemble fail

Docker Validations Performed

Note: a npm run docker-load script was added to load local buildx multi-platform image without publishing

  • cd test/configs/ && node ../../cli/index.js test --docker
  • npm run sanity-test-docker
  • npm run smoke-test-docker - exits without indication of passing smoke tests; report opens in browser. expected?
  • npm run sanity-test-playwright-docker

@garris
Copy link
Collaborator

garris commented Oct 27, 2023

@dgrebb Great! Did you want to book a time to review the different fail cases? Or are you still running these down?

@dgrebb
Copy link
Owner Author

dgrebb commented Oct 27, 2023

@garris sounds good. I'm digging into Ember next. After that, we can review everything in one go. I'll reach out to coordinate a time when everything is ready. Thank you!

@dgrebb
Copy link
Owner Author

dgrebb commented Nov 4, 2023

@garris Ember.js checks out! This is all running with Node 20. Here are:

EmberJS Test Dashboard

In Ember's test runner dashboard, before and after accepting the first backstop run, the report image displays, then disappears. Is this expected?

2023-11-04 12 38 18

Backstop Remote running via ember backstop-remote

image

@garris
Copy link
Collaborator

garris commented Nov 5, 2023

Wow Amazing work!! This is ridiculous -- there will be a lot of backstop users who are super thankful for this!

@garris
Copy link
Collaborator

garris commented Nov 5, 2023

And yeah -- I'm not sure about the QuickStart tests disappearing behavior -- but I am not that concerned about it as long as the tests give consistent results.

@dgrebb
Copy link
Owner Author

dgrebb commented Nov 5, 2023

I'll get a list of items for review and get back to you with some times this week. Thank you!

@dgrebb
Copy link
Owner Author

dgrebb commented Nov 7, 2023

Node Testing

@garris one more update, regarding Node version testing:

Node 18

Works!

Node 16

Works!

Node 14

It appears later versions of puppeteer do not play nice with node@14. Node 14 also requires a downgrade to python <=3.10.x, so maybe it's time to drop support?

added 1022 packages from 768 contributors and audited 1024 packages in 23.222s

209 packages are looking for funding
  run `npm fund` for details

found 4 vulnerabilities (1 low, 2 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
❯ npm run sanity-test

> [email protected] sanity-test ~/Projects/BackstopJS
> cd test/configs/ && node ../../cli/index.js test

~/Projects/BackstopJS/node_modules/puppeteer-core/lib/cjs/puppeteer/util/disposable.js:19
Symbol.dispose ??= Symbol('dispose');
               ^^^

SyntaxError: Unexpected token '??='
    at wrapSafe (internal/modules/cjs/loader.js:1029:16)
    at Module._compile (internal/modules/cjs/loader.js:1078:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
    at Module.load (internal/modules/cjs/loader.js:979:32)
    at Function.Module._load (internal/modules/cjs/loader.js:819:12)
    at Module.require (internal/modules/cjs/loader.js:1003:19)
    at require (internal/modules/cjs/helpers.js:107:18)
    at Object.<anonymous> (~/Projects/BackstopJS/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js:23:25)
    at Module._compile (internal/modules/cjs/loader.js:1114:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] sanity-test: `cd test/configs/ && node ../../cli/index.js test`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] sanity-test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     ~/.npm/_logs/2023-11-07T02_17_49_762Z-debug.log
❯ node -v
v14.21.3

@garris
Copy link
Collaborator

garris commented Nov 7, 2023

Agree, let's drop support for 14. Let's please add at the top of the docs requirements section.

dgrebb added a commit that referenced this issue Nov 22, 2023
dgrebb added a commit that referenced this issue Nov 22, 2023
this loads the custom docker image, built with buildx, into local system container namespace. necessary when updating dockerfile without the option to publish to docker registry.
dgrebb added a commit that referenced this issue Nov 22, 2023
`genConfig` is now `makeConfig` and is ultimately used in `backstop init`. There is no need to test this separately, as it's part of the
overall flow of `init`, which is now used in npm's `integration-test` script, and passing.
dgrebb added a commit that referenced this issue Nov 22, 2023
this loads the custom docker image, built with buildx, into local system container namespace. necessary when updating dockerfile without the option to publish to docker registry.
dgrebb added a commit that referenced this issue Nov 22, 2023
`genConfig` is now `makeConfig` and is ultimately used in `backstop init`. There is no need to test this separately, as it's part of the
overall flow of `init`, which is now used in npm's `integration-test` script, and passing.
dgrebb added a commit that referenced this issue Nov 26, 2023
`genConfig` is now `makeConfig` and is ultimately used in `backstop init`. There is no need to test this separately, as it's part of the
overall flow of `init`, which is now used in npm's `integration-test` script, and passing.
dgrebb added a commit that referenced this issue Nov 26, 2023
`genConfig` is now `makeConfig` and is ultimately used in `backstop init`. There is no need to test this separately, as it's part of the
overall flow of `init`, which is now used in npm's `integration-test` script, and passing.
dgrebb added a commit that referenced this issue Nov 27, 2023
`genConfig` is now `makeConfig` and is ultimately used in `backstop init`. There is no need to test this separately, as it's part of the
overall flow of `init`, which is now used in npm's `integration-test` script, and passing.
dgrebb added a commit that referenced this issue Nov 27, 2023
`genConfig` is now `makeConfig` and is ultimately used in `backstop init`. There is no need to test this separately, as it's part of the
overall flow of `init`, which is now used in npm's `integration-test` script, and passing.
dgrebb added a commit that referenced this issue Nov 27, 2023
`genConfig` is now `makeConfig` and is ultimately used in `backstop init`. There is no need to test this separately, as it's part of the
overall flow of `init`, which is now used in npm's `integration-test` script, and passing.
dgrebb added a commit that referenced this issue Nov 27, 2023
`genConfig` is now `makeConfig` and is ultimately used in `backstop init`. There is no need to test this separately, as it's part of the
overall flow of `init`, which is now used in npm's `integration-test` script, and passing.
dgrebb added a commit that referenced this issue Dec 15, 2023
…, and general bugfixes and enhancements for developer experience. (garris#1523)

* style(remote): adjusts spacing/quotes for eslint rules (#34)

* feat(backstopjs): updates dev/dependencies to latest possible versions (#34)

* build(backstopjs): adds engines, type (commonjs), and bump package.json version (#34)

* build: adds 'docker-load' script for local testing (#34)

this loads the custom docker image, built with buildx, into local system container namespace. necessary when updating dockerfile without the option to publish to docker registry.

* fix: removes obsolete `genConfig` npm script (#34)

`genConfig` is now `makeConfig` and is ultimately used in `backstop init`. There is no need to test this separately, as it's part of the
overall flow of `init`, which is now used in npm's `integration-test` script, and passing.

* fix: removes obsolete 'echo' npm script

This was originally part of the `gulp` workflow, back in the `slimer` and `casper` days. https://github.com/garris/BackstopJS/blob/b00ab5bf358fcb3b77724ac4ef10b30e86b5188d/core/command/echo.js

* test: adds success, caution, and failure messaging to unit, integration, smoke, and sanity tests

This provides a final outcome message for all npm scripts for internal project testing. With tests that `exit 1`, a caution message is used, as opposed to a full-blown "FAIL".

* build: specifies npm@>=8 in package engines

also renames "docker-load" script "load-docker" to align with other script naming conventions

* build: updates and refactors README.md

* build(docker): updates Dockerfile with node:20-bullseye

* test: adds playwright smoke tests

* test: echo fail message if smoke tests succeed

* feat(docker): includes playwright and deps installation in Dockerfile

* test(backstop): updates caution message with advice to check logs
@dgrebb dgrebb closed this as completed Dec 15, 2023
@dgrebb dgrebb reopened this Dec 15, 2023
@dgrebb
Copy link
Owner Author

dgrebb commented Dec 15, 2023

garris#1523

@dgrebb dgrebb closed this as completed Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants