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

Fixing several issues in Azure Batch contribution #3

Merged
merged 1 commit into from
May 18, 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 @@ -46,7 +46,7 @@

protected override void ValidateResourceType()
{
if (Name.MatchesConstraints(3, 24, StringExtensions.CharacterClass.LowercaseLetter))
if (!AccountName.MatchesConstraints(3, 24, StringExtensions.CharacterClass.LowercaseLetter))
Copy link
Owner

Choose a reason for hiding this comment

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

Ah yes, this "Name" has tripped me up a couple of times too given the ambiguity, something else to look at for the internal API.

{
throw new InvalidOperationException(
"Name must be between 3-24 characters and must contain only lowercase letters and numbers");
Expand Down Expand Up @@ -159,12 +159,12 @@
}
networkProfileBag.AddProperty(accountAccessBag);


//NOde management access
//Node management access
var nodeManagementAccessBag = new BicepResourcePropertyBag("nodeManagementAccess", 3)
.AddProperty("defaultAccess",
new BicepStringValue(
Properties.NetworkProfile.NodeManagementAccess.DefaultAction.GetValueFromEnumMember()));
networkProfileBag.AddProperty(nodeManagementAccessBag);

var nodeIpRules = new BicepResourcePropertyArray("ipRules", 4);
foreach (var rule in Properties.NetworkProfile.NodeManagementAccess.IpRules)
Expand Down Expand Up @@ -309,7 +309,7 @@
/// <summary>
/// Network access profile for batchAccount endpoint (Batch account data plane API).
/// </summary>
public EndpointAccessProfile AccountAccess { get; set; }

Check warning on line 312 in src/Achieve.Aspire.AzureProvisioning/Bicep/Batch/BatchAccountResource.cs

View workflow job for this annotation

GitHub Actions / test

Non-nullable property 'AccountAccess' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
/// <summary>
/// Network access profile for nodeManagement endpoint (Batch service managing compute
/// nodes for Batch pools.
Expand Down Expand Up @@ -338,7 +338,7 @@
/// <summary>
/// IPv4 address, or IPv4 address range in CIDR format.
/// </summary>
public string Value { get; set; }

Check warning on line 341 in src/Achieve.Aspire.AzureProvisioning/Bicep/Batch/BatchAccountResource.cs

View workflow job for this annotation

GitHub Actions / test

Non-nullable property 'Value' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
}

public enum BatchAccountIdentityType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@

public string Thumbprint { get; set; }

public string ThumbprintAlgorithm => "SHA1";
public static string ThumbprintAlgorithm => "SHA1";


public BatchCertificateResource(BatchAccountResource parent, string name) : base(resourceType)

Check warning on line 25 in src/Achieve.Aspire.AzureProvisioning/Bicep/Batch/BatchCertificateResource.cs

View workflow job for this annotation

GitHub Actions / test

Non-nullable property 'Data' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 25 in src/Achieve.Aspire.AzureProvisioning/Bicep/Batch/BatchCertificateResource.cs

View workflow job for this annotation

GitHub Actions / test

Non-nullable property 'Thumbprint' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
{
Parent = parent;
Name = name;
Expand Down
Loading