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

feat: site candidate data model #126

Merged
merged 9 commits into from
Feb 2, 2024
Merged

feat: site candidate data model #126

merged 9 commits into from
Feb 2, 2024

Conversation

ekremney
Copy link
Member

@ekremney ekremney commented Feb 1, 2024

Site Candidate Data Model

This PR introduces the Site Candidate Data Model to manage the site discovery flow. The primary objective is to maintain a comprehensive list of new sites and their respective statuses for potential inclusion in the Star Catalogue. The information is stored in the site-candidates table. The PR contains the data model itself, along with the access patterns and the functions which are used to add and modify of site candidates.

Flow

  1. Upon the discovery of a new site, Spacecat will check the site-candidates table to ascertain whether the site has been previously discovered.
  • If the site is found in the table, the candidate will be discarded.
  • If the site is not found, the candidate will be added to the site-candidates table with the status PENDING
  1. Subsequently, Spacecat will dispatch a discovery slack message containing the URL of the newly discovered site. This message will include interactive options with [Yes] and [Ignore] buttons, enabling human decision-making regarding the addition of the site to the Star Catalogue.

  2. If a user clicks [Yes], Spacecat will further update the status to APPROVED and proceed with adding the site to the Star Catalogue.

  3. If a user clicks [Ignore], Spacecat will update the status to IGNORED and not add the site to Star Catalogue.

  4. If any error happens during the process, Spacecat will update the status to ERROR

Copy link

github-actions bot commented Feb 1, 2024

This PR will trigger a minor release when merged.

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (37aa44c) 100.00% compared to head (1ddb8da) 100.00%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main      #126    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           31        35     +4     
  Lines         3311      3563   +252     
==========================================
+ Hits          3311      3563   +252     

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

@solaris007
Copy link
Member

one question: RUM is the first site detection source, but there will be many others, such as CM and XWALK, both of which will include organization information when reporting a site for detection. should we include an organization hint and if yielding a particular organization associate the approved site with it / create the organization?

Copy link
Member

@solaris007 solaris007 left a comment

Choose a reason for hiding this comment

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

good stuff

@solaris007 solaris007 added the enhancement New feature or request label Feb 2, 2024
@ekremney ekremney merged commit c457645 into main Feb 2, 2024
8 checks passed
@ekremney ekremney deleted the site-candidate-date-model branch February 2, 2024 10:20
adobe-bot pushed a commit that referenced this pull request Feb 2, 2024
@adobe-bot
Copy link

🎉 This PR is included in version @adobe/spacecat-shared-data-access-v1.14.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants