Skip to content

Commit

Permalink
Recommendation file path fix (#2414)
Browse files Browse the repository at this point in the history
* Revert "Path fix for macos (#2413)"

This reverts commit fb1bee4.

* path issue fix

---------

Co-authored-by: ROSHAN SAHU <roshansahu@microsoft.com>
  • Loading branch information
sahuroshan and ROSHAN SAHU authored Oct 18, 2024
1 parent fb1bee4 commit 7bb443d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Microsoft.SqlTools.Migration/MigrationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -606,14 +606,14 @@ internal async Task HandleEstablishUserMapping(
/// Handle request generate the ARM template.
/// </summary>
internal async Task HandleGetArmTemplateRequest(
string skuRecommendationReportFileName,
string targetType,
RequestContext<List<string>> requestContext)
{
try
{
ProvisioningScriptServiceProvider provider = new ProvisioningScriptServiceProvider();
string skuRecommendationReportFilePath = Path.Combine(SqlAssessmentConfiguration.ReportsAndLogsRootFolderPath, skuRecommendationReportFileName);
skuRecommendationReportFilePath += ".json";
string searchPattern = $"*{targetType}-Baseline*.json";
string skuRecommendationReportFilePath = Directory.GetFiles(SqlAssessmentConfiguration.ReportsAndLogsRootFolderPath, searchPattern).FirstOrDefault();
List<SkuRecommendationResult> recommendations = ExtractSkuRecommendationReportAction.ExtractSkuRecommendationsFromReport(skuRecommendationReportFilePath);
List<SqlArmTemplate> templateList = provider.GenerateProvisioningScript(recommendations);
List<string> armTemplates = new List<string>();
Expand Down

0 comments on commit 7bb443d

Please sign in to comment.