Skip to content

GA azure-compute-batch package #44775

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

Open
wants to merge 74 commits into
base: main
Choose a base branch
from
Open

GA azure-compute-batch package #44775

wants to merge 74 commits into from

Conversation

skapur12
Copy link
Member

@skapur12 skapur12 commented Mar 24, 2025

Description

Port the Azure Batch Java Track 2 SDK to GA (General Availability) status
Includes a minor update from our latest TypeSpec to fix naming for properties with adjacent capital cases

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@github-actions github-actions bot added the Batch label Mar 24, 2025
@azure-sdk
Copy link
Collaborator

azure-sdk commented Mar 24, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

com.azure:azure-compute-batch

@skapur12 skapur12 force-pushed the sanjanakapur/ga-batch-sdk branch 2 times, most recently from cf554e5 to d393bef Compare March 28, 2025 23:37
@skapur12 skapur12 force-pushed the sanjanakapur/ga-batch-sdk branch from e6e58b7 to 8ca1653 Compare April 29, 2025 22:41
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

com.azure:azure-compute-batch

@skapur12 skapur12 marked this pull request as ready for review May 22, 2025 00:34
@Copilot Copilot AI review requested due to automatic review settings May 22, 2025 00:34
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request prepares the Azure Batch Java SDK for GA status by updating naming conventions, data types (e.g., converting timeouts to Duration), and method signatures in order to enhance consistency and clarity across the API. Key changes include renaming multiple models and their methods (e.g., BatchCertificateDeleteOptions, BatchAllTasksCompleteMode, etc.), updates to handle binary data for certificates, and adjustments in task submission interfaces and error handling.

Reviewed Changes

Copilot reviewed 178 out of 178 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
BatchCertificateDeleteOptions.java Renamed class and updated timeout type from Integer to Duration using Long internally.
BatchCertificateDeleteError.java Renamed class and updated documentation accordingly.
BatchCertificateCreateOptions.java, BatchCertificateCancelDeletionOptions.java Similar renaming and timeout updates.
BatchCertificate.java Changed certificate data type from String to byte[] and updated JSON serialization.
BatchApplicationsListOptions.java, BatchApplicationGetOptions.java Updated timeout getters/setters to use Duration.
BatchAllTasksCompleteMode.java, BatchAffinityInfo.java Renamed classes to adhere to naming guidelines.
AzureFileShareConfiguration.java Adjusted parameter ordering in constructor; updated assignment sequence and Javadoc parameter order.
AuthenticationTokenSettings.java, AccessScope.java Renamed types to reflect new BatchAccessScope usage.
TaskSubmitter.java, TaskManager.java, SyncTaskSubmitter.java, AsyncTaskSubmitter.java Updated task submission result types and parameter types to use the new naming convention for task creation.
pom.xml, CHANGELOG.md, version_client.txt Updated version information and documented comprehensive breaking and naming changes.

@@ -210,8 +196,8 @@ public DeleteBatchCertificateError getDeleteCertificateError() {
* @return the data value.
*/
@Generated
public String getData() {
return this.data;
public byte[] getData() {
Copy link
Preview

Copilot AI May 22, 2025

Choose a reason for hiding this comment

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

Consider performing a defensive copy of the input byte array in the constructor to ensure immutability, similar to the cloning performed in the getter.

Copilot uses AI. Check for mistakes.

* @param relativeMountPath the relativeMountPath value to set.
*/
@Generated
public AzureFileShareConfiguration(String accountName, String azureFileUrl, String accountKey,
public AzureFileShareConfiguration(String accountName, String accountKey, String azureFileUrl,
Copy link
Preview

Copilot AI May 22, 2025

Choose a reason for hiding this comment

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

Update the Javadoc parameter list to reflect the new signature order (accountName, accountKey, azureFileUrl, relativeMountPath) to avoid confusion for API consumers.

Copilot uses AI. Check for mistakes.

@weidongxu-microsoft
Copy link
Member

weidongxu-microsoft commented May 27, 2025

nit, please use code snippet to write samples in readme.md
https://github.com/Azure/azure-sdk-tools/blob/main/packages/java-packages/codesnippet-maven-plugin/README.md#injecting-codesnippets-into-readmes
(avoid directly write sample in md, as they could get outdated, while your SDK evolves)

Here, we can see some samples in readme.md is no longer valid
e.g.

```java
BatchServiceClientBuilder batchClientBuilder = new BatchServiceClientBuilder()
.endpoint(batchEndpoint)
.httpClient(HttpClient.createDefault());
BatchSharedKeyCredentials sharedKeyCred = new BatchSharedKeyCredentials(batchEndpoint, accountName, accountKey);
batchClientBuilder.credential(sharedKeyCred);
```

but there is no BatchServiceClientBuilder or BatchServiceClient.

@skapur12 skapur12 force-pushed the sanjanakapur/ga-batch-sdk branch from 933609d to aa8e2fd Compare May 28, 2025 18:51
@skapur12 skapur12 force-pushed the sanjanakapur/ga-batch-sdk branch from 773d443 to 71b26c3 Compare June 17, 2025 21:53
@skapur12 skapur12 force-pushed the sanjanakapur/ga-batch-sdk branch from 6d79254 to 11c1aac Compare June 18, 2025 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants