c.com Link checker fix - #2846
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2846 +/- ##
=======================================
Coverage 74.14% 74.14%
=======================================
Files 19 19
Lines 2352 2352
=======================================
Hits 1744 1744
Misses 608 608
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates canonical.com’s link-checking and sitemap configuration to address failing links and make the live link-check workflow more resilient to transient failures.
Changes:
- Allow
assets.ubuntu.comas a CSPframe-srcto unblock embedded content where needed. - Fix a broken sitemap index entry for Juju 12-factor v1 by pointing to the correct sitemap path.
- Enhance the live link-check GitHub Action to capture failures, wait 60 seconds, and retry failed URLs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
webapp/handlers.py |
Expands CSP frame-src to include assets.ubuntu.com for iframe/embed compatibility. |
templates/sitemap-index.xml |
Updates a Juju 12-factor v1 sitemap URL to resolve a failing/broken sitemap reference. |
.github/workflows/live-links.yaml |
Adds a two-pass linkchecker run with a 60s delay and retry for previously failed URLs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
c0f3ba3 to
d975ea6
Compare
…onfig into linkcheckerrc
… into link-checker-fix
| - name: Checkout | ||
| uses: actions/checkout@v4 |
|
@petesfrench Thank you for this piece of work. A few comments
That's it. 19 links in 21 URLs checked. 4 warnings found. 19 errors found.
Stopped checking at 2026-08-25 12:51:12+005 (40 seconds)
Links still broken after 3 attempts:
file:///lxd/docs
file:///microcloud/docs/default/tutorial/single-member/
file:///microcloud/docs/default/
file:///home/engr-ali/canonical/projects/canonical.com/images/layers-2x.png
file:///home/engr-ali/canonical/projects/canonical.com/../img/flags.webp
file:///home/engr-ali/canonical/projects/canonical.com/../img/globe.webp
file:///home/engr-ali/canonical/projects/canonical.com/../img/flags@2x.webp
file:///home/engr-ali/canonical/projects/canonical.com/../img/globe@2x.webp
file:///data/kafka/docs/4
file:///microcloud/docs/
file:///home/engr-ali/canonical/projects/canonical.com/images/layers.png
file:///home/engr-ali/canonical/projects/canonical.com/images/marker-icon.png
https://www.elektrobit.com/products/ecu/eb-corbos/linux-built-on-ubuntu/free?utm_source=Canonical
https://en.digitalchina.com
https://canonical-charmed-spark.readthedocs-hosted.com/main/
https://canonical-charmed-spark.readthedocs-hosted.com/main
https://repo1.dso.mil/dsop/canonical/ubuntu/pro-cis-stig-20.04/ubuntu-pro-cis-stig-20.04
https://software.af.mil/dsop/services/
http://www.flextronics.com/
|
muhammad-ali-pk
left a comment
There was a problem hiding this comment.
Left some comments from the code
| </sitemap> | ||
| <sitemap> | ||
| <loc>https://canonical.com/juju/docs/12-factor/v1/doc-sitemap.xml</loc> | ||
| <loc>https://canonical.com/juju/docs/12-factor/v1/sitemap.xml</loc> |
There was a problem hiding this comment.
This results in 404. The original one works as expected.
| - name: Checkout | ||
| uses: actions/checkout@v4 |
Done
QA
./scripts/check-links.shIssue / Card
Fixes https://warthogs.atlassian.net/browse/WD-38126