Skip to content

sql registration fix #27772

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

Merged
merged 4 commits into from
May 21, 2025
Merged

sql registration fix #27772

merged 4 commits into from
May 21, 2025

Conversation

kumarutkarsh3b2166
Copy link
Contributor

@kumarutkarsh3b2166 kumarutkarsh3b2166 commented May 15, 2025

Description

This PR adds check to compare the VM resource group in the list of VMs returned for registration

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

Copy link

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

Copy link
Contributor

Thank you for your contribution @kumarutkarsh3b2166! We will review the pull request and get back to you soon.

@@ -101,6 +101,7 @@ public override void ExecuteCmdlet()
ResourceIdentifier resourceIdentifier = new ResourceIdentifier(VaultId);
string vaultName = resourceIdentifier.ResourceName;
string vaultResourceGroupName = resourceIdentifier.ResourceGroupName;
string vmResourceGroupName = Container != null ? Container.Name : ResourceId.Split('/')[4];
Copy link
Member

Choose a reason for hiding this comment

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

  1. why are we initializing the vmResourceGroupName = container.Name ?
  2. )[4] - we shouldn't use the index, we have common funtion to extract resourcegroupname from ARMIDs in general.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

corrected, using vault rg name by default now

@msJinLei
Copy link
Contributor

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@msJinLei
Copy link
Contributor

  "Directory","Assembly Name","Assembly Version","Referencing Assembly","Severity","ProblemId","Description","Remediation"
  "D:\a\_work\1\s\artifacts//Debug\Az.RecoveryServices","Azure.Storage.Blobs","12.13.0.0","Microsoft.Azure.Commands.Compute.AlcWrapper","0","3000","Missing assembly Azure.Storage.Blobs referenced from Microsoft.Azure.Commands.Compute.AlcWrapper","Ensure that the assembly is included in the Wix file or directory"

@@ -12,6 +12,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\Compute\Compute\Compute.csproj" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't reference csproject of other modules in your non-test csproject. You can refer package directly

Copy link

This PR was labeled "needs-revision" because it has unresolved review comments or CI failures.
Please resolve all open review comments and make sure all CI checks are green. Refer to our guide to troubleshoot common CI failures.

@msJinLei
Copy link
Contributor

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@msJinLei msJinLei merged commit 8441f8c into Azure:main May 21, 2025
12 checks passed
{
AzureVmWorkloadContainer azureVmWorkloadContainer = (AzureVmWorkloadContainer)Container;
Dictionary<UriEnums, string> keyValueDict = HelperUtils.ParseUri(azureVmWorkloadContainer.SourceResourceId);
vmResourceGroupParsed = HelperUtils.GetResourceGroupNameFromId(keyValueDict, ResourceId);
Copy link
Member

Choose a reason for hiding this comment

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

pass SourceResourceId here instead of ResourceId

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants