Skip to content

fix: improve error handling and fix typo in error messages#1393

Merged
k1LoW merged 2 commits intomainfrom
fix
Feb 14, 2026
Merged

fix: improve error handling and fix typo in error messages#1393
k1LoW merged 2 commits intomainfrom
fix

Conversation

@k1LoW
Copy link
Owner

@k1LoW k1LoW commented Feb 14, 2026

  • Add comments explaining intentional error ignoring in db.go
  • Replace panic with error return in runLoop()
  • Fix "condig" typo to "config" in parse.go

- Add comments explaining intentional error ignoring in db.go
- Replace panic with error return in runLoop()
- Fix "condig" typo to "config" in parse.go
@k1LoW k1LoW self-assigned this Feb 14, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @k1LoW, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the application's robustness and clarity by refining error handling mechanisms and correcting a minor but pervasive typo. It ensures that certain database operation errors are explicitly acknowledged as intentionally ignored, prevents application crashes due to invalid loop configurations, and improves the accuracy of error messages presented to users.

Highlights

  • Error Handling Clarity: Added comments to db.go to explicitly explain why errors from LastInsertId() and RowsAffected() are intentionally ignored, improving code readability and maintainability.
  • Improved Robustness: Replaced a panic call with a proper error return in the runLoop function within operator.go, ensuring graceful error handling instead of program termination for invalid usage.
  • Typo Correction: Fixed a consistent typo from "condig" to "config" in error messages within parse.go, enhancing the clarity and professionalism of error reporting.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • db.go
    • Added comments explaining the intentional ignoring of errors from LastInsertId() and RowsAffected().
  • operator.go
    • Replaced panic("invalid usage") with return fmt.Errorf("invalid usage: runLoop called without loop configuration").
  • parse.go
    • Corrected "condig" to "config" in all error messages related to parseIncludeConfig.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request improves error handling by replacing a panic with a proper error, fixes a typo in error messages, and adds comments to clarify why certain database errors are ignored. The changes are beneficial for code robustness and clarity. I've added a couple of suggestions to further enhance maintainability and debuggability.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

BenchmarkManyRunbooks-4

main (-) #1393 (1e89001) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 3,845,387,300 ns/op 3,676,815,409 ns/op -168,571,891 ns/op
Bytes allocated per iteration 1,381,486,080 B/op 1,381,616,416 B/op 130,336 B/op
Allocs per iteration 19,289,103 allocs/op 19,289,095 allocs/op -8 allocs/op
Metadata
main (-) #1393 (1e89001)
goos linux linux
goarch amd64 amd64
pkg github.com/k1LoW/runn github.com/k1LoW/runn
cpu AMD EPYC 7763 64-Core Processor AMD EPYC 7763 64-Core Processor

BenchmarkOpenAPI3-4

main (-) #1393 (1e89001) +/-
Number of iterations 1 1 0
Nanoseconds per iteration 2,481,485,751 ns/op 2,698,965,162 ns/op 217,479,411 ns/op
Bytes allocated per iteration 1,280,069,944 B/op 1,280,210,480 B/op 140,536 B/op
Allocs per iteration 18,647,162 allocs/op 18,647,481 allocs/op 319 allocs/op
Metadata
main (-) #1393 (1e89001)
goos linux linux
goarch amd64 amd64
pkg github.com/k1LoW/runn github.com/k1LoW/runn
cpu AMD EPYC 7763 64-Core Processor AMD EPYC 7763 64-Core Processor

BenchmarkSingleRunbook-4

main (-) #1393 (1e89001) +/-
Number of iterations 25 22 -3
Nanoseconds per iteration 47,373,116 ns/op 47,051,717 ns/op -321,399 ns/op
Bytes allocated per iteration 23,025,940 B/op 23,042,944 B/op 17,004 B/op
Allocs per iteration 186,819 allocs/op 186,826 allocs/op 7 allocs/op
Metadata
main (-) #1393 (1e89001)
goos linux linux
goarch amd64 amd64
pkg github.com/k1LoW/runn github.com/k1LoW/runn
cpu AMD EPYC 7763 64-Core Processor AMD EPYC 7763 64-Core Processor

Reported by octocov

@github-actions
Copy link
Contributor

Code Metrics Report

main (4eed07e) #1393 (1e89001) +/-
Coverage 60.3% 60.3% -0.1%
Code to Test Ratio 1:0.8 1:0.8 -0.1
Test Execution Time 7m16s 7m13s -3s
Details
  |                     | main (4eed07e) | #1393 (1e89001) |  +/-  |
  |---------------------|----------------|-----------------|-------|
- | Coverage            |          60.3% |           60.3% | -0.1% |
  |   Files             |             81 |              81 |     0 |
  |   Lines             |           9240 |            9244 |    +4 |
+ |   Covered           |           5574 |            5576 |    +2 |
- | Code to Test Ratio  |          1:0.8 |           1:0.8 |  -0.1 |
  |   Code              |          17289 |           17295 |    +6 |
  |   Test              |          14395 |           14395 |     0 |
+ | Test Execution Time |          7m16s |           7m13s |   -3s |

Code coverage of files in pull request scope (79.2% → 79.1%)

Files Coverage +/- Status
db.go 78.7% -0.5% modified
operator.go 80.5% 0.0% modified
parse.go 74.6% 0.0% modified

Reported by octocov

@k1LoW k1LoW merged commit ae369fd into main Feb 14, 2026
9 checks passed
@k1LoW k1LoW deleted the fix branch February 14, 2026 14:25
@github-actions github-actions bot mentioned this pull request Feb 14, 2026
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