GithubHelp home page GithubHelp logo

ecobee / nodejs-gcloud-pubsub-module Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 9.0 202 KB

A GCloud Pub/Sub module for NestJS

License: MIT License

TypeScript 100.00%
gcloud gcloud-pubsub home-services-squad javascript nestjs nodejs pubsub typescript

nodejs-gcloud-pubsub-module's People

Contributors

arvinsingla avatar ddamico-ecobee avatar eji4h avatar mackenzie-gray avatar naguigui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodejs-gcloud-pubsub-module's Issues

Issue with server close

We have run into an issue in our use in a nest microservice where it will fail to close properly in our end-to-end tests where we do manual cleanup of subscriptions.

The chain of events looks like:

  • we set up the app
  • we create subscriptions and have the module listen to it
  • we call app.close()
  • we clean up subscriptions on the pub/sub emulator
  • because the work in app.close happens asynchronously, in the previous step we inadvertently kill a subscription before the microservice has stopped listening to it
  • as a result we get stuck in an endless series of retries in the server's error handler

Have discussed and landed on adding a simple flag to server to represent whether the server is in a "I am trying to close, do not bother me" state, and then not do the subscription close/open activity in handleError if we are in that don't-bother-me-state.

PR to follow.

security issue in json-bigint 0.3.1

The current release @ecobee/[email protected] has a dependency to the (outdated) @google-cloud/[email protected] that has a transitive dependency to [email protected]. This version of json-bigint has a security issue with severity high. (see https://www.npmjs.com/advisories/1690)

See output of npm dependency graph:

Output of npm audit:

  High            Uncontrolled Resource Consumption in json-bigint              
                                                                                
  Package         json-bigint                                                   
                                                                                
  Patched in      >=1.0.0                                                       
                                                                                
  Dependency of   @ecobee/nodejs-gcloud-pubsub-module                           
                                                                                
  Path            @ecobee/nodejs-gcloud-pubsub-module > @google-cloud/pubsub >  
                  google-gax > google-auth-library > gcp-metadata >             
                  json-bigint                                                   
                                                                                
  More info       https://npmjs.com/advisories/1690 

As there is no newer release of @google-cloud/pubsub with major version 1, it has to be updated to major version 2. (Recent version is 2.17.0) This may contain breaking changes.

Update install section in readme.md

The package name is not valid.

npm install nodejs-gcloud-pubsub-module --save

should be

npm install @ecobee/nodejs-gcloud-pubsub-module --save

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.