#506 Raft, Rust, and release day cover art

#506 Raft, Rust, and release day

#506 Raft, Rust, and release day

Listen for free

View show details
Summary
Topics covered in this episode: De-fanging dangerous triggers in GitHub Actions across an organizationRQlite - The fault-tolerant relational database built on SQLite.diskcache-oxide now supports DjangoMuru: an AI-assisted Rust server for Python apps from mod_wsgi's creatorExtrasJokeWatch on YouTube About the show Sponsored by LongLink: Open-source platform for building and running custom business applications with Python and FastAPI Connect with the hosts Michael: Mastodon / BlueSky / X / LinkedInCalvin: Mastodon / BlueSky / X / LinkedInShow: Mastodon / BlueSky / X Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesday at 7am PT. Older video versions available there too. Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it. Calvin #1: De-fanging dangerous triggers in GitHub Actions across an organization GitHub will block pull_request_target by default in public repos starting Dec 2, 2026. GitHub announced this in its changelog on Nov 2; it isn't in effect yet. That default stops applying once you set your own event policy.Two triggers are the main danger. pull_request_target and issue_comment both run with a token that can write to the repo and with the repo's secrets. The classic "pwn request" is a workflow that checks out a stranger's PR code and runs it.It's not theoretical. Ultralytics (Dec 2024), LiteLLM and Telnyx via Trivy (Mar 2026), and elementary-data (Apr 2026), where a single crafted PR comment led to a malicious release on PyPI.To get started, the first step is an Actions event policy. On GitHub Team or Enterprise, one org-wide policy allows only the triggers you expect: pull_request, push, release, repository_dispatch, schedule, workflow_dispatch, workflow_run.Start in Evaluate mode. It blocks nothing and logs what would have been blocked under "Policy insights". Leave it on long enough to cover a release and your least frequent scheduled job.Free plans have to do it repo by repo. You apply the same policy through gh api /repos/$repo/actions/policies. New repos have no policy until someone adds one.Find what you have: gh search code pull_request_target path:.github/workflows --owner YOUR-ORG, also search for issue_comment and then zizmor to check each repo's workflows.PSF status: the policy is set up for the pypi org. In the python org, Seth Larson is still migrating the last few repos before turning it on. The post's intro says all three orgs are done; I'm going by the body, which is more specific. Michael #2: RQlite - The fault-tolerant relational database built on SQLite. rqlite is a self-hosted distributed relational database built on SQLite and the Raft consensus protocol. It puts SQLite behind an HTTP API and replicates data across machines. For Python developers, the appeal is familiar SQL and lightweight deployment, with a database that can survive a server failure. Keep SQLite's SQL, add high availability. A three-node cluster can survive one node failing, provided the remaining nodes can communicate.Python applications send SQL and parameters over HTTP as JSON. Integrations include pyrqlite and sqlalchemy-rqlite; check client capabilities before migrating existing code.Deployment is a single binary per node, with Docker and Kubernetes options. Features include full-text search, JSON support, SQLite extensions, change data capture, and automated cloud backups.Replication does not scale writes. Every write goes through the leader and Raft log, adding network and disk overhead compared with standalone SQLite.Transactions must fit within one HTTP request. You can execute a batch atomically, but cannot hold a transaction open across requests. Explicit BEGIN/COMMIT/ROLLBACK control is unsupported.Read consistency is configurable: default Weak normally reads from the leader; Linearizable adds quorum checks; None permits potentially stale local reads. Stronger guarantees cost coordination.Discussion angle: when does SQLite need clustering rather than just backups? Proposed demo: write from Python, stop the leader, then show the surviving cluster accepting requests after election. SPONSOR SEGMENT: LongLink Michael #3: diskcache-oxide now supports Django diskcache-oxide plugs into Django’s existing cache framework for page caching, template fragments, low-level cache calls and sessions. Worker processes on the same machine share one cache on disk, with atomic counters across processes. The appeal is keeping Django’s familiar caching API without running Redis or Memcached. Setup uses the package’s django extra, diskcache_oxide.DjangoCache as the backend, and an absolute directory for LOCATION. Existing Django cache calls stay the same; optional sharding spreads contention across multiple cache files.Keep disposable pages separate from session state. The recommended configuration uses two aliases and directories: page-cache ...
adbl_web_anon_alc_button_suppression_t1
No reviews yet