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

fix: Change the TEMP folder for Gradle tests to home for Windows #690

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

lucashuy
Copy link
Contributor

@lucashuy lucashuy commented Oct 9, 2024

Issue #, if available:
None.

Description of changes:
Something changed within the runner environment, causing all Java Gradle tests to fail with the following error message:

 * What went wrong:

Gradle could not start your build.
> Could not create service of type BuildLifecycleController using ServicesProvider.createBuildLifecycleController().
   > Could not create service of type BuildModelController using VintageBuildControllerProvider.createBuildModelController().
      > Could not create service of type OutputFilesRepository using ExecutionBuildServices.createOutputFilesRepository().
         > java.io.IOException: Cannot delete file: C:\Users\RUNNER~1\AppData\Local\Temp\tmpale85rhe\gradle-cache\buildOutputCleanup\buildOutputCleanup.lock

I still don't know why this is the case, but we can update the folder we point Gradle to, to a the home directory of the runner as a workaround.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@lucashuy lucashuy marked this pull request as ready for review October 9, 2024 22:11
@lucashuy lucashuy requested a review from a team as a code owner October 9, 2024 22:11
@lucashuy lucashuy requested review from sidhujus and dkphm October 9, 2024 22:11
# the default TEMP folder location in Github Actions
#
# use the runner's home directory as a workaround
scratch_folder_override = os.getenv("userprofile")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to create another folder under userprofile so that test files won't clash with each other?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shouldn't need to, the tempfile library creates unique folder names each time that shouldn't clash with anything in the existing directory. We'll probably want to create a subfolder if this was a normal test, for a normal user just to keep things nice and tidy. But since this is the CI runner, I'm sure the runner won't mind

@lucashuy lucashuy added this pull request to the merge queue Oct 10, 2024
Merged via the queue into aws:develop with commit 1b91ffb Oct 10, 2024
117 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants