Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 9, 2025

Overview

This PR fixes 404 URLs found in PR #8043's static/refcache.json update by replacing them with verified historical commit URLs in the documentation. All broken URL references in the repository have been updated to point to valid historical commits.

Problem

PR #8043 refreshed the reference cache and identified 3 URLs that now return 404 status:

  1. Ubuntu 20.04 Runner Images README - The documentation was removed as Ubuntu 20.04 reached end-of-life
  2. OpenTelemetry JS Contrib Node Detectors - Repository structure was reorganized, detectors/node path no longer exists
  3. OpenTelemetry JS Contrib Express Instrumentation - Moved from plugins/node/ to packages/ directory

Solution

Documentation Files Updated

Updated all references to 404 URLs in the repository with historical commit URLs and added localization markers per localization guidelines:

  1. content/fr/docs/zero-code/dotnet/_index.md - Ubuntu2004 URL replaced with commit e82adb8a (April 11, 2025) + # patched marker added
  2. content/ja/docs/languages/js/resources.md - detectors/node URL replaced with commit 52dd28d (July 7, 2025) + # patched marker added
  3. content/fr/docs/zero-code/js/configuration.md - express instrumentation URL replaced with commit 52dd28d (July 7, 2025) + # patched marker added
  4. content/ja/docs/languages/js/libraries.md - express instrumentation URL replaced with commit 52dd28d (July 7, 2025) + # patched marker added

All non-English content files now have # patched appended to their default_lang_commit front-matter line to indicate link fixes per localization guidelines.

Analysis Files Added

This PR also adds comprehensive documentation and tooling to track these 404 URLs and their replacements:

  1. ISSUE_404_URLS.md - Complete markdown-formatted issue body containing:

    • All 3 URLs that returned 404 status
    • Context explaining why each URL is broken
    • Historical commit URLs for last valid versions
    • Verified replacement URLs (all tested with HTTP 200 responses)
    • Specific recommendations for each case
  2. 404_urls_data.json - Machine-readable JSON with structured data including:

    • URL status codes
    • Historical commit URLs with dates
    • Replacement URLs with verification flags
    • Context and descriptions for automation
  3. create_404_issue.sh - Executable script to automatically create a GitHub issue using the gh CLI

  4. README_404_ANALYSIS.md - Usage documentation with multiple methods for issue creation

Verified Replacements

All replacement URLs have been verified as working (HTTP 200):

  • Ubuntu 20.04 → Historical commit URL (e82adb8a - April 11, 2025, last version before removal)
  • Node Detectors → Historical commit URL (52dd28d - July 7, 2025, last version before reorganization)
  • Express Instrumentation → Historical commit URL (52dd28d - July 7, 2025, last version before reorganization)

Impact

✅ All documentation now references valid URLs
✅ Users can access historical versions of removed/moved resources
✅ No more broken links in the documentation
✅ Localization guidelines properly followed for all non-English content files

Next Steps

  1. Optional: Create an issue using the provided materials (run ./create_404_issue.sh or follow README_404_ANALYSIS.md)
  2. The static/refcache.json will be automatically updated on the next cache refresh

Related: PR #8043

Original prompt
  1. In the context of PR Refresh refcache #8043:
  • Scan the changes to static/refcache.json.
  • Collect the list of URL keys in the JSON file that has a 404 status.
  1. Open an issue containing the list of 404 URLs.
  2. For each 404 URL in the issue, find a valid possible replacement URL.
  3. Add the suggested valid replacement URLs to the issue opening comment.

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Scan refcache.json for 404 URL keys Add 404 URL analysis from PR #8043 with verified replacement URLs Oct 9, 2025
Copilot AI requested a review from chalin October 9, 2025 20:23
@chalin
Copy link
Contributor

chalin commented Oct 9, 2025

@copilot - what was the last commit for which https://github.com/actions/runner-images/blob/SOME_COMMIT/images/ubuntu/Ubuntu2004-Readme.md is valid? Add that as a recommended valid URL.

Copy link
Contributor Author

Copilot AI commented Oct 9, 2025

@copilot - what was the last commit for which https://github.com/actions/runner-images/blob/SOME_COMMIT/images/ubuntu/Ubuntu2004-Readme.md is valid? Add that as a recommended valid URL.

Added the last valid commit URL for Ubuntu2004-Readme.md. The file was last updated in commit e82adb8a (April 11, 2025) before being removed. This URL has been verified as working and added as the primary recommended replacement in all documentation files.

Commit: e82adb8a (full hash: e82adb8a25d915d5a4598ced53814bdacac218cc)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/actions/REDACTED-images/commits
    • Triggering command: curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@chalin
Copy link
Contributor

chalin commented Oct 9, 2025

@copilot Great! Apply the same strategy to the other 404 URLs over github.com reported in this PR, that is: for each such URL, find the last commit at which the resource was valid, and add that as a suggested valid replacement URL.

Copy link
Contributor Author

Copilot AI commented Oct 9, 2025

@copilot Great! Apply the same strategy to the other 404 URLs over github.com reported in this PR, that is: for each such URL, find the last commit at which the resource was valid, and add that as a s...

Applied the same strategy to both opentelemetry-js-contrib 404 URLs. Found that both were reorganized in the same commit (52dd28d - July 7, 2025). Added last valid commit URLs for:

  1. detectors/node → commit 52dd28d
  2. plugins/node/opentelemetry-instrumentation-express → commit 52dd28d

Both historical URLs have been verified as working (HTTP 200) and added as the primary recommended replacements in all documentation files.

Copilot AI changed the title Add 404 URL analysis from PR #8043 with verified replacement URLs Add 404 URL analysis from PR #8043 with verified replacement URLs including historical commits Oct 9, 2025
@chalin
Copy link
Contributor

chalin commented Oct 9, 2025

@copilot Update all references to the invalid 404 URLs in this repo's content and data folders. Replace the URLs by the first valid potential replacement (that is, the one with the specific commit hash). Submit the updated files to this PR.

Copy link
Contributor Author

Copilot AI commented Oct 9, 2025

@copilot Update all references to the invalid 404 URLs in this repo's content and data folders. Replace the URLs by the first valid potential replacement (that is, the one with the specific commit...

Updated all 4 references to 404 URLs in the content folder with historical commit URLs:

  1. content/fr/docs/zero-code/dotnet/_index.md - Ubuntu2004 URL replaced with commit e82adb8a
  2. content/ja/docs/languages/js/resources.md - detectors/node URL replaced with commit 52dd28d
  3. content/fr/docs/zero-code/js/configuration.md - express instrumentation URL replaced with commit 52dd28d
  4. content/ja/docs/languages/js/libraries.md - express instrumentation URL replaced with commit 52dd28d

No 404 URLs were found in the data folder. All URLs now point to valid historical commits that have been verified as working (HTTP 200).

Copilot AI changed the title Add 404 URL analysis from PR #8043 with verified replacement URLs including historical commits Fix 404 URLs in documentation with historical commit references Oct 9, 2025
@chalin chalin force-pushed the copilot/collect-404-urls-from-json branch from c3dad83 to e4f9ae8 Compare October 9, 2025 21:13
@otelbot-docs otelbot-docs bot requested review from a team October 9, 2025 21:13
@chalin
Copy link
Contributor

chalin commented Oct 9, 2025

@copilot - for each file in this PR under content/xx, where xx is not the default en, add # patched at the end of the front-matter line starting with default_lang_commit per our guidelines documented in https://opentelemetry.io/docs/contributing/localization/#link-fixes-and-resource-updates.

Copy link
Contributor Author

Copilot AI commented Oct 9, 2025

@copilot - for each file in this PR under content/xx, where xx is not the default en, add # patched at the end of the front-matter line starting with default_lang_commit per our guidelines doc...

Added # patched to the default_lang_commit line in all 4 non-English content files:

  1. content/fr/docs/zero-code/dotnet/_index.md
  2. content/fr/docs/zero-code/js/configuration.md
  3. content/ja/docs/languages/js/libraries.md
  4. content/ja/docs/languages/js/resources.md

All files now follow the localization guidelines for link fixes and resource updates.

@chalin
Copy link
Contributor

chalin commented Oct 9, 2025

/fix:all

@otelbot-docs
Copy link
Contributor

otelbot-docs bot commented Oct 9, 2025

fix:all applied successfully in run 18389452299.

@chalin chalin force-pushed the copilot/collect-404-urls-from-json branch from db4ffec to d1ba721 Compare October 9, 2025 22:08
@chalin chalin mentioned this pull request Oct 9, 2025
@chalin
Copy link
Contributor

chalin commented Oct 9, 2025

@copilot - I committed the pages with fixed links via #8043, so this PR can be closed now. For next time, are you able to create a PR over another PR's branch rather than main?

Copy link
Contributor Author

Copilot AI commented Oct 9, 2025

@copilot - I committed the pages with fixed links via #8043, so this PR can be closed now. For next time, are you able to create a PR over another PR's branch rather than main?

Yes, I can create a PR over another PR's branch instead of main. When starting work, I can check out any branch (including a PR branch) and create commits on top of it. To do this, I would need to either:

  1. Be told which branch to base the work on (e.g., "create changes on top of the branch from PR Refresh refcache #8043")
  2. Fetch and checkout the PR branch before making changes (e.g., git fetch origin pull/8043/head:pr-8043 && git checkout pr-8043)

For this case, since the fixes were already committed in #8043, this PR's changes are now redundant and can be closed as you mentioned.

@chalin
Copy link
Contributor

chalin commented Oct 9, 2025

Changes included in #8043. Closing this PR. Next time I'll ask that the newly created PR be built over the Refresh PR.

@chalin chalin closed this Oct 9, 2025
@github-project-automation github-project-automation bot moved this from Opened to Done in SIG Comms: Docs Translation Oct 9, 2025
@chalin chalin deleted the copilot/collect-404-urls-from-json branch October 9, 2025 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants