-
Notifications
You must be signed in to change notification settings - Fork 188
[Bug]: CheckForUpdates fails with 404 when fetching latest SHA from microsoft/AL-Go-PTE template #2185
Description
AL-Go version
8.1
Describe the issue
When running the "Update AL-Go System Files" workflow (CheckForUpdates action), the workflow
fails with a 404 error when attempting to retrieve the latest commit SHA from the template repository
https://github.com/microsoft/AL-Go-PTE@main.
The full error message is:
Unexpected error when running action. Error Message: Failed to update AL-Go System Files.
Could not get the latest SHA from template (https://github.com/microsoft/AL-Go-PTE@main).
(Error was The remote server returned an error: (404) Not Found. Not Found)
Stack trace points to:
GetLatestTemplateShainCheckForUpdates.HelperFunctions.ps1: line 83DownloadTemplateRepositoryinCheckForUpdates.HelperFunctions.ps1: line 56CheckForUpdates.ps1: line 64
Environment details:
- AL-Go Actions version: v8.1 (SHA:
5628b94ecf2f1f06fd6eed86e25027a60ae93ab6) - BcContainerHelper version: 6.1.11
- Runner: Windows Server 2025 (windows-latest hosted runner)
- Template URL configured:
https://github.com/microsoft/AL-Go-PTE@main - Template SHA stored in settings:
2b0291277622df06df2856bc05768be2ebb5a6b5 - Repo type: PTE
- The workflow was triggered via
workflow_dispatchwithdirectCommit=falseanddownloadLatest=true
Note: The repository calling this workflow is hosted on GitHub Enterprise Server (GHES), which
may be relevant if the GetLatestTemplateSha function uses API calls that require specific
authentication for accessing public github.com repositories from a GHES instance.
Expected behavior
The "Update AL-Go System Files" workflow should successfully retrieve the latest commit SHA from the
microsoft/AL-Go-PTE template repository on github.com, compare it with the stored templateSha,
and either update the AL-Go system files or report that no update is needed — completing the workflow
without errors.
Steps to reproduce
- Set up an AL-Go for GitHub repository (PTE type) on a GitHub Enterprise Server instance using
AL-Go v8.1. - Configure
templateUrlashttps://github.com/microsoft/AL-Go-PTE@mainin
.github/AL-Go-Settings.jsonor.AL-Go/settings.json. - Create a
ghTokenWorkflowsecret (GitHub App or PAT). - Trigger the "Update AL-Go System Files" workflow via
workflow_dispatchwith:directCommit: falsedownloadLatest: true
- Observe the workflow fails at the "Update AL-Go system files" step with a 404 error from
GetLatestTemplateSha.
Additional context (logs, screenshots, etc.)
Relevant log excerpt from the CheckForUpdates step:
TemplateUrl: https://github.com/microsoft/AL-Go-PTE@main
TemplateSha: 2b0291277622df06df2856bc05768be2ebb5a6b5
DownloadLatest: True
Get latest SHA for https://github.com/microsoft/AL-Go-PTE@main
The remote server returned an error: (404) Not Found.
Not Found
##[error]Unexpected error when running action. Error Message: Failed to update AL-Go System Files.
Could not get the latest SHA from template (https://github.com/microsoft/AL-Go-PTE@main).
(Error was The remote server returned an error: (404) Not Found. Not Found ),
StackTrace: at GetLatestTemplateSha,
D:\a\_actions\microsoft\AL-Go-Actions\v8.1\CheckForUpdates\CheckForUpdates.HelperFunctions.ps1: line 83
<- at DownloadTemplateRepository,
D:\a\_actions\microsoft\AL-Go-Actions\v8.1\CheckForUpdates\CheckForUpdates.HelperFunctions.ps1: line 56
<- at <ScriptBlock>,
D:\a\_actions\microsoft\AL-Go-Actions\v8.1\CheckForUpdates\CheckForUpdates.ps1: line 64
Note: Prior to reaching the template, the workflow successfully accessed the template repository
to verify it exists (HTTP 200 with empty content). The 404 occurs specifically when calling
GetLatestTemplateSha, suggesting the API endpoint used to resolve the branch/SHA may differ from
the initial check.