Automattic / simplenote-electron

Simplenote for Web, Windows, and Linux
https://app.simplenote.com
GNU General Public License v2.0
4.69k stars 553 forks source link

Move from CircleCI to Buildkite #3204

Closed mokagio closed 2 weeks ago

mokagio commented 1 month ago

What is says in the title. Please forgive the long commits list—This was quite the trial and error. I underestimated the challenge of understanding (part of) electron-builder and getting everything it needs to work in a new CI environment.

The latest build shows everything green https://buildkite.com/automattic/simplenote-electron/builds/89

And I used this branch to tag v2.22.0-beta6 and verify the GitHub release gets created.

Unfortunately, the diff is substantial. I left a few comments in there.

mokagio commented 1 month ago

@codebykat @roundhill any ideas why CI would be failing on make build with errors like on macOS?

[2024-05-30T03:50:44Z] ERROR in ../node_modules/hash-base/node_modules/readable-stream/lib/_stream_readable.js 43:13-37
  | [2024-05-30T03:50:44Z] Module not found: Error: Can't resolve 'buffer' in '/var/lib/buildkite-agent/builds/ci-default-i-0d5406330dcdf6afd-1/automattic/simplenote-electron/node_modules/hash-base/node_modules/readable-stream/lib'
  | [2024-05-30T03:50:44Z]
  | [2024-05-30T03:50:44Z] BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
  | [2024-05-30T03:50:44Z] This is no longer the case. Verify if you need this module and configure a polyfill for it.
  | [2024-05-30T03:50:44Z]
  | [2024-05-30T03:50:44Z] If you want to include a polyfill, you need to:
  | [2024-05-30T03:50:44Z]  - add a fallback 'resolve.fallback: { "buffer": require.resolve("buffer/") }'
  | [2024-05-30T03:50:44Z]  - install 'buffer'
  | [2024-05-30T03:50:44Z] If you don't want to include a polyfill, you can use an empty module like this:
  | [2024-05-30T03:50:44Z]  resolve.fallback: { "buffer": false }
  | [2024-05-30T03:50:44Z]  @ ../node_modules/hash-base/node_modules/readable-stream/readable-browser.js 1:10-63
  | [2024-05-30T03:50:44Z]  @ ../node_modules/hash-base/index.js 3:16-52
  | [2024-05-30T03:50:44Z]  @ ../node_modules/md5.js/index.js 3:15-35
  | [2024-05-30T03:50:44Z]  @ ./dialogs/share/index.tsx 4:0-25 40:21-24
  | [2024-05-30T03:50:44Z]  @ ./dialog-renderer/index.tsx 12:0-43 47:68-79
  | [2024-05-30T03:50:44Z]  @ ./app.tsx 10:0-47 159:303-317
  | [2024-05-30T03:50:44Z]  @ ./boot-with-auth.tsx 5:0-24 40:40-43
  | [2024-05-30T03:50:44Z]  @ ./boot.ts

On my machine, it works fine 🤔 Thanks!


Update a6613931fea70001bd2a7db60f590fb2635c90c7 fixed the issue 👍

mokagio commented 3 weeks ago

Ooooof. This has been truly a nightmare and I know I haven't been much help due to my unfamiliarity with Buildkite and the current mobile deployment processes. [...]

Most of this code makes my brain hurt, but I've read through it and it seems to make sense. I trust your judgment (and the passing builds!). Kind of ridiculous that we are now adding a Gemfile on top of the node package lockfile... lol, software ecosystems are all terrible. 🫠

Thanks a lot @codebykat !

I should have asked a review from my team at @Automattic/apps-infrastructure at the same time as you. That's more our domain after all 😳 🙇‍♂️ Updated now.

AliSoftware commented 2 weeks ago

Sorry for the delay in getting to this @mokagio 😓 I kept postponing the review because the diff was a bit big and wanted to find a moment when I'd be able to take the time… and thus planned to review it on my today or tomorrow (i.e. once I'd have finished my current high priority tasks of the past few days) 😓 . But I guess as long as the CI passes on Buildkite, there's not much to review anyway 🙃