Skip to content
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
16 changes: 11 additions & 5 deletions sdk/batch/Microsoft.Azure.Batch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# Release History

## 15.2.0-beta.1 (Unreleased)
## 15.3.0 (2022-01-07)

### Features Added

### Breaking Changes
- Added property `UploadHeaders` to `OutputFileBlobContainerDestination`.
- Allows users to set custom HTTP headers on resource file uploads.
- Array of type `HttpHeader` (also being added).
- Added boolean property `AllowTaskPreemption` to `JobSpecification`, `CloudJob`, `JobAddParameter`, `JobPatchParameter`, `JobUpdateParameter`
- Mark Tasks as preemptible for higher priority Tasks (requires Comms-Enabled or Single Tenant Pool).
- Replaced comment (title, description, etc.) references of "low-priority" with "Spot/Low-Priority", to reflect new service behavior.
- No API change required.
- Low-Priority Compute Nodes (VMs) will continue to be used for User Subscription pools (and only User Subscription pools), as before.
- Spot Compute Nodes (VMs) will now be used for Batch Managed (and only Batch Managed pools) pools.

### Bugs Fixed

### Other Changes

## 15.2.0 (2021-08-10)
- Fixed OutputFileBlobContainerDestination constructor null reference exception.

## Features Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,17 @@
"UnboundAccess": "read,write"
},
"Value": null
},
{
"Key": {
"Type": "bool?",
"Name": "AllowTaskPreemption",
"SummaryComment": "Whether Tasks in this job can be preempted by other high priority jobs.",
"RemarksComment": "If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API.",
"BoundAccess": "read,write",
"UnboundAccess": "read,write"
},
"Value": null
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"Name": "HttpHeader",
"ProtocolName": "Models.HttpHeader",
"SummaryComment": "An HTTP header name-value pair",
"IsUsedInCollections": true,
"Properties": [
{
"Key": {
"Type": "string",
"Name": "Name",
"SummaryComment": "The case-insensitive name of the header to be used while uploading output files.",
"RemarksComment": null,
"BoundAccess": "read,write",
"UnboundAccess": "read,write",
"ConstructorArgumentType": "Required"
},
"Value": null
},
{
"Key": {
"Type": "string",
"Name": "Value",
"SummaryComment": "The value of the header to be used while uploading output files.",
"RemarksComment": null,
"BoundAccess": "read,write",
"UnboundAccess": "read,write",
"ConstructorArgumentType": "Required"
},
"Value": null
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,17 @@
"UnboundAccess": "read,write"
},
"Value": null
},
{
"Key": {
"Type": "bool?",
"Name": "AllowTaskPreemption",
"SummaryComment": "Whether Tasks in this job can be preempted by other high priority jobs.",
"RemarksComment": "If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API.",
"BoundAccess": "read,write",
"UnboundAccess": "read,write"
},
"Value": null
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@
"UnboundAccess": "read,write"
},
"Value": null
},
{
"Key": {
"Type": "IList<HttpHeader>",
"Name": "UploadHeaders",
"SummaryComment": "A list of name-value pairs for headers to be used in uploading output files.",
"RemarksComment": "These headers will be specified when uploading files to Azure Storage. For more information, see [Request Headers (All Blob Types)](https://docs.microsoft.com/rest/api/storageservices/put-blob#request-headers-all-blob-types).",
"BoundAccess": "read",
"UnboundAccess": "read,write",
"ConstructorArgumentType": "None"
},
"Value": null
}
]
}
9 changes: 6 additions & 3 deletions sdk/batch/Microsoft.Azure.Batch/src/CloudJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ public async Task CommitAsync(
Models.PoolInformation modelPoolInformation = UtilitiesInternal.CreateObjectWithNullCheck(this.PoolInformation, item => item.GetTransportObject());

asyncTask = this.parentBatchClient.ProtocolLayer.UpdateJob(
this.Id,
this.Priority,
Id,
Priority,
UtilitiesInternal.MapNullableEnum<Common.OnAllTasksComplete, Models.OnAllTasksComplete>(this.OnAllTasksComplete),
modelPoolInformation,
modelJobConstraints,
MaxParallelTasks,
AllowTaskPreemption,
modelMetadata,
behaveMgr,
cancellationToken);
Expand Down Expand Up @@ -124,9 +126,10 @@ public async Task CommitChangesAsync(
int? maxParallelTasks = this.propertyContainer.MaxParallelTasksProperty.GetIfChangedOrNull();

Task asyncTask = this.parentBatchClient.ProtocolLayer.PatchJob(
this.Id,
Id,
priority,
maxParallelTasks,
AllowTaskPreemption,
UtilitiesInternal.MapNullableEnum<Common.OnAllTasksComplete, Models.OnAllTasksComplete>(this.OnAllTasksComplete),
modelPoolInformation,
modelJobConstraints,
Expand Down
21 changes: 21 additions & 0 deletions sdk/batch/Microsoft.Azure.Batch/src/Generated/CloudJob.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

178 changes: 178 additions & 0 deletions sdk/batch/Microsoft.Azure.Batch/src/Generated/HttpHeader.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading