-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: add request_id in order for the API to track the request #167
base: main
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThis PR adds a Sequence diagram for sending a request with request_idsequenceDiagram
participant Module
participant API
Module->>Module: Generate request_id (UUID)
Module->>API: Send request with data and request_id
API->>API: Process request
API-->>Module: Response
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @goudyj - I've reviewed your changes - here's some feedback:
Overall Comments:
- It looks like you're adding
event_id
to the tests but not asserting its value, consider checking that it is a valid UUID. - Consider generating the
request_id
in the_send_request
method usinguuid4()
to ensure uniqueness.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
78fafb7
to
6d3be44
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #167 +/- ##
=======================================
Coverage 90.76% 90.76%
=======================================
Files 35 35
Lines 2500 2501 +1
=======================================
+ Hits 2269 2270 +1
Misses 231 231 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Looks good to me.
I think you need to update the Changelog + version though
In this PR, we add a request_id to request in order for the API to track them and not process twice the same request if one take more than the timeout (30 s)
Summary by Sourcery
Adds a request_id to each request to allow the API to track requests and avoid processing duplicates in case of timeouts.