feat(CosmosDb): Add get method AccountEndpoint#1707
Conversation
✅ Deploy Preview for testcontainers-dotnet ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Walkthrough
ChangesCosmosDbContainer account endpoint extraction
Azurite endpoint method documentation updates
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/Testcontainers.CosmosDb/CosmosDbContainer.cs (2)
38-45: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick winAdd remarks section explaining design rationale.
Based on past review discussion, a
<remarks>section should be added to explain whyGetAccountEndpoint()is provided as a method (returns runtime information based on the mapped port) whileGetAccountKey()is not (the key is a static default accessible viaCosmosDbBuilder.DefaultAccountKey). As per coding guidelines, this documentation helps users understand the design decision and where to find the account key.📝 Proposed enhancement
/// <summary> - /// Gets the CosmosDb account endpoint + /// Gets the CosmosDb account endpoint. /// </summary> + /// <remarks> + /// This method returns runtime information (the mapped emulator endpoint). + /// The account key is a static default available via <see cref="CosmosDbBuilder.DefaultAccountKey"/>. + /// </remarks> /// <returns>The CosmosDb account endpoint</returns>🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/Testcontainers.CosmosDb/CosmosDbContainer.cs` around lines 38 - 45, Add a <remarks> XML documentation section to the GetAccountEndpoint() method that explains the design rationale. The remarks should clarify that this method returns runtime-specific information based on the dynamically mapped CosmosDbPort, and contrast this with GetAccountKey() which is not provided as a method since the account key is a static default value accessible via CosmosDbBuilder.DefaultAccountKey. This helps users understand where to obtain both the endpoint and the account key.
39-39:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAdd missing period for consistency.
The XML doc summary is missing a period at the end, inconsistent with other method documentation in this class (e.g., line 17).
📝 Proposed fix
- /// Gets the CosmosDb account endpoint + /// Gets the CosmosDb account endpoint.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/Testcontainers.CosmosDb/CosmosDbContainer.cs` at line 39, Add a period at the end of the XML documentation summary comment "Gets the CosmosDb account endpoint" to ensure consistency with the documentation style used elsewhere in the CosmosDbContainer class. The summary line should end with a period, matching the convention seen in other method documentation throughout the class.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/Testcontainers.CosmosDb/CosmosDbContainer.cs`:
- Around line 38-45: Add a <remarks> XML documentation section to the
GetAccountEndpoint() method that explains the design rationale. The remarks
should clarify that this method returns runtime-specific information based on
the dynamically mapped CosmosDbPort, and contrast this with GetAccountKey()
which is not provided as a method since the account key is a static default
value accessible via CosmosDbBuilder.DefaultAccountKey. This helps users
understand where to obtain both the endpoint and the account key.
- Line 39: Add a period at the end of the XML documentation summary comment
"Gets the CosmosDb account endpoint" to ensure consistency with the
documentation style used elsewhere in the CosmosDbContainer class. The summary
line should end with a period, matching the convention seen in other method
documentation throughout the class.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 1ef1d2fe-33eb-4320-a5ea-ba589280dda4
📒 Files selected for processing (1)
src/Testcontainers.CosmosDb/CosmosDbContainer.cs
What does this PR do?
Add getters for Cosmos DB AccountEndpoint and AccountKey
Why is it important?
Add a convenient way to access these properties
Related issues
Summary by CodeRabbit
New Features
Refactor
Documentation