Skip to content

Update dependency #153

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
merged 42 commits into from
Sep 13, 2024
Merged

Update dependency #153

merged 42 commits into from
Sep 13, 2024

Conversation

ekdeveloper
Copy link
Contributor

No description provided.

@ekdeveloper ekdeveloper linked an issue Aug 28, 2024 that may be closed by this pull request
…cies

# Conflicts:
#	.github/CODEOWNERS
#	README.md
#	package.json
@ekdeveloper ekdeveloper changed the title rename and update dependency Update dependency Aug 29, 2024
@ekdeveloper ekdeveloper self-assigned this Aug 29, 2024
RUN set -eux; \
apk update; \
# For private npm repo:
# yarn config set registry http://host.docker.internal:4873; \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

add option for testing with private repo

@@ -8,11 +8,7 @@ const env = require('var');
let mongoConfig = {
connection: `mongodb://${env.MONGO_HOSTNAME}`,
db_name: env.MONGO_DB_NAME,
options: {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

depreciated

@@ -224,15 +223,15 @@ module.exports.searchById = (args) =>
let db = globals.get(CLIENT_DB);
let collection = db.collection(`${COLLECTION.ALLERGYINTOLERANCE}_${base_version}`);
// Query our collection for this observation
collection.findOne({ id: id.toString() }, (err, allergyintolerance) => {
if (err) {
collection.findOne({ id: id.toString() })
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix call w/ mongo driver

otchet-broad

This comment was marked as resolved.

Copy link
Collaborator

@otchetbluehalo otchetbluehalo left a comment

Choose a reason for hiding this comment

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

There's an entire school of thought about returning error messages from an external system. See https://csf.tools/reference/nist-sp-800-53/r5/si/si-11/

I think it's worth updating the pattern with mongo to return a controlled message instead of the raw error from MongoDB.

@ekdeveloper
Copy link
Contributor Author

ekdeveloper commented Sep 11, 2024

There's an entire school of thought about returning error messages from an external system. See https://csf.tools/reference/nist-sp-800-53/r5/si/si-11/

I think it's worth updating the pattern with mongo to return a controlled message instead of the raw error from MongoDB.

I'll make another ticket for that. I believe it is beyond the scope of this PR
#157

@ekdeveloper
Copy link
Contributor Author

Merge this pr after issue #157 is merge into this PR

@ekdeveloper ekdeveloper marked this pull request as ready for review September 13, 2024 14:42
.then( () => {
return resolve({
id: id,
created: res && res.lastErrorObject ? !res.lastErrorObject.updatedExisting : false,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was updated to support null check and default to false. This was a bug previously where the first put would fail

@@ -3,18 +3,23 @@ name: Lint
on: push

jobs:
run-tests:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

no need for dind for just lint

otchetbluehalo
otchetbluehalo previously approved these changes Sep 13, 2024
Copy link
Collaborator

@otchetbluehalo otchetbluehalo left a comment

Choose a reason for hiding this comment

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

Thanks for improving coverage and getting the error handling updated.

@ekdeveloper ekdeveloper merged commit 68a2306 into master Sep 13, 2024
4 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.

Update dependencies
3 participants