Skip to content

fix: Vale of White Horse SSL errors and session cookies#2115

Open
sammort wants to merge 1 commit into
robbrad:masterfrom
sammort:sm-ssl-fix-binzone
Open

fix: Vale of White Horse SSL errors and session cookies#2115
sammort wants to merge 1 commit into
robbrad:masterfrom
sammort:sm-ssl-fix-binzone

Conversation

@sammort

@sammort sammort commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

This change fixes the current SSL errors received when connecting to Vale of White Horse's BINZONE web application.

Also pulling in the fixes for session cookies applied to South Oxfordshire in bf6dd1f

Summary by CodeRabbit

  • Bug Fixes
    • Improved reliability of bin collection data fetching for Vale of White Horse Council by enhancing session handling and request sequencing, reducing intermittent access errors and failed requests. Bin extraction, sorting, and displayed data format remain unchanged to preserve existing user-facing behavior. Users should see fewer failed loads when viewing bin schedules.

@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 194daba0-f936-4a1b-8228-c94d924b0739

📥 Commits

Reviewing files that changed from the base of the PR and between fca6a88 and 1586baf.

📒 Files selected for processing (1)
  • uk_bin_collection/uk_bin_collection/councils/ValeofWhiteHorseCouncil.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • uk_bin_collection/uk_bin_collection/councils/ValeofWhiteHorseCouncil.py

📝 Walkthrough

Walkthrough

The ValeofWhiteHorseCouncil.parse_data HTTP fetch is refactored to use a two-step requests.Session flow: an initial GET primes the session (establishes JSESSIONID) without SVBINZONE, then SVBINZONE is set on the session and a second GET retrieves the bin data.

Changes

Session-based HTTP request handling

Layer / File(s) Summary
Session-based cookie and request flow
uk_bin_collection/uk_bin_collection/councils/ValeofWhiteHorseCouncil.py
Cookie setup is removed from direct request parameters (line 20) and refactored into a two-step requests.Session flow (lines 40–56): initial GET without SVBINZONE to establish JSESSIONID, then SVBINZONE is set on the session and a second GET is issued with the session headers and params to fetch bin data.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Two hops, one session, cookies in line,

First a handshake, then the fetch is fine.
JSESSIONID first, SVBINZONE then set,
Bins come back tidy — no 403 fret. 🥕🍪

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically addresses the main changes: fixing SSL errors and session cookies for Vale of White Horse.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.67%. Comparing base (b65502c) to head (1586baf).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2115   +/-   ##
=======================================
  Coverage   86.67%   86.67%           
=======================================
  Files           9        9           
  Lines        1141     1141           
=======================================
  Hits          989      989           
  Misses        152      152           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@sammort sammort force-pushed the sm-ssl-fix-binzone branch from ad19f93 to f9a04bd Compare June 4, 2026 08:01
@sammort sammort mentioned this pull request Jun 4, 2026
4 tasks
@sammort sammort force-pushed the sm-ssl-fix-binzone branch 3 times, most recently from fda790a to fca6a88 Compare June 4, 2026 10:28
…e Horse

This change fixes the current SSL errors received when connecting
to Vale of White Horse's BINZONE web application.

Also pulling in the fixes for session cookies applied to South
Oxfordshire in bf6dd1f as both
councils use the same application.
@sammort sammort force-pushed the sm-ssl-fix-binzone branch from fca6a88 to 1586baf Compare June 4, 2026 11:20
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.

1 participant