diff --git a/.github/workflows/framework-tests.yml b/.github/workflows/framework-tests.yml index b095a71..4358241 100644 --- a/.github/workflows/framework-tests.yml +++ b/.github/workflows/framework-tests.yml @@ -125,13 +125,19 @@ jobs: # outright (apt-get update stalls on endless "Ign:" retries instead of # failing) — same root cause as the timeout guard above. Point apt at # the direct global mirror before Playwright's installer shells out to - # apt-get, instead of just waiting longer. + # apt-get, instead of just waiting longer. Use https: plain http to + # archive.ubuntu.com has also stalled ~30s per index file before apt + # falls back to https, which alone used up the 15-minute job budget + # (kagent-dev/website#568). The short timeout makes any remaining dead + # endpoint fail over in seconds rather than half a minute. - name: Work around flaky azure.archive.ubuntu.com apt mirror run: | - sudo sed -i 's|azure\.archive\.ubuntu\.com|archive.ubuntu.com|g' \ + sudo sed -i -E 's|http://(azure\.)?archive\.ubuntu\.com|https://archive.ubuntu.com|g' \ /etc/apt/sources.list \ /etc/apt/sources.list.d/*.sources \ /etc/apt/apt-mirrors.txt 2>/dev/null || true + printf 'Acquire::http::Timeout "10";\nAcquire::https::Timeout "10";\n' \ + | sudo tee /etc/apt/apt.conf.d/99-ci-timeout >/dev/null - name: Install chromium working-directory: docs-theme-extras diff --git a/.github/workflows/pr-tracker-open-drafts.yml b/.github/workflows/pr-tracker-open-drafts.yml index a2b4c34..44d5d2d 100644 --- a/.github/workflows/pr-tracker-open-drafts.yml +++ b/.github/workflows/pr-tracker-open-drafts.yml @@ -531,8 +531,21 @@ jobs: def in_docs(needle): return ref_git("grep", "-q", "-F", "-e", needle, base, "--", *paths).returncode == 0 + # A draft citing the code pull request it documents is expected, and that + # link is in neither the pull request's own diff nor main, so without this + # every draft that cites its source was flagged. A link to one of its tabs + # (`/files`, `/commits`, `/changes`) is the same pull request. + own_prs = {f"github.com/{r.replace('#', '/pull/')}".lower() for r in code_prs} + + def is_own_pr(value): + bare = re.sub(r"^https?://(?:www\.)?", "", value).split("#")[0].split("?")[0].rstrip("/").lower() + bare = re.sub(r"/(?:files|commits|changes)(?:/.*)?$", "", bare) + return bare in own_prs + rows = [] for kind, value in refs: + if kind == "URL" and is_own_pr(value): + continue if value in code_text or in_docs(value): continue host = re.sub(r"^[a-z]+://", "", value).split("/")[0] if kind in ("URL", "OCI reference", "image") else "" diff --git a/go.mod b/go.mod index 85039e8..5c53334 100644 --- a/go.mod +++ b/go.mod @@ -5,4 +5,4 @@ go 1.25.1 // docs-theme-extras declares the hextra import itself (pinned to v0.12.3), so // hextra is a transitive dependency and is not listed here — matching // agentgateway / kgateway / ambientmesh. Its checksums stay in go.sum. -require github.com/solo-io/docs-theme-extras v0.3.8 // indirect +require github.com/solo-io/docs-theme-extras v0.3.16 // indirect diff --git a/go.sum b/go.sum index 3287469..3220a0f 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,6 @@ github.com/solo-io/docs-theme-extras v0.3.8 h1:adccTdWRD21FHUhxv49RKW3VbP+y7d+jXzZMxADAWoM= github.com/solo-io/docs-theme-extras v0.3.8/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= +github.com/solo-io/docs-theme-extras v0.3.15 h1:Wx44OmemNz4Ptoxc7dFuGkf86fTJ30mcAo6rdCivaEU= +github.com/solo-io/docs-theme-extras v0.3.15/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= +github.com/solo-io/docs-theme-extras v0.3.16 h1:lPSS9awzzgeD39h32v3gEISlerOr0rEwi+QW3yy7b3A= +github.com/solo-io/docs-theme-extras v0.3.16/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg=