Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Improve/websock and cr#300

Merged
abdheshnayak merged 6 commits into
mainfrom
improve/websock-and-cr
Mar 14, 2024
Merged

Improve/websock and cr#300
abdheshnayak merged 6 commits into
mainfrom
improve/websock-and-cr

Conversation

@abdheshnayak
Copy link
Copy Markdown
Contributor

No description provided.

@abdheshnayak abdheshnayak merged commit f40852b into main Mar 14, 2024
@abdheshnayak abdheshnayak deleted the improve/websock-and-cr branch March 14, 2024 12:57
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey @abdheshnayak - I've reviewed your changes and they look great!

General suggestions:

  • Consider adding comments to clarify the business or technical reasons behind allowing RecordVersion to be nil and its impact on the LogSubsId function's output format.
  • Ensure that the new format for the log subscription ID, especially the inclusion of a trailing >, is consistent with the expectations of all systems consuming these IDs.
  • Review the handling of RecordVersion being nil across the application to ensure that this change integrates smoothly with existing functionalities.
Here's what I looked at during the review
  • 🟡 General issues: 3 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Docstrings: all looks good

Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

Comment on lines +105 to +107
if md.RecordVersion == nil {
return fmt.Sprintf("%s.%s.%s.%s.>", logStreamName, md.Account, md.Cluster, md.TrackingId)
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion (code_clarification): Consider adding a comment explaining why a nil RecordVersion leads to a different format in LogSubsId. This could help maintainers understand the business logic or technical reasons behind this decision.

func LogSubsId(md MsgData, logStreamName string) string {

if md.RecordVersion == nil {
return fmt.Sprintf("%s.%s.%s.%s.>", logStreamName, md.Account, md.Cluster, md.TrackingId)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

question (typo): The format string ends with a >. If this is intentional, ensure that it aligns with the expected format for all consumers of this ID. If not, it might be a typo that could lead to inconsistencies in ID formatting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant