Skip to content

fix: stop expected fetch failures raising spurious Sentry issues - #126

Merged
pooleycodes merged 5 commits into
mainfrom
120-sentry---failure-to-download-aws-paths-in-github-config
Jul 15, 2026
Merged

fix: stop expected fetch failures raising spurious Sentry issues#126
pooleycodes merged 5 commits into
mainfrom
120-sentry---failure-to-download-aws-paths-in-github-config

Conversation

@pooleycodes

@pooleycodes pooleycodes commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Fixes three sources of spurious Sentry issues raised for expected/handled failures during Check URL and Add Data processing:

  • esridump JSON-parse noise: the arcgis fallback plugin is tried against every fetched URL, including ones that are obviously not ArcGIS FeatureServers. When that probe fails, esridump logs at ERROR level internally before re-raising an exception that's already caught and handled one level up — Sentry's logging integration was capturing that as an issue regardless. Now ignored via ignore_logger("esridump.dumper").
  • Expected Check URL errors treated as issues: _capture_sentry_event(handled=True) called capture_message(level="warning"), but in Sentry a message's level only sets severity — it's still filed as an alertable Issue. Expected user errors (bad/unreachable URLs) are now recorded as a sentry_sdk.metrics.count counter plus a structured sentry_sdk.logger.warning log entry (full detail preserved, searchable), instead of creating an Issue. Genuinely unexpected errors (handled=False) are unchanged and still captured as Issues.
  • Dead fallback download removed: fetch_pipeline_csvs tried digital-land/<collection>-collection/main/pipeline/*.csv before falling back to the central digital-land/config repo. The per-collection repos have all been retired into the digital-land-attic org, so this first attempt now 404s for every collection on every run, adding a wasted request and (via the blanket logger.error in download_file) a Sentry issue each time. Removed, so this now goes straight to CONFIG_URL, matching the pattern already used elsewhere in workflow.py.

Related Tickets & Documents

QA Instructions, Screenshots, Recordings

  • Ran the affected unit tests locally: pytest tests/unit/src/application/core/test_workflow.py (19 passed).
  • Manually verified the removed collection-repo URL 404s for several collections (brownfield-land, conservation-area, listed-building-outline, tree-preservation-order, article-4-direction) and that the central config repo URL resolves for the same paths.

Added/updated tests?

  • Yes

[optional] Are there any post deployment tasks we need to perform?

None.

[optional] Are there any dependencies on other PRs or Work?

None.

@pooleycodes pooleycodes linked an issue Jul 14, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@pooleycodes, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 44 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6b1331fd-ac97-4956-aaf3-8250674deb9a

📥 Commits

Reviewing files that changed from the base of the PR and between 1fc535f and 0e4c330.

📒 Files selected for processing (3)
  • request-processor/requirements/test_requirements.txt
  • request-processor/src/application/core/workflow.py
  • request-processor/src/tasks.py

Walkthrough

Changes

Pipeline CSV downloads

Layer / File(s) Summary
Direct pipeline CSV fetch
request-processor/src/application/core/workflow.py, request-processor/tests/unit/src/application/core/test_workflow.py
Pipeline CSVs use a single CONFIG_URL-based download path, and the unit test verifies the updated URL.

Sentry error handling

Layer / File(s) Summary
Handled and unhandled Sentry events
request-processor/src/tasks.py
Expected errors are logged and counted without creating Sentry issues, while unexpected errors are tagged and captured at error level; esridump.dumper errors are ignored during Sentry initialisation.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: gibahjoe

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: expected fetch failures no longer create spurious Sentry issues.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 120-sentry---failure-to-download-aws-paths-in-github-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@request-processor/src/application/core/workflow.py`:
- Around line 325-326: Update the download handling try/except in the workflow
to catch both URLError and socket.timeout, rather than only HTTPError, so all
exceptions re-raised by download_file are logged and the workflow continues
without crashing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8b19bc5f-a242-44cf-8e88-2a275ddeae06

📥 Commits

Reviewing files that changed from the base of the PR and between ef0414f and 1fc535f.

📒 Files selected for processing (3)
  • request-processor/src/application/core/workflow.py
  • request-processor/src/tasks.py
  • request-processor/tests/unit/src/application/core/test_workflow.py

Comment thread request-processor/src/application/core/workflow.py Outdated
@pooleycodes pooleycodes changed the title change url error to metric, stop arcgis parse error, remove old -coll… fix: stop expected fetch failures raising spurious Sentry issues Jul 14, 2026
@pooleycodes
pooleycodes marked this pull request as ready for review July 14, 2026 15:36

@gibahjoe gibahjoe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pooleycodes
pooleycodes merged commit c7c1f8e into main Jul 15, 2026
3 checks passed
@pooleycodes
pooleycodes deleted the 120-sentry---failure-to-download-aws-paths-in-github-config branch July 15, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sentry - Failure to download AWS paths in GitHub Config

2 participants