Shopify / Shopify/ci-queue

Sensible Defaults for Python Redis Client

Open
#71 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
239
Forks
36
Avg merge
28m
Merged PRs (30d)
3

Description

By default no timeouts are set for the Redis client. It's poorly documented, but as far as I can tell, the Redis client will wait hang infinitely by default. This is not a sensible default for ci-queue clients, forcing every client to specify this value. socket_connect_timeout defaults to whatever is specified for socket_timeout, but since that is handled deep down in the Redis client and certainly not documented by ci-queue a responsible client might not rely on that.

I suggest explicitly setting sensible defaults for these two values to reduce the burden on clients.

https://github.com/Shopify/ci-queue/blob/3b7ac596016b8c569ea49a6ff80696443b2569ce/python/ciqueue/_pytest/test_queue.py#L59-L81

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with python/ciqueue/_pytest/test_queue.py around lines 59-81 and inspect the Redis client setup to find where socket_timeout and socket_connect_timeout are configured. Determine and document explicit defaults for both values, then add or update queue-client tests to verify clients do not wait indefinitely by default.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, redis
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.