Skip to content

refactor: create middleware to handle dbWatchersDisabled check#32721

Merged
kodiakhq[bot] merged 4 commits intodevelopfrom
refactor/notifyListener-readability
Jul 8, 2024
Merged

refactor: create middleware to handle dbWatchersDisabled check#32721
kodiakhq[bot] merged 4 commits intodevelopfrom
refactor/notifyListener-readability

Conversation

@ricardogarim
Copy link
Copy Markdown
Member

@ricardogarim ricardogarim commented Jul 4, 2024

This refactor introduces a middleware function, withDbWatcherCheck, to handle the dbWatchersDisabled check uniformly across various notification functions. By applying this middleware, we ensure that the flag checks are consistently managed, reducing redundancy and potential errors.

The primary changes involve:

  • Creation of the withDbWatcherCheck middleware to wrap notification functions.
  • Direct export of each notification function with the withDbWatcherCheck wrapper applied.

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot bot commented Jul 4, 2024

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is targeting the wrong base branch. It should target 6.11.0, but it targets 6.10.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jul 4, 2024

⚠️ No Changeset found

Latest commit: 186ba3f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 4, 2024

Codecov Report

Attention: Patch coverage is 21.23288% with 115 lines in your changes missing coverage. Please review.

Project coverage is 56.81%. Comparing base (4bafb6a) to head (186ba3f).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #32721      +/-   ##
===========================================
+ Coverage    50.60%   56.81%   +6.21%     
===========================================
  Files         1950     2498     +548     
  Lines        46689    55335    +8646     
  Branches      9489    11411    +1922     
===========================================
+ Hits         23627    31441    +7814     
- Misses       20933    21187     +254     
- Partials      2129     2707     +578     
Flag Coverage Δ
e2e 56.46% <ø> (+13.62%) ⬆️
unit 72.47% <21.23%> (+0.58%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@ricardogarim ricardogarim force-pushed the refactor/notifyListener-readability branch from 810efe7 to 6861c00 Compare July 4, 2024 22:10
@ricardogarim ricardogarim marked this pull request as ready for review July 5, 2024 11:40
@ricardogarim ricardogarim requested a review from a team July 5, 2024 11:41
debdutdeb
debdutdeb previously approved these changes Jul 7, 2024
@ricardogarim ricardogarim added this to the 6.11 milestone Jul 8, 2024
@ricardogarim ricardogarim added the stat: QA assured Means it has been tested and approved by a company insider label Jul 8, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 8, 2024
@ricardogarim ricardogarim added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels Jul 8, 2024
@ggazzo ggazzo self-requested a review July 8, 2024 12:30
Copy link
Copy Markdown
Member

@KevLehman KevLehman left a comment

Choose a reason for hiding this comment

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

Liked a bit more the 1st approach 😢

But this looks nice as well!

@kodiakhq kodiakhq bot merged commit b0f182e into develop Jul 8, 2024
@kodiakhq kodiakhq bot deleted the refactor/notifyListener-readability branch July 8, 2024 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants