Skip to content

DOCSP-32718: add CodeWhisperer comments to SOCKS5 code snippet #765

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

Merged

Conversation

ccho-mongodb
Copy link
Contributor

@ccho-mongodb ccho-mongodb commented Aug 30, 2023

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-32718
Staging - https://docs-mongodbcom-staging.corp.mongodb.com/node/docsworker-xlarge/DOCSP-32718-socks5-snippet/fundamentals/connection/socks/

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?

Copy link
Collaborator

@jordan-smith721 jordan-smith721 left a comment

Choose a reason for hiding this comment

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

LGTM w/ two suggestions

@@ -13,6 +15,7 @@ const socksOptions = {
const client = new MongoClient(uri, socksOptions);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggestion: Add a comment above this specifying that it is connecting and passing in the socksOptions

@@ -13,6 +15,7 @@ const socksOptions = {
const client = new MongoClient(uri, socksOptions);
// end-socks

// Retrieve the first document from the "myDB.myColl" namespace in MongoDB and print it to the console
async function run() {
try {
const db = client.db("myDB");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggestion: Add a comment on the await client.close() section (line 25, can't reach it with a PR comment) stating that it is closing the client when complete. This is to match similar comments in other files

@ccho-mongodb ccho-mongodb merged commit 72bfca1 into mongodb:master Sep 5, 2023
@ccho-mongodb ccho-mongodb deleted the DOCSP-32718-socks5-snippet branch September 5, 2023 21:31
ccho-mongodb pushed a commit that referenced this pull request Sep 8, 2023
* DOCSP-32718: add CodeWhisperer comments to SOCKS5 code snippet

(cherry picked from commit 72bfca1)
mongoKart pushed a commit to mongoKart/docs-node that referenced this pull request Nov 3, 2023
…db#765)

* DOCSP-32718: add CodeWhisperer comments to SOCKS5 code snippet
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