Skip to content

Commit

Permalink
Reset changes to the patch version.
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahimrabab committed Sep 9, 2022
1 parent 803d3cd commit 7bbdd38
Show file tree
Hide file tree
Showing 49 changed files with 230 additions and 1,259 deletions.
18 changes: 0 additions & 18 deletions sdk/storage/azure-storage-file-share/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
# Release History

## 12.16.0-beta.2 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 12.16.0-beta.1 (2022-09-06)

### Features Added
- Added support for 2021-10-04 service version.

### Bugs Fixed
- Fixed a bug that would cause auth failures when trying to rename a file share/directory share while authenticating with a sas.

## 12.15.0 (2022-08-12)

### Other Changes
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/azure-storage-file-share/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ add the direct dependency to your project as follows.
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-file-share</artifactId>
<version>12.16.0-beta.1</version>
<version>12.15.0</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
20 changes: 10 additions & 10 deletions sdk/storage/azure-storage-file-share/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>com.azure</groupId>
<artifactId>azure-storage-file-share</artifactId>
<version>12.16.0-beta.2</version> <!-- {x-version-update;com.azure:azure-storage-file-share;current} -->
<version>12.15.0</version> <!-- {x-version-update;com.azure:azure-storage-file-share;current} -->

<name>Microsoft Azure client library for File Share Storage</name>
<description>This module contains client library for Microsoft Azure File Share Storage.</description>
Expand Down Expand Up @@ -55,23 +55,23 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.32.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
<version>1.31.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
</dependency>

<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-netty</artifactId>
<version>1.12.5</version> <!-- {x-version-update;com.azure:azure-core-http-netty;dependency} -->
<version>1.12.4</version> <!-- {x-version-update;com.azure:azure-core-http-netty;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-common</artifactId>
<version>12.18.1</version> <!-- {x-version-update;com.azure:azure-storage-common;current} -->
<version>12.18.0</version> <!-- {x-version-update;com.azure:azure-storage-common;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-common</artifactId>
<version>12.18.1</version> <!-- {x-version-update;com.azure:azure-storage-common;current} -->
<version>12.18.0</version> <!-- {x-version-update;com.azure:azure-storage-common;current} -->
<classifier>tests</classifier>
<type>test-jar</type>
<scope>test</scope>
Expand All @@ -90,25 +90,25 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-test</artifactId>
<version>1.12.0</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
<version>1.11.0</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<version>3.4.22</version> <!-- {x-version-update;io.projectreactor:reactor-test;external_dependency} -->
<version>3.4.21</version> <!-- {x-version-update;io.projectreactor:reactor-test;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.5.5</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
<version>1.5.4</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-blob</artifactId>
<version>12.19.1</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} -->
<version>12.19.0</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} -->
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -132,7 +132,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-okhttp</artifactId>
<version>1.11.2</version> <!-- {x-version-update;com.azure:azure-core-http-okhttp;dependency} -->
<version>1.11.1</version> <!-- {x-version-update;com.azure:azure-core-http-okhttp;dependency} -->
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.credential.AzureSasCredential;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpResponse;
import com.azure.core.http.rest.PagedFlux;
Expand Down Expand Up @@ -96,7 +95,6 @@ public class ShareAsyncClient {
private final String snapshot;
private final String accountName;
private final ShareServiceVersion serviceVersion;
private final AzureSasCredential sasToken;

/**
* Creates a ShareAsyncClient that sends requests to the storage share at {@link AzureFileStorageImpl#getUrl()
Expand All @@ -105,17 +103,15 @@ public class ShareAsyncClient {
*
* @param client Client that interacts with the service interfaces
* @param shareName Name of the share
* @param sasToken The SAS token to use for authenticating requests.
*/
ShareAsyncClient(AzureFileStorageImpl client, String shareName, String snapshot, String accountName,
ShareServiceVersion serviceVersion, AzureSasCredential sasToken) {
ShareServiceVersion serviceVersion) {
Objects.requireNonNull(shareName, "'shareName' cannot be null.");
this.shareName = shareName;
this.snapshot = snapshot;
this.accountName = accountName;
this.azureFileStorageClient = client;
this.serviceVersion = serviceVersion;
this.sasToken = sasToken;
}

/**
Expand Down Expand Up @@ -149,10 +145,6 @@ public ShareServiceVersion getServiceVersion() {
return serviceVersion;
}

AzureSasCredential getSasToken() {
return sasToken;
}

/**
* Constructs a {@link ShareDirectoryAsyncClient} that interacts with the root directory in the share.
*
Expand All @@ -179,7 +171,7 @@ public ShareDirectoryAsyncClient getDirectoryClient(String directoryName) {
? ""
: directoryName;
return new ShareDirectoryAsyncClient(azureFileStorageClient, shareName, directoryName, snapshot, accountName,
serviceVersion, sasToken);
serviceVersion);
}

/**
Expand All @@ -193,7 +185,7 @@ public ShareDirectoryAsyncClient getDirectoryClient(String directoryName) {
*/
public ShareFileAsyncClient getFileClient(String filePath) {
return new ShareFileAsyncClient(azureFileStorageClient, shareName, filePath, snapshot, accountName,
serviceVersion, sasToken);
serviceVersion);
}

/**
Expand All @@ -204,7 +196,7 @@ public ShareFileAsyncClient getFileClient(String filePath) {
*/
public ShareAsyncClient getSnapshotClient(String snapshot) {
return new ShareAsyncClient(azureFileStorageClient, getShareName(), snapshot, getAccountName(),
getServiceVersion(), getSasToken());
getServiceVersion());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,13 @@ public ShareAsyncClient buildAsyncClient() {
storageSharedKeyCredential, null, azureSasCredential, sasToken, LOGGER);
ShareServiceVersion serviceVersion = version != null ? version : ShareServiceVersion.getLatest();

AzureSasCredential azureSasCredentialFromSasToken = sasToken != null ? new AzureSasCredential(sasToken) : null;

HttpPipeline pipeline = (httpPipeline != null) ? httpPipeline : BuilderHelper.buildPipeline(() -> {
if (storageSharedKeyCredential != null) {
return new StorageSharedKeyCredentialPolicy(storageSharedKeyCredential);
} else if (azureSasCredential != null) {
return new AzureSasCredentialPolicy(azureSasCredential, false);
} else if (sasToken != null) {
return new AzureSasCredentialPolicy(azureSasCredentialFromSasToken, false);
return new AzureSasCredentialPolicy(new AzureSasCredential(sasToken), false);
} else {
throw LOGGER.logExceptionAsError(
new IllegalArgumentException("Credentials are required for authorization"));
Expand All @@ -216,8 +214,7 @@ public ShareAsyncClient buildAsyncClient() {
.version(serviceVersion.getVersion())
.buildClient();

return new ShareAsyncClient(azureFileStorage, shareName, snapshot, accountName, serviceVersion,
azureSasCredentialFromSasToken != null ? azureSasCredentialFromSasToken : azureSasCredential);
return new ShareAsyncClient(azureFileStorage, shareName, snapshot, accountName, serviceVersion);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.credential.AzureSasCredential;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpResponse;
import com.azure.core.http.rest.PagedFlux;
Expand Down Expand Up @@ -107,7 +106,6 @@ public class ShareDirectoryAsyncClient {
private final String snapshot;
private final String accountName;
private final ShareServiceVersion serviceVersion;
private final AzureSasCredential sasToken;

/**
* Creates a ShareDirectoryAsyncClient that sends requests to the storage directory at {@link
Expand All @@ -120,7 +118,7 @@ public class ShareDirectoryAsyncClient {
* @param snapshot The snapshot of the share
*/
ShareDirectoryAsyncClient(AzureFileStorageImpl azureFileStorageClient, String shareName, String directoryPath,
String snapshot, String accountName, ShareServiceVersion serviceVersion, AzureSasCredential sasToken) {
String snapshot, String accountName, ShareServiceVersion serviceVersion) {
Objects.requireNonNull(shareName, "'shareName' cannot be null.");
Objects.requireNonNull(directoryPath);
this.shareName = shareName;
Expand All @@ -129,13 +127,12 @@ public class ShareDirectoryAsyncClient {
this.azureFileStorageClient = azureFileStorageClient;
this.accountName = accountName;
this.serviceVersion = serviceVersion;
this.sasToken = sasToken;
}

ShareDirectoryAsyncClient(ShareDirectoryAsyncClient directoryAsyncClient) {
this(directoryAsyncClient.azureFileStorageClient, directoryAsyncClient.shareName,
Utility.urlEncode(directoryAsyncClient.directoryPath), directoryAsyncClient.snapshot,
directoryAsyncClient.accountName, directoryAsyncClient.serviceVersion, directoryAsyncClient.sasToken);
directoryAsyncClient.accountName, directoryAsyncClient.serviceVersion);
}

/**
Expand Down Expand Up @@ -177,7 +174,7 @@ public ShareFileAsyncClient getFileClient(String fileName) {
filePath = fileName;
}
return new ShareFileAsyncClient(azureFileStorageClient, shareName, filePath, null, accountName,
serviceVersion, sasToken);
serviceVersion);
}

/**
Expand All @@ -197,7 +194,7 @@ public ShareDirectoryAsyncClient getSubdirectoryClient(String subdirectoryName)
}
directoryPathBuilder.append(subdirectoryName);
return new ShareDirectoryAsyncClient(azureFileStorageClient, shareName, directoryPathBuilder.toString(),
snapshot, accountName, serviceVersion, sasToken);
snapshot, accountName, serviceVersion);
}

/**
Expand Down Expand Up @@ -1230,8 +1227,9 @@ Mono<Response<ShareDirectoryAsyncClient>> renameWithResponse(ShareFileRenameOpti
getDirectoryAsyncClient(options.getDestinationPath());

String renameSource = this.getDirectoryUrl();

renameSource = this.sasToken != null ? renameSource + "?" + this.sasToken.getSignature() : renameSource;
// TODO (rickle-msft): when support added to core
// String sasToken = this.extractSasToken();
// renameSource = sasToken == null ? renameSource : renameSource + sasToken;

return destinationDirectoryClient.azureFileStorageClient.getDirectories().renameWithResponseAsync(
destinationDirectoryClient.getShareName(), destinationDirectoryClient.getDirectoryPath(), renameSource,
Expand All @@ -1253,7 +1251,7 @@ ShareDirectoryAsyncClient getDirectoryAsyncClient(String destinationPath) {
}

return new ShareDirectoryAsyncClient(this.azureFileStorageClient, getShareName(), destinationPath, null,
this.getAccountName(), this.getServiceVersion(), sasToken);
this.getAccountName(), this.getServiceVersion());
}

/**
Expand Down
Loading

0 comments on commit 7bbdd38

Please sign in to comment.