AL-Go icon indicating copy to clipboard operation
AL-Go copied to clipboard

Cannot find .yml file during clean up page scripting files

Open Will-Minter opened this issue 2 months ago • 6 comments

AL-Go version

8.0

Describe the issue

During Run-AlPipeline.ps1, after running page scripting, during the cleanup phase, the following line creates an error:

Line 2980: Remove-Item -Path $resultsFolder -Recurse -Force

Error: Unexpected error when running action. Error Message: Could not find a part of the path '090ada325e1c11ff078a565a8cc5f9412fff8405.yml'

Expected behavior

The page scripting files are cleaned up without any exceptions

Steps to reproduce

  • Using own runner on VM
  • A blank repo with 1 page script. The page script itself does not fail, it is just "open items page"
  • Run using latest AL-Go and BcContainerHelper 6.1.9-preview1359

Additional context (logs, screenshots, etc.)

Image

Will-Minter avatar Oct 31 '25 07:10 Will-Minter

@aholstrup1 are you the man to look into this one aswell, since you solved the last one

CNAEvidi avatar Oct 31 '25 08:10 CNAEvidi

AI Assessment: Complete ✅

The bug report contains all the required elements for analysis:

  1. AL-Go version: The version is specified as "8.0".
  2. Description of the issue: The issue is clearly described regarding the unexpected error that occurs during the cleanup phase of the Run-AlPipeline.ps1 script.
  3. Expected behavior: It states that the page scripting files should be cleaned up without exceptions.
  4. Steps to reproduce: The report outlines steps to reproduce the issue effectively, including details about using a VM and running a simple page script.

The report also includes an image as additional context, which could be helpful but isn't necessary for the bug's analysis.

Summary Checklist:

  • [x] AL-Go version provided
  • [x] Clear description of the problem
  • [x] Description of expected behavior
  • [x] Steps to reproduce the issue
  • [x] Additional context (logs, screenshots) provided (optional)

No logs were specified in the additional context section, but they are not required since the issue is described adequately.

Overall, this report is well-constructed and ready for a team member to begin working on it.

github-actions[bot] avatar Oct 31 '25 08:10 github-actions[bot]

When I replaced the line in question with the following snippet, the job ran without an error:

if (Test-Path $resultsFolder) { Remove-Item -Path $resultsFolder -Recurse -Force -ErrorAction SilentlyContinue }

Will-Minter avatar Oct 31 '25 08:10 Will-Minter

Interesting..

To understand the root cause, it would be nice to know:

  • Is this happening consistently when you run your page scripting test in your repo? If you've only seen it once, any chance you could retry? I wonder if some other process was interfering.
  • Do you see the same if you use a GitHub-runner?

That aside, we should add some better error handling 👍

aholstrup1 avatar Oct 31 '25 08:10 aholstrup1

It happens consistently. Have replicated it at least 10 times. We don't have a gitHub runner to try it on, so I can't answer Q2

Will-Minter avatar Oct 31 '25 08:10 Will-Minter

I merged a fix into bccontainerhelper (6.1.10-preview1363) so we shouldn't run into errors due to cleanup of the results folder.

I was never able to repro this from GitHub-hosted runners btw. Page scripting tests were working fine for me.

aholstrup1 avatar Nov 12 '25 07:11 aholstrup1