-
Notifications
You must be signed in to change notification settings - Fork 11
fix: cleanup obsoleted legacy api keys on api startup #1630
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
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds a startup-time cleanup in api-key.service to delete legacy internal API keys (CliInternal, ConnectInternal) from memory and persist deletion before enabling file watching. The cleanup is invoked in onModuleInit after loading keys. Success and failure paths are logged. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Module as ApiKeyService (module)
participant Store as memoryApiKeys
participant Deleter as deleteApiKeys
participant Watcher as File Watcher
participant Log as Logger
Note over Module: onModuleInit()
Module->>Store: loadAllKeys()
Store-->>Module: keys loaded
rect rgba(223,245,255,0.4)
Note over Module,Deleter: Startup cleanup of legacy keys (new)
Module->>Module: cleanupLegacyInternalKeys()
Module->>Store: find keys by name [CliInternal, ConnectInternal]
alt Keys found
Module->>Deleter: deleteApiKeys([legacyIds])
Deleter-->>Module: deletion result
Module->>Log: info/debug cleanup count
else None found or error
Module->>Log: debug failure or zero cleaned
end
end
Module->>Watcher: enable file watching
Watcher-->>Module: watching for changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Claude finished @pujitm's task —— View job Code Review CompleteTodo List:
Review Findings✅ No critical issues found in changes The added cleanup logic (lines 38, 44-59) appears safe:
The implementation follows existing patterns and doesn't introduce security, logic, or data loss risks. |
|
This plugin has been deployed to Cloudflare R2 and is available for testing. |
🤖 I have created a release *beep* *boop* --- ## [4.17.0](v4.16.0...v4.17.0) (2025-08-27) ### Features * add tailwind class sort plugin ([#1562](#1562)) ([ab11e7f](ab11e7f)) ### Bug Fixes * cleanup obsoleted legacy api keys on api startup (cli / connect) ([#1630](#1630)) ([6469d00](6469d00)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary by CodeRabbit
Bug Fixes
Chores