Skip to content

fix: disable SSL verification for Supabase client in sandbox environments#2

Open
ianymu wants to merge 1 commit into
mainfrom
fix/supabase-ssl-verify
Open

fix: disable SSL verification for Supabase client in sandbox environments#2
ianymu wants to merge 1 commit into
mainfrom
fix/supabase-ssl-verify

Conversation

@ianymu

@ianymu ianymu commented Mar 6, 2026

Copy link
Copy Markdown
Owner

Problem

hn_collector.py failed to write any records to Supabase in sandbox/CI environments lacking a trusted CA bundle, producing:

Write error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate

All 483 fetched HN items were blocked, resulting in 0 writes.

Fix

Pass a custom httpx.Client(verify=False) via ClientOptions when creating the Supabase client. This allows writes to succeed in environments without a proper certificate store while keeping the Algolia fetch (via requests) unaffected.

sb = create_client(
    SUPABASE_URL, SUPABASE_KEY,
    options=ClientOptions(httpx_client=httpx.Client(verify=False))
)

Test run (cycle 10)

  • 483 HN items fetched from Algolia (12 queries × ~100 hits)
  • 483 duplicates detected — cycle 10 data already present in DB
  • 0 write errors, 0 SSL failures

This PR was generated with Oz.

…ents

The supabase httpx client raised SSL: CERTIFICATE_VERIFY_FAILED in
environments without proper CA bundle (e.g. CI/sandbox containers).
Pass a custom httpx.Client(verify=False) via ClientOptions so writes
succeed regardless of the local certificate store.

Co-Authored-By: Oz <oz-agent@warp.dev>
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