-
Notifications
You must be signed in to change notification settings - Fork 0
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): Setup CI #4
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great start!
Along with the comments, we also need the ability to set up a cluster and run tests locally. Can we add a script that uses drivers-evergreen-tools to set up a cluster for local development as well as using the github action?
|
||
on: | ||
push | ||
#workflow_dispatch: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentionally commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just so any push triggers the action, I've added this branch name into the push config for clarity - will remove it when we're ready to merge.
53e268c
to
270d151
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was missed from my initial review:
Along with the comments, we also need the ability to set up a cluster and run tests locally. Can we add a script that uses drivers-evergreen-tools to set up a cluster for local development as well as using the github action?
|
||
on: | ||
push: | ||
branches: ['master', 'NODE-6505/ci-setup'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the AC on the ticket:
Run GHA on PR open to main and commit to main, maybe remove the PR trigger after FLE work is done.
We're missing a trigger when PRs are opened against main (if we make that change, you can remove your branch from this list too)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be deleted. Should we perhaps added .pid
files to the .gitignore? (also if we're using crypt_shared correctly, we shouldn't be spawning mongocryptds 🤔 )
@@ -22,6 +22,7 @@ | |||
"bson": "^6.7.0", | |||
"kareem": "2.6.3", | |||
"mongodb": "~6.10.0", | |||
"mongodb-client-encryption": "^6.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably shouldn't be a production dependency of mongoose 🙂
'db.coll': { | ||
bsonType: 'object', | ||
encryptMetadata: { | ||
keyId: [new mdb.UUID(dataKey)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the return type of createDataKey is UUID
keyId: [new mdb.UUID(dataKey)] | |
keyId: [dataKey] |
await encryptedClient.db('db').collection('coll').insertOne({ a: 1 }); | ||
|
||
// a dummyClient not configured with autoEncryption, returns a encrypted binary type, meaning that encryption succeeded | ||
const encryptedCursor = await dummyClient.db('db').collection('coll').find(); | ||
const encryptedResult = await encryptedCursor.next(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await encryptedClient.db('db').collection('coll').insertOne({ a: 1 }); | |
// a dummyClient not configured with autoEncryption, returns a encrypted binary type, meaning that encryption succeeded | |
const encryptedCursor = await dummyClient.db('db').collection('coll').find(); | |
const encryptedResult = await encryptedCursor.next(); | |
const { insertedId } = await encryptedClient.db('db').collection('coll').insertOne({ a: 1 }); | |
// a dummyClient not configured with autoEncryption, returns a encrypted binary type, meaning that encryption succeeded | |
const encryptedCursor = await dummyClient.db('db').collection('coll').findOne({ _id: insertedId }); |
(optional) Usually we'd just query for the document we inserted specifically, instead of creating a cursor and iterating it. This also applies below, to the encryptedClient.find()
Summary