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

ALPHA Release - v7 - Complete refactoring #615

Merged
merged 11 commits into from
May 31, 2024
Merged

Conversation

ccoeurderoy
Copy link
Collaborator

@ccoeurderoy ccoeurderoy commented Apr 19, 2024

Release v7 - Alpha

Do not merge this on the master branch. Create an alpha git branch so it can create a pre-release

Description

This alpha release contains huge breaking changes!

BREAKING CHANGES

  • The PubSubFactory.create method options have changed and do not rely on Google types
  • listen and emit methods have been replaced by publish and subscribe
  • Every option does not depend on Google
  • @google/pubsub package is now an optional peer dependency. It needs to be installed manually.

Other changes:

  • Change the test framework from avajs to jest.

Motivation and Context

The @algoan/pubsub has been created to be cloud agnostic. This factory's goal is to switch from one cloud to another with a simple parameter change.

However, this library became more and more specific to Google Cloud Pub/Sub, and it is now difficult to add more transports. Thus, I wanted to rewrite the lib, even though it is highly inspired by @google-cloud/pubsub package,. I also want it easy to use.

This alpha release is not finished. There are still missing features that I want to tackle:

  • Dynamic types: if I choose Google Pub/Sub as transport, I want the getNativeClient() or the getOriginalMessage() methods to return Google types
  • Add the Push and Pull methods to handle every subscription cases
  • Add more tests to the exactly-once delivery
  • Create a playground application letting us play with options

I've changed the test framework because the latest version of ava does not force exit child processes, and tests couldn't end properly. Thanks to the detectOpenHandles option of jest, I've discovered that this was due to the subscription connection with the emulator. Indeed, HTTP2 connections were still open, I just needed to close server connections.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@g-ongenae
Copy link
Member

Do not merge this on the master branch. Create an alpha git branch so it can create a pre-release

I created the branch alpha. You may change the base ref of your PR.

@ccoeurderoy ccoeurderoy changed the base branch from master to alpha April 19, 2024 09:45
@ccoeurderoy ccoeurderoy marked this pull request as ready for review April 19, 2024 09:46
@g-ongenae g-ongenae merged commit 7c735fc into algoan:alpha May 31, 2024
4 checks passed
@ccoeurderoy ccoeurderoy deleted the v7 branch May 31, 2024 10:09
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