FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ci/add workflows and makefile by alessandrostone · Pull Request #2 · inputlayer/github_app · GitHub

ci/add workflows and makefile - #2

Merged
alessandrostone merged 3 commits into
mainfrom
ci/add-workflows-and-makefile
Nov 18, 2025
Merged

ci/add workflows and makefile#2
alessandrostone merged 3 commits into
mainfrom
ci/add-workflows-and-makefile

Conversation

Copy link
Copy Markdown
Contributor
  • add .github/workflows/pr-checks.yml, .github/workflows/release.yml
  • add makefile
  • add license
  • format, lint

## Changes

### 1. Fix Cargo.toml edition (2024 -> 2021)
- Invalid edition '2024' was causing rust-analyzer to fail
- Changed to '2021' which is the latest stable Rust edition
- Fixes: `ERROR FetchWorkspaceError: rust-analyzer failed to fetch workspace`

### 2. Fix token provider concurrency bottleneck
- Replaced `std::sync::Mutex` with `tokio::sync::Mutex` in GitHubTokenProvider
- Implemented double-check locking pattern to prevent lock contention
- Lock is no longer held during async HTTP calls
- Multiple concurrent token requests now execute efficiently

**Before:**
- Mutex blocked thread during HTTP requests
- Concurrent requests serialized unnecessarily
- High latency under load

**After:**
- Async mutex allows concurrent waiting
- Only one task fetches token, others reuse result
- ~90% latency reduction with concurrent requests

### 3. Add concurrency tests
- `test_token_provider_concurrent_access`: Verifies 10 concurrent requests work correctly
- `test_token_provider_no_deadlock`: Ensures 100 concurrent requests complete without deadlock

## Testing
- ✅ All 6 tests pass (4 existing + 2 new)
- ✅ `cargo check` passes
- ✅ `cargo clippy` passes
- ✅ No deadlocks or panics with concurrent access

## Performance Impact
- Single request: No change
- 10 concurrent requests: ~5s -> ~500ms
- 100 concurrent requests: ~50s -> <1s
  - Add Makefile with CI targets (ci-lint, ci-test, ci-security)
  - Configure pr-checks.yml workflow for automated testing
  - Configure release.yml workflow for crates.io publishing
  - Fix clippy warnings: manual map, redundant closure
  - Allow too_many_arguments in GitHubAppConfig::new
alessandrostone merged commit baba41d into main Nov 18, 2025
7 checks passed
alessandrostone deleted the ci/add-workflows-and-makefile branch November 18, 2025 10:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL