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

[ci] Update path for generated *.include.* files #8980

Merged

Conversation

jonpryor
Copy link
Member

Context: a7b5768
Context: a0b7aad

Ever since commit a0b7aad, the Prepare .NET Release > Push Internal job has been failing:

Step Xamarin.Android.Prepare.Step_CopyExtraResultFilesForCI failed: Could not find a part of the path 'D:\a\_work\1\s\src\monodroid\jni'.
System.InvalidOperationException: Step Xamarin.Android.Prepare.Step_CopyExtraResultFilesForCI failed: Could not find a part of the path 'D:\a\_work\1\s\src\monodroid\jni'.
 ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\a\_work\1\s\src\monodroid\jni'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
   at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)
   at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at System.IO.Directory.GetFiles(String path, String searchPattern, EnumerationOptions enumerationOptions)
   at Xamarin.Android.Prepare.Step_CopyExtraResultFilesForCI.CopyExtraBuildFiles(String destinationRoot, Context context) in D:\a\_work\1\s\build-tools\xaprepare\xaprepare\Steps\Step_CopyExtraResultFilesForCI.cs:line 72
   at Xamarin.Android.Prepare.Step_CopyExtraResultFilesForCI.<>c__DisplayClass1_0.<Execute>b__0() in D:\a\_work\1\s\build-tools\xaprepare\xaprepare\Steps\Step_CopyExtraResultFilesForCI.cs:line 24
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at Xamarin.Android.Prepare.Step_CopyExtraResultFilesForCI.Execute(Context context) in D:\a\_work\1\s\build-tools\xaprepare\xaprepare\Steps\Step_CopyExtraResultFilesForCI.cs:line 22
   at Xamarin.Android.Prepare.Step.Run(Context context) in D:\a\_work\1\s\build-tools\xaprepare\xaprepare\Application\Step.cs:line 42
   at Xamarin.Android.Prepare.Scenario.Run(Context context, Log log) in D:\a\_work\1\s\build-tools\xaprepare\xaprepare\Application\Scenario.cs:line 37
   --- End of inner exception stack trace ---
   at Xamarin.Android.Prepare.Scenario.Run(Context context, Log log) in D:\a\_work\1\s\build-tools\xaprepare\xaprepare\Application\Scenario.cs:line 48
   at Xamarin.Android.Prepare.Context.Execute() in D:\a\_work\1\s\build-tools\xaprepare\xaprepare\Application\Context.cs:line 511
   at Xamarin.Android.Prepare.App.Run(String[] args) in D:\a\_work\1\s\build-tools\xaprepare\xaprepare\Main.cs:line 162

The InvalidOperationException is thrown because commit a7b5768 reorganized things; src/monodroid/jni no longer exists, and thus attempting to read that directory will fail.

Update Step_CopyExtraResultFilesForCI.CopyExtraBuildFiles() to instead look for src/native/monodroid/*.include.* files. This should fix the InvalidOperationException.

Context: a7b5768
Context: a0b7aad

Ever since commit a0b7aad, the **Prepare .NET Release** >
**Push Internal** job has been failing:

	Step Xamarin.Android.Prepare.Step_CopyExtraResultFilesForCI failed: Could not find a part of the path 'D:\a\_work\1\s\src\monodroid\jni'.
	System.InvalidOperationException: Step Xamarin.Android.Prepare.Step_CopyExtraResultFilesForCI failed: Could not find a part of the path 'D:\a\_work\1\s\src\monodroid\jni'.
	 ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\a\_work\1\s\src\monodroid\jni'.
	   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
	   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
	   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
	   at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)
	   at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
	   at System.IO.Directory.GetFiles(String path, String searchPattern, EnumerationOptions enumerationOptions)
	   at Xamarin.Android.Prepare.Step_CopyExtraResultFilesForCI.CopyExtraBuildFiles(String destinationRoot, Context context) in D:\a\_work\1\s\build-tools\xaprepare\xaprepare\Steps\Step_CopyExtraResultFilesForCI.cs:line 72
	   at Xamarin.Android.Prepare.Step_CopyExtraResultFilesForCI.<>c__DisplayClass1_0.<Execute>b__0() in D:\a\_work\1\s\build-tools\xaprepare\xaprepare\Steps\Step_CopyExtraResultFilesForCI.cs:line 24
	   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
	--- End of stack trace from previous location ---
	   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
	   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
	--- End of stack trace from previous location ---
	   at Xamarin.Android.Prepare.Step_CopyExtraResultFilesForCI.Execute(Context context) in D:\a\_work\1\s\build-tools\xaprepare\xaprepare\Steps\Step_CopyExtraResultFilesForCI.cs:line 22
	   at Xamarin.Android.Prepare.Step.Run(Context context) in D:\a\_work\1\s\build-tools\xaprepare\xaprepare\Application\Step.cs:line 42
	   at Xamarin.Android.Prepare.Scenario.Run(Context context, Log log) in D:\a\_work\1\s\build-tools\xaprepare\xaprepare\Application\Scenario.cs:line 37
	   --- End of inner exception stack trace ---
	   at Xamarin.Android.Prepare.Scenario.Run(Context context, Log log) in D:\a\_work\1\s\build-tools\xaprepare\xaprepare\Application\Scenario.cs:line 48
	   at Xamarin.Android.Prepare.Context.Execute() in D:\a\_work\1\s\build-tools\xaprepare\xaprepare\Application\Context.cs:line 511
	   at Xamarin.Android.Prepare.App.Run(String[] args) in D:\a\_work\1\s\build-tools\xaprepare\xaprepare\Main.cs:line 162

The `InvalidOperationException` is thrown because commit a7b5768
reorganized things; `src/monodroid/jni` *no longer exists*, and thus
attempting to read that directory will fail.

Update `Step_CopyExtraResultFilesForCI.CopyExtraBuildFiles()` to
instead look for `src/native/monodroid/*.include.*` files.
This should fix the `InvalidOperationException`.
@jonpryor jonpryor requested a review from grendello as a code owner May 23, 2024 20:51
Copy link
Member

@pjcollins pjcollins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -- the other issues affecting this job should hopefully be addressed by commit f834b55 and https://portal.microsofticm.com/imp/v3/outages/details/506472816/overview when resolved

@jonpryor jonpryor merged commit c611743 into main May 28, 2024
45 of 48 checks passed
@jonpryor jonpryor deleted the dev/jonp/jonp-fix-PushInternal-Step_CopyExtraResultFilesForCI branch May 28, 2024 18:17
grendello added a commit that referenced this pull request Jun 3, 2024
* main:
  [ci] Update .NET version installed for MAUI tests (#8995)
  [ci] Run "Push Internal" job on AzurePipelines-EO pool (#8991)
  [Xamarin.Android.Build.Tasks] LLVM Marshal Methods by Default, Take 2 (#8925)
  $(AndroidPackVersionSuffix)=preview.6; net9 is 34.99.0.preview.6 (#8989)
  [ci] Update path for generated `*.include.*` files (#8980)
  Bump to xamarin/xamarin-android-tools/main@da2c33e (#8984)
  Bump to xamarin/Java.Interop/main@f935001 (#8985)
  Bump to xamarin/monodroid@93ab95e18 (#8959)
  Force loc task pool image to windows (#8983)
  [git] Re-format `.gitmodules` (#8978)
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 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.

3 participants