Skip to content

gateway: Fix handshake log - #75

Merged
mprymek merged 2 commits into
mainfrom
fix-handshake-log
Sep 18, 2025
Merged

gateway: Fix handshake log#75
mprymek merged 2 commits into
mainfrom
fix-handshake-log

Conversation

@mprymek

@mprymek mprymek commented Sep 18, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Refactor

    • Improved error logging during secure connection handshakes: failures are now recorded at a higher severity with full error details, making operational troubleshooting easier. Runtime behavior is unchanged; connections continue to be handled as before.
  • Chores

    • Updated application version to 0.8.1 to reflect minor improvements.
    • No changes to public APIs or functionality.

@coderabbitai

coderabbitai Bot commented Sep 18, 2025

Copy link
Copy Markdown

Walkthrough

Adjusted logging in DTLS handshake error path in gateway/gateway.go to emit Error-level logs with the actual error while preserving control flow. Updated version.txt from 0.8.0 to 0.8.1.

Changes

Cohort / File(s) Summary
Gateway logging update
gateway/gateway.go
Replaced Debug-level static log with Error-level log including the encountered error during DTLS handshake; no control-flow changes.
Version bump
version.txt
Incremented version from 0.8.0 to 0.8.1.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A nibble of logs, a hop to refine,
I thump: “Errors, show your sign!”
From whispering debug to crimson alarm,
Version hops a patch—steady and calm.
Ears perked high, I merge with delight,
Carrots, commits, and clean insight. 🥕🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "gateway: Fix handshake log" is concise and directly reflects the primary change in the diff (adjusting the DTLS handshake logging behavior in the gateway), so it clearly communicates the main intent to reviewers scanning history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-handshake-log

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mprymek
mprymek merged commit 072dae7 into main Sep 18, 2025
0 of 16 checks passed
@mprymek
mprymek deleted the fix-handshake-log branch September 18, 2025 17:45

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
gateway/gateway.go (1)

183-186: Broaden DTLS handshake error match and standardize log message

File: gateway/gateway.go Lines: 183-186

-            if _, ok := err.(*dtls.HandshakeError); ok {
-                gw.log.Error("Client TLS handshake error: %s", err)
+            var hsErr *dtls.HandshakeError
+            if errors.As(err, &hsErr) {
+                gw.log.Error("Client DTLS handshake error: %v", err)
                 continue
             }

Add import "errors" if missing. If handshake failures are noisy (e.g., port scans), consider lowering to WARN or sampling logs.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between a66c259 and 791fe0c.

📒 Files selected for processing (2)
  • gateway/gateway.go (1 hunks)
  • version.txt (1 hunks)
🔇 Additional comments (1)
version.txt (1)

1-1: Approve version bump — verification incomplete (rg skipped files)

0.8.1 bump approved; the ripgrep run returned "No files were searched", so I couldn't confirm there are no lingering "0.8.0" references. Re-run verification with:
git ls-files -z | xargs -0 rg -n --no-ignore -S '0.8.0' -C1

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant