-
Notifications
You must be signed in to change notification settings - Fork 96
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
CMR-10310: Allow the subscription endpoint to take an https URL in the EndPoint element #2209
Conversation
"invalid url - some string" | ||
false | ||
"this is just some string" | ||
))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add newline at end of file
{:EndPoint "blahblah", :Method "search"} | ||
|
||
"given method is search and endpoint not given -- endpoint ignored" | ||
{:EndPoint "blahblah", :Method "search"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test looks the same as the one above?
|
||
(defn- send-sub-to-url-dest | ||
"Sends subscription details to url given. Throws error if subscription is not successful." | ||
[subscription-concept dest-endpoint] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metadata DB shouldn't send messages out.
All endpoints should subscribe to the external SNS topic. The lambda should be a CMR lambda that listens to the SNS topic that was subscribed. When an URL endpoint arrives it should send messages to the endpoint.
All metadata db does is check to see if a granule is part of a collection where a subscription exists and then creates enough information to be placed onto an internal subscription queue. This is where the subscription workers will pick it up where they can do ACL checks based on the data that is in the message. If the message can be sent on, then the workers will create the proper notification message and place it on the external SNS Topic, that is where the CMR Lambda will pick up the message and forward it to the URL in the message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metadata DB should not be sending out notifications to subscribers, It needs to put enough information into the notification message so that the subscription workers can do more processing and then it needs to place the messages onto the internal subscription notification topic. The sending of the notification to the end point URL needs to happen in the lambda that is listening to the external CMR topic.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2209 +/- ##
==========================================
- Coverage 58.26% 58.25% -0.02%
==========================================
Files 1056 1056
Lines 71097 71134 +37
Branches 2035 2034 -1
==========================================
+ Hits 41426 41436 +10
- Misses 27778 27798 +20
- Partials 1893 1900 +7 ☔ View full report in Codecov by Sentry. |
Overview
What is the feature/fix?
Ingest subscription could only take in SQS ARN as endpoint to send sub messages to
What is the Solution?
Add the ability to send sub message to any HTTP/S endpoint
What areas of the application does this impact?
Ingest
Checklist