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

Filter and show only those providers that have valid event metadata on provider selection #49

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

sangeetha5491
Copy link
Contributor

@sangeetha5491 sangeetha5491 commented Oct 10, 2023

Description

Old workflow
Fetch all entitled provider metadata for org - L1
After user selects the provider metadata they want to subscribe to from L1 - PM
Fetch all entitled provider for org filtered by PM -L2 ( some provider metadata may not have provider, some providers may not have valid event metadata )
This resulted in not having any providers to choose from for certain provider metadata, which is a bad experience.

New workflow:
Fetch all entitled provider metadata for org - L1
Fetch all entitled provider for org - L2
Filter providers that do not have valid event metadata and create map of provider metadata to providers list - M1
Filter provider metadata from L1 that do not have any valid providers in M1 - L3

user selects the provider metadata they want to subscribe to from L3
for the selected provider metadata there is guaranteed to be valid providers and associated event metadata

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

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)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Merging #49 (962a155) into main (95efc2a) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #49   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          350       361   +11     
  Branches        58        60    +2     
=========================================
+ Hits           350       361   +11     
Files Coverage Δ
lib/events/EventsOfInterestHelper.js 100.00% <100.00%> (ø)
lib/events/ProviderHelper.js 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@purplecabbage purplecabbage left a comment

Choose a reason for hiding this comment

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

I know less about the business logic here, but the code looks fine.

Copy link

@francoisledroff francoisledroff left a comment

Choose a reason for hiding this comment

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

lgtm

@sangeetha5491 sangeetha5491 merged commit 1c04d53 into main Oct 12, 2023
7 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.

3 participants