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

print out the m2 cache at some points #44564

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
15 changes: 15 additions & 0 deletions eng/pipelines/templates/jobs/ci.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ jobs:
sbomEnabled: false

steps:

- pwsh: |
Write-Host 'show the current log4j versions'
gci /mnt/vss/_work/1 -ErrorAction Continue | Write-Host
gci -r /mnt/vss/_work/1/.m2/repository -ErrorAction Continue| Write-Host
displayName: 'Show the current log4j versions in the cache'
continueOnError: true

- template: /eng/pipelines/templates/steps/initialize-test-environment.yml
parameters:
CheckoutRecordings: true
Expand Down Expand Up @@ -174,3 +182,10 @@ jobs:
}
displayName: Dump Test-Proxy Error Logs
condition: succeededOrFailed()

- pwsh: |
Write-Host 'show the current log4j versions'
gci /mnt/vss/_work/1 -ErrorAction Continue | Write-Host
gci -r /mnt/vss/_work/1/.m2/repository -ErrorAction Continue | Write-Host
displayName: 'Show the current log4j versions in the cache'
continueOnError: true
32 changes: 32 additions & 0 deletions eng/pipelines/templates/jobs/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ jobs:
os: linux

steps:
- pwsh: |
Write-Host 'show the current log4j versions'
gci /mnt/vss | Write-Host
gci /mnt/vss/_work -ErrorAction Continue | Write-Host
gci -r /mnt/vss/_work/1/.m2/repository -ErrorAction Continue | Write-Host
displayName: 'Show the current log4j versions in the cache'
continueOnError: true


# Skip sparse checkout for the `azure-sdk-for-<lang>-pr` private mirrored repositories
# as we require the GitHub service connection to be loaded.
- ${{ if not(contains(variables['Build.DefinitionName'], 'java-pr')) }}:
Expand Down Expand Up @@ -174,6 +183,13 @@ jobs:
- script: |
python -m pip install markdown2==2.4.6 BeautifulSoup4==4.11.1
displayName: 'pip install markdown2 and BeautifulSoup4'
- pwsh: |
Write-Host 'show the current log4j versions'
gci /mnt/vss | Write-Host
gci /mnt/vss/_work -ErrorAction Continue | Write-Host
gci -r /mnt/vss/_work/1/.m2/repository -ErrorAction Continue | Write-Host
displayName: 'Show the current log4j versions in the cache'
continueOnError: true

- task: Maven@4
displayName: 'Build and Package, JDK Version: ${{ parameters.JavaBuildVersion }}'
Expand All @@ -187,6 +203,14 @@ jobs:
jdkArchitectureOption: 'x64'
publishJUnitResults: false

- pwsh: |
Write-Host 'show the current log4j versions'
gci /mnt/vss | Write-Host
gci /mnt/vss/_work -ErrorAction Continue | Write-Host
gci -r /mnt/vss/_work/1/.m2/repository -ErrorAction Continue | Write-Host
displayName: 'Show the current log4j versions in the cache'
continueOnError: true

- task: PowerShell@2
displayName: 'Verify Required Maven Artifacts'
inputs:
Expand Down Expand Up @@ -255,6 +279,14 @@ jobs:
parameters:
Artifacts: ${{ parameters.Artifacts }}

- pwsh: |
Write-Host 'show the current log4j versions'
gci /mnt/vss | Write-Host
gci /mnt/vss/_work/1 -ErrorAction Continue | Write-Host
gci -r /mnt/vss/_work/1/.m2/repository -ErrorAction Continue | Write-Host
displayName: 'Show the current log4j versions in the cache'
continueOnError: true

- template: /eng/pipelines/templates/steps/post-job-cleanup.yml

- job: 'Analyze'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ steps:
inputs:
# Note: CacheSalt is only intended to be used in special cases, as a build is queued, to force a cache miss.
# This would be set as a variable in the UI when the run is queued.
key: 'maven | "$(CacheSalt)" | "$(Agent.OS)" | $(Build.SourcesDirectory)/eng/versioning/external_dependencies.txt | "$(ProjectListSha256)" | "${{ parameters.JobType }}" | "$(TestFromSource)"'
key: 'ver2 | maven | "$(CacheSalt)" | "$(Agent.OS)" | $(Build.SourcesDirectory)/eng/versioning/external_dependencies.txt | "$(ProjectListSha256)" | "${{ parameters.JobType }}" | "$(TestFromSource)"'
path: $(MAVEN_CACHE_FOLDER)
displayName: Cache Maven local repo
4 changes: 2 additions & 2 deletions eng/pipelines/templates/variables/globals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ variables:
IsDebug: $[coalesce(variables['System.Debug'], 'false')]

# Sets the Maven log level to either the LogLevel passed in the manual pipeline run or the default 'warn'
MavenLogLevel: $[coalesce(variables['LogLevel'], 'warn')]
MavenLogLevel: $[coalesce(variables['LogLevel'], 'debug')]

# Maven build/test options
MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository
# See https://github.com/actions/virtual-environments/issues/1499 for more info about the wagon options
# If reports about Maven dependency downloads become more common investigate re-introducing "-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false", or other iterations of the configurations.
WagonOptions: '-Dmaven.wagon.httpconnectionManager.ttlSeconds=60 -Dmaven.wagon.http.pool=false'
DefaultOptions: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) --batch-mode --fail-at-end --settings eng/settings.xml $(WagonOptions)'
LoggingOptions: '-Dorg.slf4j.simpleLogger.defaultLogLevel=$(MavenLogLevel) -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
LoggingOptions: '-Dorg.slf4j.simpleLogger.defaultLogLevel=$(MavenLogLevel) -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=debug'
MemoryOptions: '-Xmx4096m'
DefaultSkipOptions: '-Dgpg.skip -Dmaven.javadoc.skip=true -Dcodesnippet.skip=true -Dspotbugs.skip=true -Dcheckstyle.skip=true -Drevapi.skip=true -DtrimStackTrace=false -Dspotless.apply.skip=true -Dspotless.check.skip=true'
DefaultTestOptions: '$(DefaultOptions) $(DefaultSkipOptions) -pl $(ProjectList)'
Expand Down
10 changes: 10 additions & 0 deletions sdk/parents/azure-client-sdk-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,16 @@
<groupId>org.revapi</groupId>
<artifactId>revapi-java</artifactId>
<version>0.26.1</version> <!-- {x-version-update;org.revapi:revapi-java;external_dependency} -->
<exclusions>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.revapi</groupId>
Expand Down