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

ci(NODE-6505): CI Setup for Encryption Support #15139

Merged
merged 34 commits into from
Jan 20, 2025

Conversation

aditi-khare-mongoDB
Copy link
Contributor

Descriptions
This testing framework is being added in to allow for ease of encryption testing in PRs to come.

Add CI configuration to ensure that FLE can be end-to-end tested in the mongoose repo.
Add scripting so users can test locally and understand how the CI configuration works.

Summary of Changes

  • Add scripting to setup CI for mongoose integration tests locally and through GHA
  • Add script to setup encryption cluster locally for local user testing
  • Add basic integration testing to check the CI has been setup correctly

Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

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

A few comments overall. I wasn't able to run this end-to-end locally without resorting to hacks, but if it works fine in GitHub Actions then that's good enough for me.

test/encryption/encryption.test.js Outdated Show resolved Hide resolved
scripts/run-encryption-tests.sh Outdated Show resolved Hide resolved
scripts/run-encryption-tests.sh Outdated Show resolved Hide resolved
@vkarpov15 vkarpov15 added this to the 8.10 milestone Jan 8, 2025
@aditi-khare-mongoDB aditi-khare-mongoDB force-pushed the NODE-6505/ci-setup branch 4 times, most recently from 8ec6cef to 7cd83f6 Compare January 9, 2025 23:05
readd  dependency

readd  dependency

lint

readd  dependency

readd  dependency

fix dep

fix dep2

fix dep2

fix dep3

fix dep4

fix dep5

fix dep6
package.json Outdated
@@ -104,6 +104,7 @@
"test-deno": "deno run --allow-env --allow-read --allow-net --allow-run --allow-sys --allow-write ./test/deno.js",
"test-rs": "START_REPLICA_SET=1 mocha --timeout 30000 --exit ./test/*.test.js",
"test-tsd": "node ./test/types/check-types-filename && tsd",
"test-encryption": "bash scripts/configure-cluster-with-encryption.sh && mocha --exit ./test/encryption/*.test.js && npm uninstall mongodb-client-encryption > /dev/null",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we make this command just run mocha and move the configure-cluster-with-encryption.sh script to a setup-encryption-test script? Sometimes you don't want to re-run configure-cluster-with-encryption.sh when running locally, and also it would be great be able to pass command line flags to Mocha.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, made the change!

@baileympearson
Copy link
Contributor

@vkarpov15 What errors and hacks did you need to get this working locally? Ideally it's trivial for anybody to set up and run just from our tooling 🙂

@vkarpov15
Copy link
Collaborator

@baileympearson I don't recall exactly, there were some issues with finding a python3 install and needing to set up venv. Nothing is trivial when installing python is involved :) If I run into issues again, I'll do a better job writing them down and let you know.

@vkarpov15
Copy link
Collaborator

Merging this into 8.10.

@vkarpov15 vkarpov15 changed the base branch from master to 8.10 January 20, 2025 21:18
@vkarpov15 vkarpov15 merged commit d8c9d6c into Automattic:8.10 Jan 20, 2025
42 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.

3 participants