website icon indicating copy to clipboard operation
website copied to clipboard

Fixes #1211: Build JS with Hugo instead of Webpack

Open baltpeter opened this issue 2 months ago • 3 comments

This should be squashed when merging.

baltpeter avatar Oct 25 '25 16:10 baltpeter

datenanfragen/website    Run #8425

Run Properties:  status check failed Failed #8425  •  git commit 95253875bb: Webpack be gone \o/
Project datenanfragen/website
Branch Review b_hugo-esbuild
Run status status check failed Failed #8425
Run duration 18m 02s
Commit git commit 95253875bb: Webpack be gone \o/
Committer Benjamin Altpeter
View all properties for this run ↗︎

Test results
Tests that failed  Failures 16
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 8
Tests that did not run due to a failure in a mocha hook  Skipped 1
Tests that passed  Passing 63
View all changes introduced in this branch ↗︎

Tests for review

Failed  company-database/search.spec.js • 1 failed test

View Output Video

Test Artifacts
Search for company by slug and visit company detail page > Search for and visit 1&1 single page Screenshots Video
Failed  components/advanced-generator.spec.js • 3 failed tests

View Output Video

Test Artifacts
Advanced generator > reflects 'Get data in a machine-readable format' checkbox in the generated request [true] Screenshots Video
Advanced generator > reflects the 'Information block' values in the generated request Screenshots Video
Advanced generator > changes the text based on the 'Erase all data' checkbox and the 'Data to erase' field when 'Erasure request' is selected Screenshots Video
Failed  components/generator.spec.js • 2 failed tests

View Output Video

Test Artifacts
Request generator tool component > respects request tracking status Screenshots Video
Request generator tool component > can toggle request tracking status Screenshots Video
Failed  components/mailto-dropdown.spec.js • 1 failed test

View Output Video

Test Artifacts
MailtoDropdown > Copying the email elements manually Screenshots Video
Failed  components/proceedings.spec.js • 1 failed test

View Output Video

Test Artifacts
Proceedings page > assigns correct state Screenshots Video

The first 5 failed specs are shown, see all 11 specs in Cypress Cloud.

cypress[bot] avatar Oct 25 '25 16:10 cypress[bot]

Alright. As far as I can tell, this is now ready for review. A couple of things to note:

  • This should be reviewed very carefully. There is obviously quite a lot of potential for breakage. In addition to that, we also need to be on the look-out for non-obvious gotchas like https://github.com/datenanfragen/website/blob/b_hugo-esbuild/layouts/partials/scripts.html#L10-L11. I would appreciate a review from both of you, @zner0L and @mal-tee.

  • As we discussed in https://github.com/datenanfragen/website/issues/1211#issuecomment-3460951828, I have been ignoring CI failures because of interdependencies between this PR and #1205, where neither can really move forward without the other. The random build failures I've been seeing (both locally and in CI) seem like a Hugo bug (locally, I've been using the latest Hugo version today and not seen it happen anymore so far), but because of our ancient Node version and which Docker images are available for it, we cannot upgrade Hugo yet.

    As such, I propose that we merge this PR into the webpack-node-staging branch for the time being. Then @davenewham can rebase #1205 onto that, which should hopefully simplify that PR greatly. We'd then also merge #1205 into webpack-node-staging. And finally, I would work on webpack-node-staging and fix the final remaining issues and create a PR to merge that into master.

  • Given the previous point, I also haven't fixed all Cypress errors yet. There are a handful when I run the tests locally, but at a glance these all seem like Cypress flake to me. Thus, I don't think it makes sense to work on them before we've updated everything.

baltpeter avatar Nov 03 '25 14:11 baltpeter

We can also bump cypress after the node bump, which will introduce some QoL features iirc :D

mal-tee avatar Nov 03 '25 15:11 mal-tee

@zner0L Your turn :)

mal-tee avatar Dec 22 '25 14:12 mal-tee