Skip to content

fix: Reuse created GitHub client per each installation#290

Merged
konradasb merged 1 commit intomainfrom
fix-reuse-github-client-per-installation
Jan 28, 2026
Merged

fix: Reuse created GitHub client per each installation#290
konradasb merged 1 commit intomainfrom
fix-reuse-github-client-per-installation

Conversation

@konradasb
Copy link
Copy Markdown
Contributor

@konradasb konradasb commented Jan 28, 2026

Description

Related Issue(s)

Checklist

  • I have read the contribution guidelines.
  • I have signed off my commits.
  • I have added necessary documentation (if appropriate).
  • I have added tests to cover my changes.

Summary by CodeRabbit

Release Notes

  • Improvements
    • Optimized GitHub client performance through improved caching across multiple installations.
    • Enhanced system event visibility with updated logging levels for pool operations and VM lifecycle events.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 28, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Two files are modified: helper/github/client.go introduces thread-safe, per-installation caching for GitHub clients using a mutex and map to store and reuse clients by installation ID, while server/pool.go elevates logging visibility by promoting several Debug-level messages to Info level.

Changes

Cohort / File(s) Summary
GitHub Client Caching
helper/github/client.go
Adds sync.Mutex and installations map[int64]*github.Client fields to support thread-safe, per-installation client caching. The Installation() method now checks the cache under lock, reuses existing clients, or creates and stores new ones instead of returning a fresh client each time.
Logging Level Updates
server/pool.go
Switches four log messages from Debug to Info level: pool scaling finalization, VM start success, VM exit/cleanup, and scale-down confirmation. Message text is also updated. No functional behavior changes beyond increased log visibility.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing touches
  • 📝 Generate docstrings

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

@konradasb konradasb merged commit 5001183 into main Jan 28, 2026
3 of 4 checks passed
@konradasb konradasb deleted the fix-reuse-github-client-per-installation branch January 28, 2026 10:38
@hostingerbot hostingerbot bot mentioned this pull request Jan 28, 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