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

Bugfix for #76: Multiple Init and Scheduled functions #77

Merged
merged 1 commit into from Oct 29, 2023

Conversation

madflojo
Copy link
Member

@madflojo madflojo commented Oct 29, 2023

This Pull Request fixes an issue that is caused by a scoping issue between the closure functions and the for loop they are defined within.

Summary by CodeRabbit

  • Refactor: Enhanced the server's logging capabilities to provide more detailed information during the debugging process. This includes capturing and logging the results of certain functions, which will help in identifying and resolving potential issues more efficiently. Please note, these changes are behind-the-scenes improvements and won't affect the user experience directly.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 29, 2023

Walkthrough

The codebase has been enhanced with additional logging capabilities for better debugging and tracing. Changes include capturing and logging callback results, and capturing function names to avoid scope issues. These modifications have been implemented in the Server struct's PreFunc, PostFunc, and Run functions, as well as in the callback registration function.

Changes

File Path Summary
pkg/app/app.go Added debug and trace logging in PreFunc and PostFunc. Captured and logged callback results in PostFunc. Captured function name in Run and callback registration function to avoid scope issues. Updated logging and callback function accordingly.

🐇🎉

"In the land of code, where the shadows lie,

We trace, we debug, under the binary sky.

Function names captured, scope issues no more,

With every callback, our knowledge does soar.

So here's to the changes, made with care,

In the world of code, where rabbits dare!" 🥕🎉


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai help to get help.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.json

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 48395a6 and 0f128df.
Files selected for processing (1)
  • pkg/app/app.go (4 hunks)
Files skipped from review due to trivial changes (1)
  • pkg/app/app.go

@codecov
Copy link

codecov bot commented Oct 29, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (48395a6) 82.75% compared to head (0f128df) 83.03%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #77      +/-   ##
==========================================
+ Coverage   82.75%   83.03%   +0.28%     
==========================================
  Files          12       12              
  Lines        1148     1167      +19     
==========================================
+ Hits          950      969      +19     
  Misses        152      152              
  Partials       46       46              
Files Coverage Δ
pkg/app/app.go 77.05% <82.75%> (+1.10%) ⬆️

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

@madflojo madflojo merged commit 6fcac6d into tarmac-project:main Oct 29, 2023
11 checks passed
@madflojo madflojo deleted the bug branch October 29, 2023 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant