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
47 changes: 46 additions & 1 deletion sdk/batch/azure-batch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,52 @@

### Other Changes

- This is the GA release of the features introduced in the 15.0.0 and 15.1.0 beta versions, including LRO support, job-level FIFO scheduling, CMK support on pools, IPv6 support, metadata security protocol support, IP tag support, and confidential VM enhancements. No additional changes were made from the last beta release.
- This is the GA release of the features introduced in the 15.0.0 and 15.1.0 beta versions, including LRO support, job-level FIFO scheduling, CMK support on pools, IPv6 support, metadata security protocol support, IP tag support, and confidential VM enhancements.

### Breaking Changes

- Renamed `BatchNodeUserUpdateOptions` to `BatchNodeUserReplaceOptions`.
- Renamed `OutputFileUploadConfig` to `OutputFileUploadConfiguration`.

- Removed Models:
- Removed `AuthenticationTokenSettings`

- NameSpace changed `azure.batch.models._models`:
- `BatchJobTerminateOptions`
- `BatchNodeDeallocateOptions`
- `BatchNodeRebootOptions`
- `BatchNodeReimageOptions`

- Removed Enums:
- Removed `BatchAccessScope`

- NameSpace changed `azure.batch.models._enums`:
- `BatchNodeDeallocateOption`
- `BatchNodeRebootKind`
- `BatchNodeReimageOption`

- Renamed public methods:
- `list_sub_tasks` -> `list_subtasks`
- `get_task_file` -> `download_task_file`
- `get_node_file` -> `download_node_file`

- Renamed parameters across all operation methods:
- `timeout` -> `service_timeout`
- `ocpdate` -> `ocp_date`
- `starttime` -> `start_time`
- `endtime` -> `end_time`
- `concurrencies` -> `max_concurrency`

Comment thread
wiboris marked this conversation as resolved.
- Renamed properties in models:
- `e_tag` -> `etag` in `BatchJob`, `BatchJobSchedule`, `BatchPool`, `BatchTask`, and `BatchTaskCreateResult`
- `values_property` -> `error_values` in `AutoScaleRunError`, `BatchError`, and `ResizeError`
- `values_property` -> `result_values` in `CollectionResult`
- `values_property` -> `task_values` in `BatchTaskGroup`
- `avg_memory_gi_b` -> `avg_memory_gib`, `peak_memory_gi_b` -> `peak_memory_gib`, `avg_disk_gi_b` -> `avg_disk_gib`, `peak_disk_gi_b` -> `peak_disk_gib`, `disk_read_gi_b` -> `disk_read_gib`, `disk_write_gi_b` -> `disk_write_gib`, `network_read_gi_b` -> `network_read_gib`, `network_write_gi_b` -> `network_write_gib` in `BatchPoolResourceStatistics`

- Removed Properties:
- Removed `authentication_token_settings` from `BatchJobManagerTask`, `BatchStartTask`, and `BatchTask`
- Removed `access` from `AuthenticationTokenSettings`

## 15.1.0b3 (2026-02-05)

Expand Down
14 changes: 7 additions & 7 deletions sdk/batch/azure-batch/apiview-properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"azure.batch.models.OutputFile": "Azure.Batch.OutputFile",
"azure.batch.models.OutputFileBlobContainerDestination": "Azure.Batch.OutputFileBlobContainerDestination",
"azure.batch.models.OutputFileDestination": "Azure.Batch.OutputFileDestination",
"azure.batch.models.OutputFileUploadConfig": "Azure.Batch.OutputFileUploadConfig",
"azure.batch.models.OutputFileUploadConfiguration": "Azure.Batch.OutputFileUploadConfig",
"azure.batch.models.OutputFileUploadHeader": "Azure.Batch.OutputFileUploadHeader",
"azure.batch.models.ProxyAgentSettings": "Azure.Batch.ProxyAgentSettings",
"azure.batch.models.RecentBatchJob": "Azure.Batch.RecentBatchJob",
Expand Down Expand Up @@ -269,16 +269,16 @@
"azure.batch.aio.BatchClient.get_task": "Client.BatchClient.getTask",
"azure.batch.BatchClient.replace_task": "Client.BatchClient.replaceTask",
"azure.batch.aio.BatchClient.replace_task": "Client.BatchClient.replaceTask",
"azure.batch.BatchClient.list_sub_tasks": "Client.BatchClient.listSubTasks",
"azure.batch.aio.BatchClient.list_sub_tasks": "Client.BatchClient.listSubTasks",
"azure.batch.BatchClient.list_subtasks": "Client.BatchClient.listSubTasks",
"azure.batch.aio.BatchClient.list_subtasks": "Client.BatchClient.listSubTasks",
"azure.batch.BatchClient.terminate_task": "Client.BatchClient.terminateTask",
"azure.batch.aio.BatchClient.terminate_task": "Client.BatchClient.terminateTask",
"azure.batch.BatchClient.reactivate_task": "Client.BatchClient.reactivateTask",
"azure.batch.aio.BatchClient.reactivate_task": "Client.BatchClient.reactivateTask",
"azure.batch.BatchClient.delete_task_file": "Client.BatchClient.deleteTaskFile",
"azure.batch.aio.BatchClient.delete_task_file": "Client.BatchClient.deleteTaskFile",
"azure.batch.BatchClient.get_task_file": "Client.BatchClient.getTaskFile",
"azure.batch.aio.BatchClient.get_task_file": "Client.BatchClient.getTaskFile",
"azure.batch.BatchClient.download_task_file": "Client.BatchClient.getTaskFile",
"azure.batch.aio.BatchClient.download_task_file": "Client.BatchClient.getTaskFile",
"azure.batch.BatchClient.list_task_files": "Client.BatchClient.listTaskFiles",
"azure.batch.aio.BatchClient.list_task_files": "Client.BatchClient.listTaskFiles",
"azure.batch.BatchClient.create_node_user": "Client.BatchClient.createNodeUser",
Expand All @@ -305,8 +305,8 @@
"azure.batch.aio.BatchClient.list_node_extensions": "Client.BatchClient.listNodeExtensions",
"azure.batch.BatchClient.delete_node_file": "Client.BatchClient.deleteNodeFile",
"azure.batch.aio.BatchClient.delete_node_file": "Client.BatchClient.deleteNodeFile",
"azure.batch.BatchClient.get_node_file": "Client.BatchClient.getNodeFile",
"azure.batch.aio.BatchClient.get_node_file": "Client.BatchClient.getNodeFile",
"azure.batch.BatchClient.download_node_file": "Client.BatchClient.getNodeFile",
"azure.batch.aio.BatchClient.download_node_file": "Client.BatchClient.getNodeFile",
"azure.batch.BatchClient.list_node_files": "Client.BatchClient.listNodeFiles",
"azure.batch.aio.BatchClient.list_node_files": "Client.BatchClient.listNodeFiles"
}
Expand Down
6 changes: 3 additions & 3 deletions sdk/batch/azure-batch/azure/batch/_model_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,16 +821,16 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur

# is it optional?
try:
if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore
if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore # pylint: disable=unidiomatic-typecheck
if len(annotation.__args__) <= 2: # pyright: ignore
if_obj_deserializer = _get_deserialize_callable_from_annotation(
next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore
next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore # pylint: disable=unidiomatic-typecheck
)

return functools.partial(_deserialize_with_optional, if_obj_deserializer)
# the type is Optional[Union[...]], we need to remove the None type from the Union
annotation_copy = copy.copy(annotation)
annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore
annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore # pylint: disable=unidiomatic-typecheck
return _get_deserialize_callable_from_annotation(annotation_copy, module, rf)
except AttributeError:
pass
Expand Down
18 changes: 9 additions & 9 deletions sdk/batch/azure-batch/azure/batch/_operations/_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,7 @@ def build_batch_replace_task_request(
return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)


def build_batch_list_sub_tasks_request(
def build_batch_list_subtasks_request(
job_id: str,
task_id: str,
*,
Expand Down Expand Up @@ -2139,7 +2139,7 @@ def build_batch_delete_task_file_request(
return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs)


def build_batch_get_task_file_request(
def build_batch_download_task_file_request(
job_id: str,
task_id: str,
file_path: str,
Expand Down Expand Up @@ -2862,7 +2862,7 @@ def build_batch_delete_node_file_request(
return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs)


def build_batch_get_node_file_request(
def build_batch_download_node_file_request(
pool_id: str,
node_id: str,
file_path: str,
Expand Down Expand Up @@ -8245,7 +8245,7 @@ def replace_task( # pylint: disable=inconsistent-return-statements
return cls(pipeline_response, None, response_headers) # type: ignore

@distributed_trace
Comment thread
wiboris marked this conversation as resolved.
def list_sub_tasks(
def list_subtasks(
self,
job_id: str,
task_id: str,
Expand Down Expand Up @@ -8293,7 +8293,7 @@ def list_sub_tasks(
def prepare_request(next_link=None):
if not next_link:

_request = build_batch_list_sub_tasks_request(
_request = build_batch_list_subtasks_request(
job_id=job_id,
task_id=task_id,
service_timeout=service_timeout,
Expand Down Expand Up @@ -8684,7 +8684,7 @@ def delete_task_file( # pylint: disable=inconsistent-return-statements
return cls(pipeline_response, None, response_headers) # type: ignore

@distributed_trace
def get_task_file(
def download_task_file(
self,
job_id: str,
task_id: str,
Expand Down Expand Up @@ -8744,7 +8744,7 @@ def get_task_file(

cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)

_request = build_batch_get_task_file_request(
_request = build_batch_download_task_file_request(
job_id=job_id,
task_id=task_id,
file_path=file_path,
Expand Down Expand Up @@ -10631,7 +10631,7 @@ def delete_node_file( # pylint: disable=inconsistent-return-statements
return cls(pipeline_response, None, response_headers) # type: ignore

@distributed_trace
def get_node_file(
def download_node_file(
self,
pool_id: str,
node_id: str,
Expand Down Expand Up @@ -10691,7 +10691,7 @@ def get_node_file(

cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)

_request = build_batch_get_node_file_request(
_request = build_batch_download_node_file_request(
pool_id=pool_id,
node_id=node_id,
file_path=file_path,
Expand Down
66 changes: 47 additions & 19 deletions sdk/batch/azure-batch/azure/batch/_operations/_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,13 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
),
)

polling_method = DeleteJobPollingMethod(self, pipeline_response, None, job_id, polling_interval)
polling_method = DeleteJobPollingMethod(
client=self,
initial_response=pipeline_response,
deserialization_callback=None,
job_id=job_id,
polling_interval=polling_interval,
)
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)

@distributed_trace
Expand Down Expand Up @@ -217,7 +223,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
),
)

polling_method = DisableJobPollingMethod(self, pipeline_response, None, job_id, polling_interval)
polling_method = DisableJobPollingMethod(
self, pipeline_response, None, job_id, polling_interval=polling_interval
)
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)

@distributed_trace
Expand Down Expand Up @@ -292,7 +300,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
),
)

polling_method = EnableJobPollingMethod(self, pipeline_response, None, job_id, polling_interval)
polling_method = EnableJobPollingMethod(
self, pipeline_response, None, job_id, polling_interval=polling_interval
)
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)

@distributed_trace
Expand Down Expand Up @@ -367,7 +377,7 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
)

polling_method = DeleteJobSchedulePollingMethod(
self, pipeline_response, None, job_schedule_id, polling_interval
self, pipeline_response, None, job_schedule_id, polling_interval=polling_interval
)
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)

Expand Down Expand Up @@ -450,7 +460,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
),
)

polling_method = DeletePoolPollingMethod(self, pipeline_response, None, pool_id, polling_interval)
polling_method = DeletePoolPollingMethod(
self, pipeline_response, None, pool_id, polling_interval=polling_interval
)
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)

@distributed_trace
Expand Down Expand Up @@ -506,7 +518,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
),
)

polling_method = DeallocateNodePollingMethod(self, pipeline_response, None, pool_id, node_id, polling_interval)
polling_method = DeallocateNodePollingMethod(
self, pipeline_response, None, pool_id, node_id=node_id, polling_interval=polling_interval
)
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)

@distributed_trace
Expand Down Expand Up @@ -562,7 +576,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
),
)

polling_method = RebootNodePollingMethod(self, pipeline_response, None, pool_id, node_id, polling_interval)
polling_method = RebootNodePollingMethod(
self, pipeline_response, None, pool_id, node_id=node_id, polling_interval=polling_interval
)
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)

@distributed_trace
Expand Down Expand Up @@ -622,7 +638,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
),
)

polling_method = ReimageNodePollingMethod(self, pipeline_response, None, pool_id, node_id, polling_interval)
polling_method = ReimageNodePollingMethod(
self, pipeline_response, None, pool_id, node_id=node_id, polling_interval=polling_interval
)
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)

@distributed_trace
Expand Down Expand Up @@ -699,7 +717,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
),
)

polling_method = RemoveNodePollingMethod(self, pipeline_response, None, pool_id, polling_interval)
polling_method = RemoveNodePollingMethod(
self, pipeline_response, None, pool_id, polling_interval=polling_interval
)
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)

@distributed_trace
Expand Down Expand Up @@ -780,7 +800,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
),
)

polling_method = ResizePoolPollingMethod(self, pipeline_response, None, pool_id, polling_interval)
polling_method = ResizePoolPollingMethod(
self, pipeline_response, None, pool_id, polling_interval=polling_interval
)
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)

@distributed_trace
Expand Down Expand Up @@ -832,7 +854,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
),
)

polling_method = StartNodePollingMethod(self, pipeline_response, None, pool_id, node_id, polling_interval)
polling_method = StartNodePollingMethod(
self, pipeline_response, None, pool_id, node_id=node_id, polling_interval=polling_interval
)
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)

@distributed_trace
Expand Down Expand Up @@ -909,7 +933,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
),
)

polling_method = StopPoolResizePollingMethod(self, pipeline_response, None, pool_id, polling_interval)
polling_method = StopPoolResizePollingMethod(
self, pipeline_response, None, pool_id, polling_interval=polling_interval
)
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)

@distributed_trace
Expand Down Expand Up @@ -994,7 +1020,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
),
)

polling_method = TerminateJobPollingMethod(self, pipeline_response, None, job_id, polling_interval)
polling_method = TerminateJobPollingMethod(
self, pipeline_response, None, job_id, polling_interval=polling_interval
)
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)

@distributed_trace
Expand Down Expand Up @@ -1070,7 +1098,7 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
)

polling_method = TerminateJobSchedulePollingMethod(
self, pipeline_response, None, job_schedule_id, polling_interval
self, pipeline_response, None, job_schedule_id, polling_interval=polling_interval
)
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)

Expand All @@ -1081,7 +1109,7 @@ def create_tasks(
job_id: str,
task_collection: List[_models.BatchTaskCreateOptions],
*,
max_concurrency: int = 0,
max_concurrency: Optional[int] = None,
Comment thread
annatisch marked this conversation as resolved.
service_timeout: Optional[int] = None,
ocp_date: Optional[datetime.datetime] = None,
**kwargs: Any
Expand Down Expand Up @@ -1161,7 +1189,7 @@ def create_tasks(
return _models.BatchCreateTaskCollectionResult(result_values=submitted_tasks)

@distributed_trace
def get_node_file(
def download_node_file(
self,
pool_id: str,
node_id: str,
Expand Down Expand Up @@ -1218,7 +1246,7 @@ def get_node_file(
}
)
kwargs["stream"] = True
return super().get_node_file(*args, **kwargs)
return super().download_node_file(*args, **kwargs)

@distributed_trace
def get_node_file_properties(
Expand Down Expand Up @@ -1357,7 +1385,7 @@ def cls(_pipeline_response, _json_response, headers):
return get_response

@distributed_trace
def get_task_file(
def download_task_file(
self,
job_id: str,
task_id: str,
Expand Down Expand Up @@ -1415,7 +1443,7 @@ def get_task_file(
}
)
kwargs["stream"] = True
return super().get_task_file(*args, **kwargs)
return super().download_task_file(*args, **kwargs)


def patch_sdk():
Expand Down
Loading