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

[build] delete platform-31 folder on test jobs #6103

Merged

Conversation

jonathanpeppers
Copy link
Member

Context: #6089

We currently have lots of test failures due to the warning:

warning XA1008: The TargetFrameworkVersion (Android API level 30) is lower than the targetSdkVersion (31). Please increase the `$(TargetFrameworkVersion)` or decrease the `android:targetSdkVersion` in the `AndroidManifest.xml` so that the API levels match.

Looking at Properties\AndroidManifest.xml, Xamarin.ProjectTools
generated:

<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />

This appears to be due to the GetMaxInstalledPlatform() method:

https://github.com/xamarin/xamarin-android/blob/1b71da0cd3a44861b006ac41c77a24eedf066281/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/AndroidSdkResolver.cs#L121-L138

I think what happened is:

And so we ended up with test failures...

To fix this for now, manually delete the sdk/platform-31 folder on
test jobs.

Context: dotnet#6089

We currently have lots of test failures due to the warning:

    warning XA1008: The TargetFrameworkVersion (Android API level 30) is lower than the targetSdkVersion (31). Please increase the `$(TargetFrameworkVersion)` or decrease the `android:targetSdkVersion` in the `AndroidManifest.xml` so that the API levels match.

Looking at `Properties\AndroidManifest.xml`, Xamarin.ProjectTools
generated:

    <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />

This appears to be due to the `GetMaxInstalledPlatform()` method:

https://github.com/xamarin/xamarin-android/blob/1b71da0cd3a44861b006ac41c77a24eedf066281/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/AndroidSdkResolver.cs#L121-L138

I think what happened is:

* dotnet#6089 is opened, platform-31 gets installed on many of the CI
  machines.
* Future PRs install `platform-31` side-by-side `platform-S`.

And so we ended up with test failures...

To fix this for now, manually delete the `sdk/platform-31` folder on
test jobs.
@jonathanpeppers jonathanpeppers force-pushed the delete-android-toolchain-sdk branch from 7d54432 to 86ff4d0 Compare July 20, 2021 02:57
@jonathanpeppers jonathanpeppers marked this pull request as ready for review July 20, 2021 03:07
@jonathanpeppers
Copy link
Member Author

This seems to have worked, I see it deleting files:

Generating script.
Script contents:
rm -rfv "$HOME/Library/Android/sdk/platforms/android-31"
========================== Starting Command Output ===========================
/bin/bash --noprofile --norc /Users/runner/work/_temp/7b27620b-100e-4ba6-b5ed-b5c85b56e8aa.sh
/Users/runner/Library/Android/sdk/platforms/android-31/core-for-system-modules.jar
/Users/runner/Library/Android/sdk/platforms/android-31/package.xml
/Users/runner/Library/Android/sdk/platforms/android-31/android.jar
/Users/runner/Library/Android/sdk/platforms/android-31/skins/WSVGA/background_port.png
...

https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=4996973&view=logs&j=28e101f7-a5d4-5072-d882-1de9b1157eea&t=4b39297b-abed-5a38-7214-e13de457d588&l=14

There are other failures like:

  Restored C:\a\_work\1\s\build-tools\xaprepare\xaprepare\package-download.proj (in 13.72 sec).
stderr | System.ArgumentException: An item with the same key has already been added. Key: Microsoft.NET.Runtime.Emscripten.Node
stderr |    at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) in System.Private.CoreLib.dll:token 0x6006799+0x1a0
stderr |    at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) in System.Private.CoreLib.dll:token 0x600678c+0x0
stderr |    at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.RefreshWorkloadManifests() in Microsoft.DotNet.TemplateLocator.dll:token 0x6000070+0x1fd
stderr |    at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver..ctor(IWorkloadManifestProvider manifestProvider, String[] dotnetRootPaths, String[] currentRuntimeIdentifiers) in Microsoft.DotNet.TemplateLocator.dll:token 0x600006f+0x31
stderr |    at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.Create(IWorkloadManifestProvider manifestProvider, String dotnetRootPath, String sdkVersion) in Microsoft.DotNet.TemplateLocator.dll:token 0x600006c+0x8a
stderr |    at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand..ctor(ParseResult parseResult, IReporter reporter, IWorkloadResolver workloadResolver, IInstaller workloadInstaller, INuGetPackageDownloader nugetPackageDownloader, IWorkloadManifestUpdater workloadManifestUpdater, String dotnetDir, String userHome, String tempDirPath, String version) in dotnet.dll:token 0x6000207+0x17f
stderr |    at Microsoft.DotNet.Workloads.Workload.WorkloadCommand.<get_SubCommands>b__9_0(ParseResult appliedOption) in dotnet.dll:token 0x6000152+0x0
stderr |    at Microsoft.DotNet.Cli.DotNetTopLevelCommandBase.RunCommand(String[] args) in dotnet.dll:token 0x6000938+0x44
stderr |    at Microsoft.DotNet.Workloads.Workload.WorkloadCommand.Run(String[] args) in dotnet.dll:token 0x6000150+0x6
stderr |    at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient) in dotnet.dll:token 0x60009a1+0x2e8
stderr |    at Microsoft.DotNet.Cli.Program.Main(String[] args) in dotnet.dll:token 0x600099f+0x6f
  Error: dotnet workload install failed.

I think we need #6098 for these.

@jonathanpeppers jonathanpeppers merged commit 21751b5 into dotnet:main Jul 20, 2021
@jonathanpeppers jonathanpeppers deleted the delete-android-toolchain-sdk branch July 20, 2021 13:12
jonathanpeppers added a commit that referenced this pull request Jul 20, 2021
Context: #6089

We currently have lots of test failures due to the warning:

    warning XA1008: The TargetFrameworkVersion (Android API level 30) is lower than the targetSdkVersion (31). Please increase the `$(TargetFrameworkVersion)` or decrease the `android:targetSdkVersion` in the `AndroidManifest.xml` so that the API levels match.

Looking at `Properties\AndroidManifest.xml`, Xamarin.ProjectTools
generated:

    <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />

This appears to be due to the `GetMaxInstalledPlatform()` method:

https://github.com/xamarin/xamarin-android/blob/1b71da0cd3a44861b006ac41c77a24eedf066281/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/AndroidSdkResolver.cs#L121-L138

I think what happened is:

* #6089 is opened, platform-31 gets installed on many of the CI
  machines.
* Future PRs install `platform-S` side-by-side `platform-31`.

And so we ended up with test failures...

To fix this for now, manually delete the `sdk/platform-31` folder on
test jobs.
thaystg added a commit to thaystg/xamarin-android that referenced this pull request Jul 23, 2021
…er_unhandled_exception

* origin/main:
  Bump to dotnet/installer@19943da 6.0.100-rc.1.21372.10 (dotnet#6110)
  [xaprepare] don't install microsoft-net-runtime-android workload (dotnet#6114)
  [Mono.Android] Use `mono_unhandled_exception` for NET6 (dotnet#6104)
  Bump to dotnet/installer@9c463710 6.0.100-rc.1.21369 (dotnet#6072)
  Bump to xamarin/xamarin-android-binutils/2.37-XA.1@77618674 v2.37 (dotnet#6096)
  [Mono.Android.Export] Fix DynamicDependency to JavaArray (dotnet#6105)
  [xaprepare] always delete ~/android-toolchain/dotnet (dotnet#6098)
  [CI] Add nuget to msi conversion and VS insert stage (dotnet#6030)
  [build] delete platform-31 folder on test jobs (dotnet#6103)
jonpryor pushed a commit to jonpryor/xamarin-android that referenced this pull request Aug 25, 2021
Context: dotnet#6089

We currently have lots of test failures due to the warning:

    warning XA1008: The TargetFrameworkVersion (Android API level 30) is lower than the targetSdkVersion (31). Please increase the `$(TargetFrameworkVersion)` or decrease the `android:targetSdkVersion` in the `AndroidManifest.xml` so that the API levels match.

Looking at `Properties\AndroidManifest.xml`, Xamarin.ProjectTools
generated:

    <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />

This appears to be due to the `GetMaxInstalledPlatform()` method:

https://github.com/xamarin/xamarin-android/blob/1b71da0cd3a44861b006ac41c77a24eedf066281/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/AndroidSdkResolver.cs#L121-L138

I think what happened is:

* dotnet#6089 is opened, platform-31 gets installed on many of the CI
  machines.
* Future PRs install `platform-S` side-by-side `platform-31`.

And so we ended up with test failures...

To fix this for now, manually delete the `sdk/platform-31` folder on
test jobs.
jonpryor pushed a commit that referenced this pull request Aug 26, 2021
Context: #6089

We currently have lots of test failures due to the warning:

    warning XA1008: The TargetFrameworkVersion (Android API level 30) is lower than the targetSdkVersion (31). Please increase the `$(TargetFrameworkVersion)` or decrease the `android:targetSdkVersion` in the `AndroidManifest.xml` so that the API levels match.

Looking at `Properties\AndroidManifest.xml`, Xamarin.ProjectTools
generated:

    <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />

This appears to be due to the `GetMaxInstalledPlatform()` method:

https://github.com/xamarin/xamarin-android/blob/1b71da0cd3a44861b006ac41c77a24eedf066281/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/AndroidSdkResolver.cs#L121-L138

I think what happened is:

* #6089 is opened, platform-31 gets installed on many of the CI
  machines.
* Future PRs install `platform-S` side-by-side `platform-31`.

And so we ended up with test failures...

To fix this for now, manually delete the `sdk/platform-31` folder on
test jobs.
jpobst added a commit that referenced this pull request Oct 6, 2021
jonpryor pushed a commit that referenced this pull request Oct 7, 2021
Reverts: #6103

This reverts commit 21751b5.

API-31 is stable and is now expected to be on CI machines in the
final location (`…/platforms/android-31`), not at `…/android-S`.
pjcollins pushed a commit to pjcollins/android that referenced this pull request Dec 15, 2021
Context: dotnet#6089

We currently have lots of test failures due to the warning:

    warning XA1008: The TargetFrameworkVersion (Android API level 30) is lower than the targetSdkVersion (31). Please increase the `$(TargetFrameworkVersion)` or decrease the `android:targetSdkVersion` in the `AndroidManifest.xml` so that the API levels match.

Looking at `Properties\AndroidManifest.xml`, Xamarin.ProjectTools
generated:

    <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />

This appears to be due to the `GetMaxInstalledPlatform()` method:

https://github.com/xamarin/xamarin-android/blob/1b71da0cd3a44861b006ac41c77a24eedf066281/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/AndroidSdkResolver.cs#L121-L138

I think what happened is:

* dotnet#6089 is opened, platform-31 gets installed on many of the CI
  machines.
* Future PRs install `platform-S` side-by-side `platform-31`.

And so we ended up with test failures...

To fix this for now, manually delete the `sdk/platform-31` folder on
test jobs.
@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants