comment action fails during job setup: apt cannot resolve Ubuntu mirrors in Docker build
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start by reading the comment action's Dockerfile and action.yml, then inspect clearOldComments.ps1 and the failing comment-on-pull-request workflow runs linked in the issue. Compare the proposed approaches and check how the tool action builds its image. Done means the comment action can set up reliably without depending on Ubuntu mirror DNS during each job.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
The comment action fails during Set up job on GitHub-hosted runners because its Dockerfile runs apt update / apt install at image build time, and the Ubuntu mirrors cannot be resolved from inside the Docker build. Since the failure happens while the action image is being built (before any step runs), continue-on-error: true on the consuming step does not apply, and the whole job fails.
This currently fails every pull request run of the surface-area-tests workflow in microsoft/kiota (the comment-on-pull-request jobs).
Evidence
- Failing runs (persistent, including after a re-run ~35 minutes later):
- https://github.com/microsoft/kiota/actions/runs/43044321086 (original attempt and re-run, microsoft/kiota#8585)
- https://github.com/microsoft/kiota/actions/runs/43043195979 (microsoft/kiota#8584)
- Last known success: https://github.com/microsoft/kiota/actions/runs/42988292422 (2026-11-11 08:45 UTC)
- Action ref:
microsoftgraph/kiota-dom-export-diff-tool/comment@e32a993776c40f03dce8c55ff7a607ed21011945 - Same runner image in success and failure:
ubuntu-24.04, version20261101.360.1, runner2.338.2 - Same base image digest in success and failure:
mcr.microsoft.com/powershell:latest@sha256:810c4f1e0c9d23022c3ec18c50a6205ee4b60766f1739d329b2948df1fd7d5b0 archive.ubuntu.com/security.ubuntu.comresolve and respond normally from outside GitHub Actions, so this does not look like an Ubuntu mirror outage.
Log excerpt:
#8 [4/7] RUN apt update && apt install -y curl gpg && apt clean;
#8 12.30 Could not resolve 'security.ubuntu.com'
#8 12.63 Could not resolve 'archive.ubuntu.com'
#8 12.65 W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy/InRelease Could not resolve 'archive.ubuntu.com'
#8 12.67 E: Unable to locate package curl
#8 12.67 E: Unable to locate package gpg
#8 ERROR: process "/bin/sh -c apt update && apt install -y curl gpg && apt clean;" did not complete successfully: exit code: 100
##[error]Docker build failed with exit code 1
Suggested fixes
Any of the following would remove the per-run dependency on the Ubuntu mirrors:
- Convert
commentto a composite action that runsclearOldComments.ps1withpwshand theghCLI already preinstalled on GitHub-hosted runners. No image build, no apt. (This is the approach microsoft/kiota#8586 takes inline.) - Publish prebuilt images (e.g. to GHCR) and reference them from
action.ymlviaimage: docker://...@sha256:.... This also benefits thetoolaction, which currently compiles .NET on every run. It requires a publish workflow onmainplus a scheduled rebuild to pick up base image and package security updates, and a process to bump the digest inaction.yml. - Pin the base image (
mcr.microsoft.com/powershellis currentlylatest) regardless of the option chosen, to make builds reproducible.
Minor, while in there: clearOldComments.ps1 reads the comment with Get-Content (returns an array of lines) and passes it to gh pr comment -b; Get-Content -Raw or --body-file would preserve the file content as-is.
- Lingua principale
- C#
- Stelle
- 0
- Fork
- 4
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoftgraph/kiota-dom-export-diff-tool
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
Tutte le issue di microsoftgraph/kiota-dom-export-diff-tool
Issue simili
-
🐛 bug 🕒 low effort good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
guibranco/Sankhya-SDK-dotnet#654 ·
I maintainer di solito rispondono entro 1 giorno
-
a-corriger bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
christian-raj/S-Aloha#340 ·
-
遇到超大文件会卡住Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 4 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/microsoft-ui-reactor#1626 ·
I maintainer di solito rispondono entro 1 giorno
-
Triage:Untriaged Type:Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100