Skip to content

Conversation

gribnoysup
Copy link
Collaborator

@gribnoysup gribnoysup commented Apr 29, 2021

This PR ensures that every test suite in every package is green. It doesn't mean that all of them are brought up to date or improved, we are just trying to create a good baseline for all the future work. Every package gets its own commit with a fix, I'll additionally add some context for the changes that I had to make in every package

  • @mongodb-js/triejs didn't spend any time trying to debug this one, I know that @mcasimir is working on a PR that will remove this package anyway
  • hadron-style-manager passing already, just some test generated metadata wasn't gitignored
  • hadron-react-* mentioning all these together, their tests were passing already, but I just forgot to move some files from their monorepo root during initial import
  • hadron-plugin-manager test case was too strictly asserting error message, stack trace caused it to fail
  • hadron-compile-cache babel got bumped in package-lock, hash changed
  • hadron-build there is an obscure electron builder issue on darwin (hdiutil unmount issue blocks dmg creation for MacOS builds electron-userland/electron-builder#4606) that causes tests to fail in most cases, disabled for the platform
  • mongodb-connection-model driver got a minor bump that brought back directConnection and broke all our tests that assert that driver doesn't add it. Rolled back all our changes related to directConnection
  • @mongodb-js/compass-aggregations this was a fun one: react-dnd used global instead of global.window when running tests, those are somehow explicitly not the same when running mocha tests even with jsdom registered and this caused jsdom to throw a bunch of obscure errors. Fixed by prioritizing window over global when creating dnd "backend"
  • @mongodb-js/compass-connect patch driver bump caused snapshots to not match anymore
  • @mongodb-js/compass-crud patch driver bump now requires mongodb-client-encryption
  • @mongodb-js/compass-deployment-awarenes minor bunp in some build dependency causes minified name to change, we probably should not be that strict with this assertion
  • @mongodb-js/compass-shell missing mocha dev dependency
  • @mongodb-js/compass-query-bar actually caught a bug in latest query-paser that became visible only after bumping the dev dep accidentally, fixed in https://github.com/mongodb-js/query-parser/pull/85
  • @mongodb-js/compass-home compass plugins updated to latest which caused a few tests to fail due to plugins crashing outside of electron environment, replaced those with mocks in tests, also pulled in a few missing peer deps so that npm run start works (kinda sad that compass-home is not a window into how compass looked ~ a year ago or even more)
  • @mongodb-js/electron-wix-msi jest was not happy with how buffer is used in mocks, also one test suite is just broken due to the mock-fs dependency, it's not a quick fix so the test suite is just disabled for now

…window context when possible instead of global
…y check the label as the test case description suggests
…x invalid project value test by providing value that is 100% invalid (for now)
…sts so that mocha tests can run; Add all missing dev deps
…; Skip broken test that uses mock-fs for now
"mongodb-ace-autocompleter": "^0.4.12",
"mongodb-ace-mode": "^0.4.0",
"mongodb-ace-theme-query": "0.0.2",
"mongodb-client-encryption": "^1.2.3",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a bit surprising – the driver should not require this to be present unless we’re actually doing anything with FLE … are we?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm, yeah, no, I don't think so... Let me double-check that I actually got the reason for this right in the first place

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, so seems it's a breaking* change introduced in driver here https://github.com/mongodb/node-mongodb-native/pull/2760/files#diff-c088451b2b6c514ba0f163c7c00dfae50dc86c534feeffe18cf618749af66da0R15

* - breaking only for webpack because it tries to bundle mongodb-client-encryption and because this time it's a top level import it throws instead of warning as it does with v3.6.3

@gribnoysup
Copy link
Collaborator Author

gribnoysup commented Apr 29, 2021

Yikes, so I guess we can't really run tests with GitHub Actions for all the packages until we get to normalizing and hoisting packages dependencies

Screenshot 2021-04-29 at 15 42 01

du -hs compass-monorepo
27G    compass-monorepo

https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources

Hardware specification for Windows and Linux virtual machines:

2-core CPU
7 GB of RAM memory
14 GB of SSD disk space

@gribnoysup gribnoysup merged commit 0388fe9 into master Apr 29, 2021
@gribnoysup gribnoysup deleted the compass-4704-fix-tests-everywhere branch April 29, 2021 15:30
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.

2 participants