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

[pull] main from Azure:main #417

Merged
merged 8 commits into from
Feb 25, 2023
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 @@ -2345,6 +2345,22 @@
<Bug pattern="EI_EXPOSE_REP"/>
</Match>

<!-- The DispositionWork doesn't need to be serializable -->
<Match>
<Class
name="~com\.azure\.core\.amqp\.implementation\.handler\.ReceiverUnsettledDeliveries\$DispositionWork"/>
<Bug pattern="SE_NO_SERIALVERSIONID"/>
</Match>
<Match>
<Class
name="~com\.azure\.core\.amqp\.implementation\.handler\.ReceiverUnsettledDeliveries\$DispositionWork"/>
<Or>
<Field name="desiredState"/>
<Field name="mono"/>
</Or>
<Bug pattern="SE_BAD_FIELD"/>
</Match>

<!-- For BinaryData, copying array contents degrades performance. The data returned as byte array from BinaryData is expected to be copied by the call if mutability is desired. -->
<Match>
<Class name="com.azure.core.implementation.util.ByteArrayContent"/>
Expand Down
8 changes: 4 additions & 4 deletions eng/common/testproxy/transition-scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ You will not be able to clean them up however. There exists [planned work](https
- `language` repo - An individual language repository eg. azure-sdk-for-python or azure-sdk-for-net etc.
- `assets` repo - The repository where assets are being moved to. <https://github.com/Azure/azure-sdk-assets>

The `test-proxy` tool is integrated with the ability to automatically restore these assets. This process is kick-started by the presence of an `assets.json` alongside a dev's actual code. This means that while assets will be cloned down externally, the _map_ to those assets will be stored alongside the tests. Normally, it is recommended to create an `assets.json` under the path `sdk/<ServiceDirectory>`. However, more granular storage is also possible.
The `test-proxy` tool is integrated with the ability to automatically restore these assets. This process is kick-started by the presence of an `assets.json` alongside a dev's actual code. This means that while assets will be cloned down externally, the _map_ to those assets will be stored alongside the tests. Normally, it is recommended to create an `assets.json` under the path `sdk/<ServiceDirectory>/<package>`. More granular storage than on an individual package level is possible, but each language's test framework would need to support that on a case-by-case basis.

Service/Package-Level examples:
Examples of current assets.json locations:

- `sdk/storage/assets.json`
- `sdk/storage/azure-storage-file-datalake/assets.json`
- [`sdk/data/aztables/assets.json`](https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/data/aztables/assets.json)
- [`sdk/keyvault/azure-keyvault-keys/assets.json`](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/keyvault/azure-keyvault-keys/assets.json)

The location of the actual test code is referred to as the `language repo`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ if ($UseTestRepo) {
# 3. ios
$LangRecordingDirs = @{"cpp" = "recordings";
"go" = "recordings";
"java" = "session-records";
"java" = "src.*?session-records";
"js" = "recordings";
"net" = "SessionRecords";
"python" = "recordings";
Expand Down Expand Up @@ -321,8 +321,8 @@ Function Move-AssetsFromLangRepo {
)
$filter = $LangRecordingDirs[$language]
Write-Host "Language recording directory name=$filter"
Write-Host "Get-ChildItem -Recurse -Filter ""*.json"" | Where-Object { `$_.DirectoryName.Split([IO.Path]::DirectorySeparatorChar) -contains ""$filter"" }"
$filesToMove = Get-ChildItem -Recurse -Filter "*.json" | Where-Object { $_.DirectoryName.Split([IO.Path]::DirectorySeparatorChar) -contains "$filter" }
Write-Host "Get-ChildItem -Recurse -Filter ""*.json"" | Where-Object { if ($filter.Contains(""*"")) { $_.DirectoryName -match $filter } else { $_.DirectoryName.Split([IO.Path]::DirectorySeparatorChar) -contains ""$filter"" }"
$filesToMove = Get-ChildItem -Recurse -Filter "*.json" | Where-Object { if ($filter.Contains("*")) { $_.DirectoryName -match $filter } else { $_.DirectoryName.Split([IO.Path]::DirectorySeparatorChar) -contains "$filter" } }
[string] $currentDir = Get-Location

foreach ($fromFile in $filesToMove) {
Expand Down
15 changes: 8 additions & 7 deletions eng/versioning/external_dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,13 @@ com.microsoft.azure:azure-storage;8.0.0
com.microsoft.azure:msal4j;1.13.4
com.microsoft.azure:msal4j-persistence-extension;1.1.0
com.sun.activation:jakarta.activation;1.2.2
io.opentelemetry:opentelemetry-api;1.20.0
io.opentelemetry:opentelemetry-sdk;1.20.0
io.opentelemetry:opentelemetry-exporter-logging;1.20.0
io.opentelemetry:opentelemetry-exporter-jaeger;1.20.0
io.opentelemetry:opentelemetry-exporter-otlp;1.20.0
io.opentelemetry:opentelemetry-sdk-testing;1.20.0
io.opentelemetry:opentelemetry-sdk-logs;1.20.0-alpha
io.opentelemetry:opentelemetry-api;1.23.0
io.opentelemetry:opentelemetry-sdk;1.23.0
io.opentelemetry:opentelemetry-exporter-logging;1.23.0
io.opentelemetry:opentelemetry-exporter-jaeger;1.23.0
io.opentelemetry:opentelemetry-exporter-otlp;1.23.0
io.opentelemetry:opentelemetry-sdk-testing;1.23.0
io.opentelemetry:opentelemetry-sdk-logs;1.23.0-alpha
io.projectreactor:reactor-test;3.4.26
junit:junit;4.13.2
commons-cli:commons-cli;1.3
Expand Down Expand Up @@ -232,6 +232,7 @@ org.openjdk.jmh:jmh-core;1.22
org.openjdk.jmh:jmh-generator-annprocess;1.22
org.spockframework:spock-core;2.3-groovy-4.0
org.testng:testng;7.5
org.awaitility:awaitility;4.2.0
uk.org.lidalia:slf4j-test;1.2.0
uk.org.webcompere:system-stubs-jupiter;2.0.1
com.google.truth:truth;1.1.3
Expand Down
2 changes: 2 additions & 0 deletions eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ com.azure.tools:azure-sdk-build-tool;1.0.0-beta.1;1.0.0-beta.2
# note: The unreleased dependencies will not be manipulated with the automatic PR creation code.
# In the pom, the version update tag after the version should name the unreleased package and the dependency version:
# <!-- {x-version-update;unreleased_com.azure:azure-core;dependency} -->

unreleased_com.azure:azure-core-amqp;2.9.0-beta.1
unreleased_com.azure:azure-core;1.37.0-beta.1

# Released Beta dependencies: Copy the entry from above, prepend "beta_", remove the current
Expand Down
2 changes: 2 additions & 0 deletions sdk/appconfiguration/azure-data-appconfiguration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
<properties>
<!-- Configures the Java 9+ run to perform the required module exports, opens, and reads that are necessary for testing but shouldn't be part of the module-info. -->
<javaModulesSurefireArgLine>
--add-exports com.azure.core/com.azure.core.implementation.jackson=ALL-UNNAMED
--add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED
--add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED
--add-opens com.azure.data.appconfiguration/com.azure.data.appconfiguration=ALL-UNNAMED
</javaModulesSurefireArgLine>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1133,14 +1133,13 @@ public void listRevisionsWithPagination(HttpClient httpClient, ConfigurationServ
settings.add(new ConfigurationSetting().setKey(keyPrefix).setValue("myValue" + value).setLabel(labelPrefix));
}

List<Mono<Response<ConfigurationSetting>>> results = new ArrayList<>();
for (ConfigurationSetting setting : settings) {
results.add(client.setConfigurationSettingWithResponse(setting, false));
StepVerifier.create(client.setConfigurationSetting(setting))
.expectNextCount(1)
.verifyComplete();
}

SettingSelector filter = new SettingSelector().setKeyFilter(keyPrefix).setLabelFilter(labelPrefix);

Flux.merge(results).blockLast();
StepVerifier.create(client.listRevisions(filter))
.expectNextCount(numberExpected)
.verifyComplete();
Expand All @@ -1156,17 +1155,16 @@ public void listRevisionsWithPaginationAndRepeatStream(HttpClient httpClient, Co
client = getConfigurationAsyncClient(httpClient, serviceVersion);
final int numberExpected = 50;
List<ConfigurationSetting> settings = new ArrayList<>(numberExpected);
List<Mono<Response<ConfigurationSetting>>> results = new ArrayList<>();
for (int value = 0; value < numberExpected; value++) {
ConfigurationSetting setting = new ConfigurationSetting().setKey(keyPrefix).setValue("myValue" + value).setLabel(labelPrefix);
settings.add(setting);
results.add(client.setConfigurationSettingWithResponse(setting, false));
StepVerifier.create(client.setConfigurationSetting(setting))
.expectNextCount(1)
.verifyComplete();
}

SettingSelector filter = new SettingSelector().setKeyFilter(keyPrefix).setLabelFilter(labelPrefix);

Flux.merge(results).blockLast();

List<ConfigurationSetting> configurationSettingList1 = new ArrayList<>();
List<ConfigurationSetting> configurationSettingList2 = new ArrayList<>();

Expand All @@ -1188,17 +1186,14 @@ public void listRevisionsWithPaginationAndRepeatIterator(HttpClient httpClient,
client = getConfigurationAsyncClient(httpClient, serviceVersion);
final int numberExpected = 50;
List<ConfigurationSetting> settings = new ArrayList<>(numberExpected);
List<Mono<Response<ConfigurationSetting>>> results = new ArrayList<>();
for (int value = 0; value < numberExpected; value++) {
ConfigurationSetting setting = new ConfigurationSetting().setKey(keyPrefix).setValue("myValue" + value).setLabel(labelPrefix);
settings.add(setting);
results.add(client.setConfigurationSettingWithResponse(setting, false));
StepVerifier.create(client.setConfigurationSetting(setting)).expectNextCount(1).verifyComplete();
}

SettingSelector filter = new SettingSelector().setKeyFilter(keyPrefix).setLabelFilter(labelPrefix);

Flux.merge(results).blockLast();

List<ConfigurationSetting> configurationSettingList1 = new ArrayList<>();
List<ConfigurationSetting> configurationSettingList2 = new ArrayList<>();

Expand All @@ -1224,14 +1219,12 @@ public void listConfigurationSettingsWithPagination(HttpClient httpClient, Confi
settings.add(new ConfigurationSetting().setKey(keyPrefix + "-" + value).setValue("myValue").setLabel(labelPrefix));
}

List<Mono<Response<ConfigurationSetting>>> results = new ArrayList<>();
for (ConfigurationSetting setting : settings) {
results.add(client.setConfigurationSettingWithResponse(setting, false));
StepVerifier.create(client.setConfigurationSetting(setting)).expectNextCount(1).verifyComplete();
}

SettingSelector filter = new SettingSelector().setKeyFilter(keyPrefix + "-*").setLabelFilter(labelPrefix);

Flux.merge(results).blockLast();
StepVerifier.create(client.listConfigurationSettings(filter))
.expectNextCount(numberExpected)
.verifyComplete();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.azure.core.exception.HttpResponseException;
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.netty.NettyAsyncHttpClientBuilder;
import com.azure.core.http.policy.ExponentialBackoffOptions;
import com.azure.core.http.policy.FixedDelay;
import com.azure.core.http.policy.HttpLogDetailLevel;
Expand Down Expand Up @@ -190,7 +189,7 @@ public void defaultPipeline() {
() -> clientBuilder.buildClient().setConfigurationSetting(key, null, value));
}
HttpClient defaultHttpClient = interceptorManager.isPlaybackMode() ? interceptorManager.getPlaybackClient()
: new NettyAsyncHttpClientBuilder().wiretap(true).build();
: HttpClient.createDefault();

clientBuilder.pipeline(null).httpClient(defaultHttpClient);

Expand Down
4 changes: 4 additions & 0 deletions sdk/appconfiguration/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ stages:
- template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
parameters:
ServiceDirectory: appconfiguration
Artifacts:
- name: azure-data-appconfiguration
groupId: com.azure
safeName: azuredataappconfiguration
TimeoutInMinutes: 90
SupportedClouds: "Public,UsGov,China"
EnvVars:
Expand Down
12 changes: 6 additions & 6 deletions sdk/attestation/azure-security-attestation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,19 @@
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api</artifactId>
<version>1.20.0</version> <!-- {x-version-update;io.opentelemetry:opentelemetry-api;external_dependency} -->
<version>1.23.0</version> <!-- {x-version-update;io.opentelemetry:opentelemetry-api;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-exporter-logging</artifactId>
<version>1.20.0</version> <!-- {x-version-update;io.opentelemetry:opentelemetry-exporter-logging;external_dependency} -->
<version>1.23.0</version> <!-- {x-version-update;io.opentelemetry:opentelemetry-exporter-logging;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk</artifactId>
<version>1.20.0</version> <!-- {x-version-update;io.opentelemetry:opentelemetry-sdk;external_dependency} -->
<version>1.23.0</version> <!-- {x-version-update;io.opentelemetry:opentelemetry-sdk;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -149,9 +149,9 @@
<bannedDependencies>
<includes>
<include>com.nimbusds:nimbus-jose-jwt:[9.22]</include> <!-- {x-include-update;com.nimbusds:nimbus-jose-jwt;external_dependency} -->
<include>io.opentelemetry:opentelemetry-api:[1.20.0]</include> <!-- {x-include-update;io.opentelemetry:opentelemetry-api;external_dependency} -->
<include>io.opentelemetry:opentelemetry-sdk:[1.20.0]</include> <!-- {x-include-update;io.opentelemetry:opentelemetry-sdk;external_dependency} -->
<include>io.opentelemetry:opentelemetry-exporter-logging:[1.20.0]</include> <!-- {x-include-update;io.opentelemetry:opentelemetry-exporter-logging;external_dependency} -->
<include>io.opentelemetry:opentelemetry-api:[1.23.0]</include> <!-- {x-include-update;io.opentelemetry:opentelemetry-api;external_dependency} -->
<include>io.opentelemetry:opentelemetry-sdk:[1.23.0]</include> <!-- {x-include-update;io.opentelemetry:opentelemetry-sdk;external_dependency} -->
<include>io.opentelemetry:opentelemetry-exporter-logging:[1.23.0]</include> <!-- {x-include-update;io.opentelemetry:opentelemetry-exporter-logging;external_dependency} -->
</includes>
</bannedDependencies>
</rules>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ Mono<Response<TransferCallResult>> transferToParticipantCallWithResponseInternal

TransferToParticipantRequestInternal request = new TransferToParticipantRequestInternal()
.setTargetParticipant(CommunicationIdentifierConverter.convert(transferToParticipantCallOptions.getTargetCallInvite().getTarget()))
.setTransfereeCallerId(PhoneNumberIdentifierConverter.convert(transferToParticipantCallOptions.getTargetCallInvite().getSourceCallIdNumber()))
.setOperationContext(transferToParticipantCallOptions.getOperationContext());

CallInvite callInvite = transferToParticipantCallOptions.getTargetCallInvite();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@ Mono<Response<Void>> recognizeWithResponseInternal(CallMediaRecognizeOptions rec
playSourceInternal = translatePlaySourceToPlaySourceInternal(playSource);
}

if (choiceRecognizeOptions.getSpeechLanguage() != null) {
if (!choiceRecognizeOptions.getSpeechLanguage().isEmpty()) {
recognizeOptionsInternal.setSpeechLanguage(choiceRecognizeOptions.getSpeechLanguage());
}
}

RecognizeRequest recognizeRequest = new RecognizeRequest()
.setRecognizeInputType(RecognizeInputTypeInternal.fromString(choiceRecognizeOptions.getRecognizeInputType().toString()))
.setInterruptCallMediaOperation(choiceRecognizeOptions.isInterruptCallMediaOperation())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ public final class RecognizeOptionsInternal {
@JsonProperty(value = "targetParticipant", required = true)
private CommunicationIdentifierModel targetParticipant;

/*
* Speech language to be recognized, If not set default is en-US
*/
@JsonProperty(value = "speechLanguage")
private String speechLanguage;

/*
* Defines configurations for DTMF.
*/
Expand Down Expand Up @@ -101,6 +107,26 @@ public RecognizeOptionsInternal setTargetParticipant(CommunicationIdentifierMode
return this;
}

/**
* Get the speechLanguage property: Speech language to be recognized, If not set default is en-US.
*
* @return the speechLanguage value.
*/
public String getSpeechLanguage() {
return this.speechLanguage;
}

/**
* Set the speechLanguage property: Speech language to be recognized, If not set default is en-US.
*
* @param speechLanguage the speechLanguage value to set.
* @return the RecognizeOptionsInternal object itself.
*/
public RecognizeOptionsInternal setSpeechLanguage(String speechLanguage) {
this.speechLanguage = speechLanguage;
return this;
}

/**
* Get the dtmfOptions property: Defines configurations for DTMF.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ public final class TransferToParticipantRequestInternal {
@JsonProperty(value = "targetParticipant", required = true)
private CommunicationIdentifierModel targetParticipant;

/*
* The caller ID of the transferee when transferring to PSTN.
*/
@JsonProperty(value = "transfereeCallerId")
private PhoneNumberIdentifierModel transfereeCallerId;

/*
* Used by customer to send custom context to targets
*/
Expand Down Expand Up @@ -55,26 +49,6 @@ public TransferToParticipantRequestInternal setTargetParticipant(CommunicationId
return this;
}

/**
* Get the transfereeCallerId property: The caller ID of the transferee when transferring to PSTN.
*
* @return the transfereeCallerId value.
*/
public PhoneNumberIdentifierModel getTransfereeCallerId() {
return this.transfereeCallerId;
}

/**
* Set the transfereeCallerId property: The caller ID of the transferee when transferring to PSTN.
*
* @param transfereeCallerId the transfereeCallerId value to set.
* @return the TransferToParticipantRequestInternal object itself.
*/
public TransferToParticipantRequestInternal setTransfereeCallerId(PhoneNumberIdentifierModel transfereeCallerId) {
this.transfereeCallerId = transfereeCallerId;
return this;
}

/**
* Get the customContext property: Used by customer to send custom context to targets.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ public class CallMediaRecognizeChoiceOptions extends CallMediaRecognizeOptions {
*/
private final List<RecognizeChoice> recognizeChoices;

/*
* Speech language to be recognized, If not set default is en-US
*/
private String speechLanguage;

/**
* Get the list of recognize choice.
*
Expand All @@ -23,6 +28,27 @@ public List<RecognizeChoice> getRecognizeChoices() {
return this.recognizeChoices;
}

/**
* Set the speech language property.
* @param speechLanguage the interToneTimeout value to set.
* @return the CallMediaRecognizeChoiceOptions object itself.
*/
public CallMediaRecognizeChoiceOptions setSpeechLanguage(String speechLanguage) {
this.speechLanguage = speechLanguage;
return this;
}

/**
* Get the list of recognize choice.
*
* @return the speech language.
*/
public String getSpeechLanguage() {
return this.speechLanguage;
}



/**
* Initializes a CallMediaRecognizeDtmfOptions object.
*
Expand Down
Loading