Skip to content

Commit

Permalink
Merging upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
alzimmermsft committed Jul 16, 2019
2 parents 66be278 + 69026ba commit 7b3611f
Show file tree
Hide file tree
Showing 2,537 changed files with 118,543 additions and 2,193 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# See for instructions on this file https://help.github.com/articles/about-codeowners/
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ New wave of packages that we are currently releasing in **preview**. These libra
These preview libraries can be easily identified by their folder, package, and namespaces names starting with `azure-`, e.g. `azure-keyvault`.

The libraries released in the July 2019 preview:
- [App Configuration](appconfiguration/client/README.md)
- [Event Hubs](eventhubs/client/README.md)
- [Identity](sdk/identity/azure-identity)
- [Key Vault Keys](keyvault/client/keys/README.md)
- [Key Vault Secrets](keyvault/client/secrets/README.md)
- [App Configuration](sdk/appconfiguration/azure-data-appconfiguration/README.md)
- [Event Hubs](sdk/eventhubs/azure-eventhubs/README.md)
- [Identity](sdk/identity/azure-identity/README.md)
- [Key Vault Keys](sdk/keyvault/azure-keyvault-keys/README.md)
- [Key Vault Secrets](sdk/keyvault/client/azure-keyvault-secrets/README.md)
- [Storage Blobs](storage/client/README.md)

>NOTE: If you need to ensure your code is ready for production, use one of the stable libraries.
Expand Down
52 changes: 29 additions & 23 deletions eng/.docsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,38 @@ required_readme_sections:
- ^Next steps$
- ^Contributing$
known_presence_issues:
- ['cognitiveservices/data-plane/language/bingspellcheck', '#2847']
- ['cognitiveservices/data-plane/language/luis/authoring', '#2847']
- ['cognitiveservices/data-plane/language/luis/runtime', '#2847']
- ['cognitiveservices/data-plane/language/textanalytics', '#2847']
- ['cognitiveservices/data-plane/search/bingautosuggest', '#2847']
- ['cognitiveservices/data-plane/search/bingcustomimagesearch', '#2847']
- ['cognitiveservices/data-plane/search/bingcustomsearch', '#2847']
- ['cognitiveservices/data-plane/search/bingentitysearch', '#2847']
- ['cognitiveservices/data-plane/search/bingimagesearch', '#2847']
- ['cognitiveservices/data-plane/search/bingnewssearch', '#2847']
- ['cognitiveservices/data-plane/search/bingvideosearch', '#2847']
- ['cognitiveservices/data-plane/search/bingvisualsearch', '#2847']
- ['cognitiveservices/data-plane/search/bingwebsearch', '#2847']
- ['cognitiveservices/data-plane/vision/computervision', '#2847']
- ['cognitiveservices/data-plane/vision/contentmoderator', '#2847']
- ['cognitiveservices/data-plane/vision/customvision/prediction', '#2847']
- ['cognitiveservices/data-plane/vision/customvision/training', '#2847']
- ['cognitiveservices/data-plane/vision/faceapi', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-spellcheck', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-luis-authoring', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-luis-runtime', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-textanalytics', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-autosuggest', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-customimagesearch', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-customsearch', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-entitysearch', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-imagesearch', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-newssearch', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-videosearch', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-visualsearch', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-websearch', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-computervision', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-contentmoderator', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-customvision-prediction', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-customvision-training', '#2847']
- ['sdk/cognitiveservices/ms-azure-cs-faceapi', '#2847']
- ['sdk/keyvault/microsoft-azure-keyvault', '#2847']
- ['sdk/keyvault/microsoft-azure-keyvault-core', '#2847']
- ['sdk/keyvault/microsoft-azure-keyvault-cryptography', '#2847']
- ['sdk/keyvault/microsoft-azure-keyvault-extensions', '#2847']
- ['sdk/keyvault/microsoft-azure-keyvault-webkey', '#2847']
- ['sdk/mediaservices/microsoft-azure-media', '#2847']
- ['mediaservices/data-plane', '#2847']
- ['core/build-tools', '#2847']
- ['core/azure-core', '#2847']
- ['core/azure-core-auth', '#2847']
- ['core/azure-core-management', '#2847']
- ['sdk/core/azure-core', '#2847']
- ['sdk/core/azure-core-auth', '#2847']
- ['sdk/core/azure-core-management', '#2847']
- ['cosmosdb/data-plane/commons-test-utils', '#2847']
- ['cosmosdb/data-plane/sdk', '#2847']
- ['sdk/cosmos/sdk', '#2847']
- ['cosmosdb/data-plane/gateway', '#2847']
- ['cosmosdb/data-plane/commons', '#2847']
- ['cosmosdb/data-plane/direct-impl', '#2847']
Expand All @@ -55,7 +57,7 @@ known_content_issues:
- ['README.md', '#3113']
- ['sdk/applicationinsights/microsoft-azure-applicationinsights-query/README.md', '#3113']
- ['sdk/batch/microsoft-azure-batch/README.md', '#3113']
- ['eventgrid/data-plane/README.md', '#3113']
- ['sdk/eventgrid/microsoft-azure-eventgrid/README.md', '#3113']
- ['eventhubs/data-plane/readme.md', '#3113']
- ['eventhubs/data-plane/azure-eventhubs-eph/Readme.md', '#3113']
- ['sdk/authorization/microsoft-azure-authentication-msi-token-provider/readme.md', '#3113']
Expand All @@ -64,11 +66,15 @@ known_content_issues:
- ['sdk/servicebus/README.md', '#3113']
- ['storage/data-plane/README.md', '#3113']
- ['storage/data-plane/swagger/README.md', '#3113']
- ['core/README.md', '#3113']
- ['sdk/core/README.md', '#3113']
- ['cosmosdb/data-plane/README.md', '#3113']
- ['cosmosdb/data-plane/benchmark/README.md', '#3113']
- ['cosmosdb/data-plane/changelog/README.md', '#3113']
- ['cosmosdb/data-plane/faq/README.md', '#3113']
- ['sdk/cosmos/faq/README.md', '#3113']
- ['sdk/cosmos/changelog/README.md', '#3113']
- ['sdk/cosmos/benchmark/README.md', '#3113']
- ['sdk/cosmos/README.md', '#3113']
package_indexing_exclusion_list:
- azure-loganalytics-sample
- azure-applicationinsights-query-sample
14 changes: 0 additions & 14 deletions eng/code-quality-reports/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jetty-maven-plugin.version>9.2.22.v20170606</jetty-maven-plugin.version>

<site.url>https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-java</site.url>

Expand Down Expand Up @@ -61,19 +60,6 @@

<build>
<plugins>
<!-- Adding this plugin to ensure jetty plugin runs without errors on pom.client.xml. -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty-maven-plugin.version}</version>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<stopPort>11079</stopPort>
<stopKey>STOP</stopKey>
<waitForChild>false</waitForChild>
<jettyXml>./jetty.xml</jettyXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ public class ExternalDependencyExposedCheck extends AbstractCheck {
)));

private final Map<String, String> simpleClassNameToQualifiedNameMap = new HashMap<>();
private static boolean isImplPackage;

private boolean isPublicClass;

@Override
public void beginTree(DetailAST rootAST) {
simpleClassNameToQualifiedNameMap.clear();
isImplPackage = false;
}

@Override
Expand All @@ -50,30 +50,30 @@ public int[] getAcceptableTokens() {
@Override
public int[] getRequiredTokens() {
return new int[] {
TokenTypes.PACKAGE_DEF,
TokenTypes.IMPORT,
TokenTypes.METHOD_DEF
};
}

@Override
public void visitToken(DetailAST token) {
if (isImplPackage) {
return;
}

switch (token.getType()) {
case TokenTypes.PACKAGE_DEF:
String packageName = FullIdent.createFullIdent(token.findFirstToken(TokenTypes.DOT)).getText();
isImplPackage = packageName.contains(".implementation");
break;
case TokenTypes.IMPORT:
// Add all imported classes into a map, key is the name of class and value is the full package path of class.
final String importClassPath = FullIdent.createFullIdentBelow(token).getText();
final String className = importClassPath.substring(importClassPath.lastIndexOf(".") + 1);
simpleClassNameToQualifiedNameMap.put(className, importClassPath);
break;
case TokenTypes.CLASS_DEF:
// CLASS_DEF always has MODIFIERS
final AccessModifier accessModifier = CheckUtil.getAccessModifierFromModifiersToken(
token.findFirstToken(TokenTypes.MODIFIERS));
isPublicClass = accessModifier.equals(AccessModifier.PUBLIC);
break;
case TokenTypes.METHOD_DEF:
if (!isPublicClass) {
return;
}
checkNoExternalDependencyExposed(token);
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ private boolean isOverrideAnnotation(DetailAST modifierToken) {
return false;
}

return "Override".equals(modifierToken.findFirstToken(TokenTypes.IDENT).getText());
// Possible for an identifier not to exist if it is a nested class (ie. @Parameterized.Parameters(String)).
final DetailAST identifier = modifierToken.findFirstToken(TokenTypes.IDENT);

return identifier != null && "Override".equals(identifier.getText());
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public class ServiceClientInstantiationCheck extends AbstractCheck {
private static final String SERVICE_CLIENT = "ServiceClient";
private static final String BUILDER = "builder";
private static final String ASYNC_CLIENT ="AsyncClient";
private static final String ASYNC_CLIENT = "AsyncClient";
private static final String CLIENT = "Client";
private static final String IS_ASYNC = "isAsync";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,12 @@

<!-- Add JavadocThrowsChecks suppression for any test or implementation files (ie. ones that live under src/test/java or implementation). -->
<suppress checks="com.azure.tools.checkstyle.checks.JavadocThrowsChecks" files="(.*[/\\]src[/\\]test[/\\]java[/\\].*)|(.*[/\\]implementation[/\\].*)\.java"/>

<!-- Custom checkstyle rules only check track 2 libraries -->
<suppress checks="com.azure.tools.checkstyle.checks.ExternalDependencyExposedCheck" files=".*[/\\]com[/\\]microsoft[/\\].*"/>
<suppress checks="com.azure.tools.checkstyle.checks.ServiceClientInstantiationCheck" files=".*[/\\]com[/\\]microsoft[/\\].*"/>

<!-- Custom checkstyle rules that don't apply to files under test or implementation package -->
<suppress checks="com.azure.tools.checkstyle.checks.ExternalDependencyExposedCheck" files="(.*[/\\]src[/\\]test[/\\]java[/\\].*)|(.*[/\\]implementation[/\\].*)\.java"/>
<suppress checks="com.azure.tools.checkstyle.checks.ServiceClientInstantiationCheck" files="(.*[/\\]src[/\\]test[/\\]java[/\\].*)|(.*[/\\]implementation[/\\].*)\.java"/>
</suppressions>
9 changes: 9 additions & 0 deletions eng/jacoco-test-coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@

<properties>
<azure-core.version>1.0.0-preview.3</azure-core.version>
<azure-core-amqp.version>1.0.0-preview.3</azure-core-amqp.version>
<azure-core-management.version>1.0.0-preview.3</azure-core-management.version>
<azure-core-test.version>1.0.0-preview.3</azure-core-test.version>
<azure-data-appconfiguration.version>1.0.0-preview.1</azure-data-appconfiguration.version>
<azure-identity.version>1.0.0-preview.1</azure-identity.version>
<azure-keyvault.version>4.0.0-preview.1</azure-keyvault.version>
<azure-messaging-eventhubs.version>5.0.0-preview.2</azure-messaging-eventhubs.version>
<azure-storage-blob.version>12.0.0-preview.1</azure-storage-blob.version>
</properties>

<distributionManagement>
Expand Down Expand Up @@ -84,6 +88,11 @@
<artifactId>azure-messaging-eventhubs</artifactId>
<version>${azure-messaging-eventhubs.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.azure</groupId>-->
<!-- <artifactId>azure-storage-blob</artifactId>-->
<!-- <version>${azure-storage-blob.version}</version>-->
<!-- </dependency>-->

<!-- Tracing will be built and released separately. Removing tracing dependency
until we finalize dependency composition -->
Expand Down
38 changes: 38 additions & 0 deletions eng/pipelines/mgmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
trigger:
- master

variables:
MavenGoals: 'clean,compile'

jobs:
- job: 'Build'

strategy:
matrix:
Java 8:
ArtifactName: 'packages'
JavaVersion: '1.8'
Java 7:
ArtifactName: 'packages'
JavaVersion: '1.7'

pool:
vmImage: 'ubuntu-16.04'

steps:
- task: ShellScript@2
displayName: 'call mvn for each mgmt sdk individually'
inputs:
scriptPath: "$(System.DefaultWorkingDirectory)/eng/pipelines/scripts/mgmt_sdk_compiler.sh"
workingDirectory: "$(System.DefaultWorkingDirectory)"
failOnStandardError: true
args: "$(JavaVersion) $(MavenGoals)"

- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
mergeTestResults: true
testRunTitle: 'On Java $(JavaVersion)'



58 changes: 58 additions & 0 deletions eng/pipelines/scripts/mgmt_sdk_compiler.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/usr/bin/env bash

#args expected
# $1. Java version : 1.7 or 1,8, defaults to "1.8"
# $2. Goals, defaults to "clean compile", value expected is a comma delemited string eg : "clean,compile"

echo "#### CWD : "
pwd

echo "#### versions of java available:"
ls /usr/lib/jvm

echo "#### Original java home $JAVA_HOME"

JAVA7HOME="/usr/lib/jvm/zulu-7-azure-amd64"
JAVA8HOME="/usr/lib/jvm/zulu-8-azure-amd64"

JAVAHOME="$JAVA8HOME"

MAVENGOALS="clean compile"

if [ -n "$1" ] && [ "$1" == "1.7" ];
then
JAVAHOME="$JAVA7HOME";
echo "runing java 7 build";
fi


if [ -n "$2" ];
then
TEMP_VAL=$(echo "$2" | sed -r 's/,/ /g')
MAVENGOALS="$TEMP_VAL";
echo "maven goals overriden to $MAVENGOALS"
fi

export JAVA_HOME="$JAVAHOME"

echo "#### Using java at : $JAVA_HOME"

echo "#### Maven properties:"
mvn --version

#TODO:
#for some reason the workingdirectory dos not seem to work...
#fix the following cd cmd once we figure out how to get it to work
#change to the root of the sources repo
cd ../../..

for i in `ls -d */*/v20* | grep -v "node_modules/*/*"`;
do
echo "######## building folder $i"
cd $i;
mvn --batch-mode -Dgpg.skip -Dmaven.wagon.http.pool=false -Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warns $MAVENGOALS;
if [ $? != 0 ];
then cd -; exit -1;
else cd -;
fi;
done
Loading

0 comments on commit 7b3611f

Please sign in to comment.