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

Improve/logs#265

Merged
abdheshnayak merged 9 commits into
release-v1.0.2from
improve/logs
Feb 12, 2024
Merged

Improve/logs#265
abdheshnayak merged 9 commits into
release-v1.0.2from
improve/logs

Conversation

@abdheshnayak
Copy link
Copy Markdown
Contributor

No description provided.

@abdheshnayak abdheshnayak merged commit 038bb89 into release-v1.0.2 Feb 12, 2024
@abdheshnayak abdheshnayak deleted the improve/logs branch February 12, 2024 13:53
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.

PR Type: Refactoring

PR Summary: The pull request introduces a significant refactoring of the WebSocket server's logging and resource watch functionalities. It modularizes the code by extracting logic related to logs and resource watching into separate packages, improving code organization and readability. Additionally, it introduces utility functions for error and information message handling over WebSocket connections, further streamlining the codebase.

Decision: Comment

📝 Type: 'Refactoring' - not supported yet.
  • Sourcery currently only approves 'Typo fix' PRs.
✅ Issue addressed: this change correctly addresses the issue or implements the desired feature.
No details provided.
📝 Complexity: the changes are too large or complex for Sourcery to approve.
  • Big diff: the diff is too large to approve with confidence.

General suggestions:

  • Ensure comprehensive testing of the refactored modules to verify that the modularization has not introduced any regressions or altered the expected behavior of the WebSocket server.
  • Consider implementing additional validation in the ParseReq function to ensure the integrity and correctness of the input data, enhancing the robustness of the resource watch functionality.
  • Review the error handling strategy to ensure consistency and clarity in error messages sent over WebSocket connections, providing clients with actionable feedback.

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.

ReqTopic string `json:"req_topic"`
}

func ParseReq(rt string) (*ReqData, error) {
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 (llm): The ParseReq function effectively parses a resource topic string into structured data. Consider adding validation for each expected entry (e.g., account, project) to ensure the input string format is correct and complete.

abdheshnayak added a commit that referenced this pull request Nov 5, 2024
improved logs and resource watcher code pattern.
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