Skip to content

PSH comdlets for MongoDB initial release #27833

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yashikajain14
Copy link

@yashikajain14 yashikajain14 commented May 24, 2025

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

@Copilot Copilot AI review requested due to automatic review settings May 24, 2025 12:44
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces the initial release of PowerShell cmdlets for MongoDB by adding various auto‐generated files, tests, documentation, examples, and custom implementations. Key changes include the addition of test recordings (JSON), new test scripts and examples for cmdlets (e.g. New‑AzMongoDBOrganization, Get‑AzMongoDBOrganization, Remove‑AzMongoDBOrganization), and expanded module documentation and build scripts.

Reviewed Changes

Copilot reviewed 40 out of 40 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/MongoDB/MongoDB.Autorest/test/New-AzMongoDBOrganization.Recording.json Recorded HTTP interactions for creating a MongoDB organization resource.
src/MongoDB/MongoDB.Autorest/test/Get-AzMongoDBOrganization.Tests.ps1 Test script for Get‑AzMongoDBOrganization cmdlet with basic functional validation.
src/MongoDB/MongoDB.Autorest/test/Get-AzMongoDBOrganization.Recording.json Recorded HTTP interactions for retrieving MongoDB organizations.
src/MongoDB/MongoDB.Autorest/resources/README.md Additional resources file outlining usage for non-runtime assets.
src/MongoDB/MongoDB.Autorest/how-to.md Developer guidance for building, testing, and packaging the module.
(Other docs, examples, custom scripts, and configuration files) Various supporting files to facilitate cmdlet generation, custom cmdlets, and module packaging.
Comments suppressed due to low confidence (1)

src/MongoDB/MongoDB.Autorest/test/Get-AzMongoDBOrganization.Tests.ps1:18

  • [nitpick] The current test only verifies that some results are returned; adding scenarios for error cases or invalid inputs could improve test coverage and robustness of the cmdlet.
It 'Get' {

. ($loadEnvPath)
$TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzMongoDBOrganization.Recording.json'
$currentPath = $PSScriptRoot
while(-not $mockingPath) {
Copy link
Preview

Copilot AI May 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider initializing $mockingPath (e.g. set $mockingPath = $null) before the while loop and adding a termination condition (such as checking if $currentPath becomes empty) to avoid a potential infinite loop if 'HttpPipelineMocking.ps1' is not found.

Suggested change
while(-not $mockingPath) {
$mockingPath = $null
while(-not $mockingPath -and $currentPath) {

Copilot uses AI. Check for mistakes.

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