Clean up some of the pending TODO comments#3015
Open
jamis wants to merge 2 commits intomongodb:masterfrom
Open
Clean up some of the pending TODO comments#3015jamis wants to merge 2 commits intomongodb:masterfrom
jamis wants to merge 2 commits intomongodb:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes/updates long-standing TODOs by replacing ad-hoc OCSP response patching with a dedicated wrapper type, modernizing ClusterTime comparisons, and clarifying intent in a few internal comments.
Changes:
- Introduce
Mongo::Socket::OcspVerifier::Response(aSimpleDelegator) to carry OCSP responder URI metadata without monkey-patching stdlib objects. - Use
ComparableforMongo::ClusterTimeand drop now-redundant custom comparison operator methods. - Remove/replace several stale TODO comments and adjust related documentation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/mongo/socket/ocsp_verifier.rb | Adds Response delegator wrapper and uses it instead of mutating OpenSSL::OCSP::SingleResponse. |
| lib/mongo/socket/ocsp_cache.rb | Updates cache-value documentation to reference the new wrapper type. |
| lib/mongo/protocol/msg.rb | Removes a stale TODO comment in maybe_encrypt. |
| lib/mongo/operation/result.rb | Removes a stale TODO comment about nil replies. |
| lib/mongo/cluster/reapers/cursor_reaper.rb | Replaces TODO with explanatory comment when a server can’t be found for a killspec. |
| lib/mongo/cluster_time.rb | Includes Comparable and removes custom <, <=, >, >= implementations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
19
to
23
| # This module caches OCSP responses for their indicated validity time. | ||
| # | ||
| # The key is the CertificateId used for the OCSP request. | ||
| # The value is the SingleResponse. | ||
| # The value is an OcspVerifier::Response. | ||
| # |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A lot of the
TODOcomments in the code have been there for a while. This PR removes some of the low-hanging fruit.