Skip to content

Commit

Permalink
Add PR Validation for Long Paths (#16980)
Browse files Browse the repository at this point in the history
* Shorten test name that is too long for Windows git

* Disable long path validation and reverted OS image changes

* Reenable length check with different base path length

* Remove accidentally added file
  • Loading branch information
alzimmermsft authored Oct 30, 2020
1 parent 7f21d07 commit f0ff2b0
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 23 deletions.
7 changes: 6 additions & 1 deletion eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ jobs:
Directory: sdk/${{ parameters.ServiceDirectory }}
CheckLinkGuidance: $true

# Use BasePathLength of 38 instead of the default 49 as some GA'd files fail when the number is higher.
- template: /eng/common/pipelines/templates/steps/verify-path-length.yml
parameters:
SourceDirectory: $(Build.SourcesDirectory)
BasePathLength: 38

- ${{if ne(parameters.SDKType, 'data')}}:
- ${{ each artifact in parameters.Artifacts }}:
- template: /eng/common/pipelines/templates/steps/verify-changelog.yml
Expand Down Expand Up @@ -351,4 +357,3 @@ jobs:
inputs:
mergeTestResults: true
testRunTitle: $(RunTitle)

Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ stages:
variables:
- template: ../variables/globals.yml
pool:
vmImage: windows-2019
vmImage: vs2017-win2016
strategy:
runOnce:
deploy:
Expand All @@ -81,7 +81,7 @@ stages:
variables:
- template: ../variables/globals.yml
pool:
vmImage: windows-2019
vmImage: vs2017-win2016
strategy:
runOnce:
deploy:
Expand Down
8 changes: 4 additions & 4 deletions eng/pipelines/templates/stages/archetype-java-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ stages:
variables:
- template: ../variables/globals.yml
pool:
vmImage: windows-2019
vmImage: vs2017-win2016
strategy:
runOnce:
deploy:
Expand All @@ -122,7 +122,7 @@ stages:
variables:
- template: ../variables/globals.yml
pool:
vmImage: windows-2019
vmImage: vs2017-win2016
strategy:
runOnce:
deploy:
Expand Down Expand Up @@ -163,7 +163,7 @@ stages:
CIConfigs: "{'targets':[{'path_to_config':'package.json','mode':'Preview','monikerid':'1'},{'path_to_config':'package.json','mode':'Latest','monikerid':'0'}]}"
skipComponentGovernanceDetection: true
pool:
vmImage: windows-2019
vmImage: vs2017-win2016
strategy:
runOnce:
deploy:
Expand Down Expand Up @@ -268,7 +268,7 @@ stages:
value: https://pkgs.dev.azure.com/azure-sdk/internal/_packaging/azure-sdk-for-java-pr/maven/v1

pool:
vmImage: windows-2019
vmImage: vs2017-win2016
steps:
- checkout: self
path: azure-sdk-for-java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
import com.azure.core.http.HttpResponse;
import com.azure.core.http.netty.NettyAsyncHttpClientBuilder;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.management.Region;
import com.azure.core.management.SubResource;
import com.azure.core.management.profile.AzureProfile;
import com.azure.resourcemanager.authorization.models.BuiltInRole;
import com.azure.resourcemanager.authorization.models.RoleAssignment;
import com.azure.resourcemanager.compute.models.KnownLinuxVirtualMachineImage;
import com.azure.resourcemanager.compute.models.OperatingSystemTypes;
import com.azure.resourcemanager.compute.models.PowerState;
Expand All @@ -28,8 +32,6 @@
import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetSkuTypes;
import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVM;
import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVMs;
import com.azure.resourcemanager.authorization.models.BuiltInRole;
import com.azure.resourcemanager.authorization.models.RoleAssignment;
import com.azure.resourcemanager.keyvault.models.Secret;
import com.azure.resourcemanager.keyvault.models.Vault;
import com.azure.resourcemanager.network.models.ApplicationSecurityGroup;
Expand All @@ -44,14 +46,20 @@
import com.azure.resourcemanager.network.models.SecurityRuleProtocol;
import com.azure.resourcemanager.network.models.VirtualMachineScaleSetNetworkInterface;
import com.azure.resourcemanager.network.models.VirtualMachineScaleSetNicIpConfiguration;
import com.azure.resourcemanager.resources.fluentcore.arm.AvailabilityZoneId;
import com.azure.resourcemanager.resources.fluentcore.utils.ResourceManagerUtils;
import com.azure.resourcemanager.resources.models.ResourceGroup;
import com.azure.resourcemanager.test.utils.TestUtilities;
import com.azure.resourcemanager.resources.fluentcore.arm.AvailabilityZoneId;
import com.azure.core.management.Region;
import com.azure.core.management.profile.AzureProfile;
import com.azure.resourcemanager.storage.models.StorageAccount;
import com.azure.resourcemanager.storage.models.StorageAccountKey;
import com.azure.resourcemanager.test.utils.TestUtilities;
import com.azure.storage.blob.BlobContainerClient;
import com.azure.storage.blob.BlobServiceClient;
import com.azure.storage.blob.BlobServiceClientBuilder;
import com.azure.storage.blob.specialized.BlockBlobClient;
import org.apache.commons.io.IOUtils;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import java.io.BufferedInputStream;
import java.io.File;
Expand All @@ -62,15 +70,6 @@
import java.util.List;
import java.util.Map;

import com.azure.storage.blob.BlobContainerClient;
import com.azure.storage.blob.BlobServiceClient;
import com.azure.storage.blob.BlobServiceClientBuilder;
import com.azure.storage.blob.specialized.BlockBlobClient;
import org.apache.commons.io.IOUtils;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

public class VirtualMachineScaleSetOperationsTests extends ComputeManagementTest {
private String rgName = "";
private final Region region = Region.US_WEST;
Expand Down Expand Up @@ -724,9 +723,14 @@ public void canCreateVirtualMachineScaleSet() throws Exception {
Assertions.assertTrue(nicCount > 0);
}

/*
* Previously name
* canCreateTwoRegionalVirtualMachineScaleSetsAndAssociateEachWithDifferentBackendPoolOfZoneResilientLoadBalancer
* but this was too long for some OSes and would cause git checkout to fail.
*/
@Test
public void
canCreateTwoRegionalVirtualMachineScaleSetsAndAssociateEachWithDifferentBackendPoolOfZoneResilientLoadBalancer()
canCreateTwoRegionalVMScaleSetsWithDifferentPoolOfZoneResilientLoadBalancer()
throws Exception {
// Zone resilient resource -> resources deployed in all zones by the service and it will be served by all AZs
// all the time.
Expand Down

0 comments on commit f0ff2b0

Please sign in to comment.