Skip to content
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

fixed some bugs #46950

Merged
merged 2 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Provisioning.CloudMac
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Provisioning.CloudMachine.Tests", "tests\Azure.Provisioning.CloudMachine.Tests.csproj", "{46DCEF27-4157-4FB6-A283-B8484EC45665}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.CloudMachine", "..\..\cloudmachine\Azure.CloudMachine\src\Azure.CloudMachine.csproj", "{AE9C0E9B-27D9-4220-98DA-0CB6A7936277}"
KrzysztofCwalina marked this conversation as resolved.
Show resolved Hide resolved
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.CloudMachine.Tests", "..\..\cloudmachine\Azure.CloudMachine\tests\Azure.CloudMachine.Tests.csproj", "{246D5F77-0151-40C5-8644-26A468A57CDC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Provisioning.Deployment", "..\Azure.Provisioning.Deployment\src\Azure.Provisioning.Deployment.csproj", "{4562F8C1-9FE3-4B68-BBB2-D052B49C915A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -21,6 +27,18 @@ Global
{46DCEF27-4157-4FB6-A283-B8484EC45665}.Debug|Any CPU.Build.0 = Debug|Any CPU
{46DCEF27-4157-4FB6-A283-B8484EC45665}.Release|Any CPU.ActiveCfg = Release|Any CPU
{46DCEF27-4157-4FB6-A283-B8484EC45665}.Release|Any CPU.Build.0 = Release|Any CPU
{AE9C0E9B-27D9-4220-98DA-0CB6A7936277}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE9C0E9B-27D9-4220-98DA-0CB6A7936277}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE9C0E9B-27D9-4220-98DA-0CB6A7936277}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE9C0E9B-27D9-4220-98DA-0CB6A7936277}.Release|Any CPU.Build.0 = Release|Any CPU
{246D5F77-0151-40C5-8644-26A468A57CDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{246D5F77-0151-40C5-8644-26A468A57CDC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{246D5F77-0151-40C5-8644-26A468A57CDC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{246D5F77-0151-40C5-8644-26A468A57CDC}.Release|Any CPU.Build.0 = Release|Any CPU
{4562F8C1-9FE3-4B68-BBB2-D052B49C915A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4562F8C1-9FE3-4B68-BBB2-D052B49C915A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4562F8C1-9FE3-4B68-BBB2-D052B49C915A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4562F8C1-9FE3-4B68-BBB2-D052B49C915A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public override void AddTo(CloudMachineInfrastructure cloudMachine)
CognitiveServicesAccountDeployment? chat = default;
if (Chat != default)
{
chat = new("openai_deployment_chat", "2023-05-01")
chat = new("openai_deployment_chat", "2024-06-01-preview")
{
Parent = cognitiveServices,
Name = cloudMachine.Id,
Expand All @@ -55,15 +55,22 @@ public override void AddTo(CloudMachineInfrastructure cloudMachine)
Name = Chat.Model,
Format = "OpenAI",
Version = Chat.ModelVersion
}
},
VersionUpgradeOption = DeploymentModelVersionUpgradeOption.OnceNewDefaultVersionAvailable,
RaiPolicyName = "Microsoft.DefaultV2",
},
Sku = new CognitiveServicesSku
{
Capacity = 120,
Name = "Standard"
}
};
cloudMachine.AddResource(chat);
}

if (Embeddings != null)
{
CognitiveServicesAccountDeployment embeddings = new("openai_deployment_embedding", "2023-05-01")
CognitiveServicesAccountDeployment embeddings = new("openai_deployment_embedding", "2024-06-01-preview")
{
Parent = cognitiveServices,
Name = $"{cloudMachine.Id}-embedding",
Expand All @@ -76,6 +83,11 @@ public override void AddTo(CloudMachineInfrastructure cloudMachine)
Version = Embeddings.ModelVersion
}
},
Sku = new CognitiveServicesSku
{
Capacity = 120,
Name = "Standard"
}
};

// Ensure that additional deployments, are chained using DependsOn.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ public CloudMachineInfrastructure(string cmId)
{
TopicType = "Microsoft.Storage.StorageAccounts",
Source = _storage.Id,
Identity = managedServiceIdentity,
Identity = new()
{
ManagedServiceIdentityType = ManagedServiceIdentityType.UserAssigned,
UserAssignedIdentities = { { BicepFunction.Interpolate($"{Identity.Id}").Compile().ToString(), new UserAssignedIdentityDetails() } }
},
Name = _cmid
};
_eventGridSubscription_blobs = new("cm_eventgrid_subscription_blob", "2022-06-15")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class CloudMachineTests
{
[Theory]
[TestCase([new string[] { "-bicep" }])]
[TestCase([new string[] { "" }])]
[TestCase([new string[] { }])]
public void Provisioning(string[] args)
{
CloudMachineInfrastructure.Configure(args, (cm) =>
Expand Down