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

Version 2 (published as next to NPM) #57

Open
wants to merge 121 commits into
base: master
Choose a base branch
from
Open

Version 2 (published as next to NPM) #57

wants to merge 121 commits into from

Conversation

ryanwitt
Copy link
Member

@ryanwitt ryanwitt commented Dec 29, 2023

Closes #24
Closes #36
Closes #53
Closes #55
Closes #58

Changelog

v.2.0.3-alpha

New Features

Added DLQ option for enqueue (#24)

By default, we always create a single fail queue, but now we create a dlq for some queues.

Added --sentry-dsn option

todo

Added --delay option (#36)

todo

Added --tag option (#53)

This option supports AWS cost tags. These are only supported on queue creation. You may have to manually tag queues that already exist, or cull the queues using the idleQueues command and then tag them on next creation.

Tags for the CLI

The enqueue command now supports the option --tag <tag> where <tag> is formatted like Key=Value like the AWS cli. The --tag option may be specified multiple times, up to the AWS limit.

Tags for Node

The enqueue and enqueueBatch exports now support a tags option where tags are formatted as keys/values of an object, for example: { ... tags: { Role: 'app', Environment: 'production' } ... }.

Monitoring tool for multiple queues

todo

Official Node API

Though qdone was originally supposed to be used from the command line, many users are using the enqueue and enqueueBatch methods exported by v1. Now we are adding official support for these.

Incompatible changes

  • Module no longer exports worker
  • Dropped support for node <16

Under the hood

  • Migrated to AWS JavaScript SDK v3
  • Refactored to native node es6 using async/await
  • Removed runtime dependency on Q
  • Removed dev dependency on strip-ansi
  • Migrated tests to jest
  • Added unit tests for internal library functions, moving some of the tests from test.cli.js

@ryanwitt ryanwitt self-assigned this Dec 29, 2023
Copy link

codecov bot commented Dec 29, 2023

Codecov Report

Attention: Patch coverage is 78.49356% with 217 lines in your changes missing coverage. Please review.

Please upload report for BASE (master@a28b68c). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/cli.js 37.57% 86 Missing and 22 partials ⚠️
src/idleQueues.js 68.57% 34 Missing and 10 partials ⚠️
src/enqueue.js 89.92% 23 Missing and 3 partials ⚠️
src/sentry.js 25.00% 15 Missing and 3 partials ⚠️
src/monitor.js 66.66% 7 Missing and 4 partials ⚠️
src/exponentialBackoff.js 87.87% 1 Missing and 3 partials ⚠️
src/qrlCache.js 95.89% 2 Missing and 1 partial ⚠️
src/sqs.js 90.62% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master      #57   +/-   ##
=========================================
  Coverage          ?   76.82%           
=========================================
  Files             ?       12           
  Lines             ?     1139           
  Branches          ?      274           
=========================================
  Hits              ?      875           
  Misses            ?      203           
  Partials          ?       61           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ryanwitt ryanwitt marked this pull request as ready for review December 29, 2023 17:02
jasonspalace
jasonspalace previously approved these changes Dec 29, 2023
return result
} catch (err) {
if (err instanceof QueueDoesNotExist) {
console.error(chalk.yellow('This error can occur when you run this command immediately after deleting a queue. Wait 60 seconds and try again.'))

Choose a reason for hiding this comment

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

@ryanwitt do we have a way to retry this if this is being called from the application job?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, but I think we should build it into qdone soon.


export const defaults = Object.freeze({
// Shared
prefix: 'qdone_',

Choose a reason for hiding this comment

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

@ryanwitt what is the implication of these defaults? did defaults exist before?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, they were, but only on the command line. This made using the internal API awkward, and these defaults make it easy and consistent between the two. You'll see that the internal PR uses the camelCase style naming now.

@ryanwitt ryanwitt changed the title Version 2 (published as latest to NPM) Version 2 (published as next to NPM) Sep 8, 2024
@jasonspalace jasonspalace removed the request for review from MatiSap October 14, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants