Skip to content

Commit 66ff990

Browse files
patelchaitanyntkathole
authored andcommitted
fix: Remove pip install command from Redis GLIDE docstring
Security scanners flag pip install commands in source as runtime package installs. Name the glide extra instead, and add a guideline to AGENTS.md and the feast-dev skill against pip commands in docstrings and comments. Signed-off-by: Chaitany Patel <[email protected]>
1 parent 97296c1 commit 66ff990

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎AGENTS.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ Architecture & design intent: `docs/getting-started/architecture/` (overview, wr
9292

9393
- Use type hints on all Python function signatures
9494
- Follow existing patterns in the module you are modifying
95+
- Do not put `pip install` commands in docstrings or code comments. Security scanners flag them as runtime
96+
package installs, which fail in air-gapped or mirror-only environments. Name the extra instead
97+
(e.g. "Requires the ``glide`` extra (``feast[glide]``).") and keep install commands in `docs/`.
9598
- PR titles must follow conventional commit conventions with a lowercase type and a capitalized subject after the colon: `feat: Add ...`, `fix: Correct ...`, `ci: Update ...`, `chore: Refresh ...`, `docs: Add ...`
9699
- Sign off commits with `git commit -s` (DCO requirement)
97100
- Uses `ruff` for Python linting and formatting; Go uses standard `gofmt`

‎sdk/python/feast/infra/online_stores/redis.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class RedisOnlineStoreConfig(FeastConfigBaseModel):
8989
9090
With ``glide``, the synchronous read paths (``online_read`` and the batched read
9191
behind ``get_online_features``) issue their HMGET commands as one non-atomic GLIDE
92-
batch, so the fetch runs off the GIL. Requires ``pip install 'feast[glide]'``.
92+
batch, so the fetch runs off the GIL. Requires the ``glide`` extra (``feast[glide]``).
9393
Writes and async reads always use redis-py. GLIDE has no Sentinel support, so
9494
``client: glide`` cannot be combined with ``redis_type: redis_sentinel``."""
9595

‎skills/feast-dev/SKILL.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ uv run bash -c "cd sdk/python && mypy feast/path/to/file.py"
7070
- Use type hints on all function signatures
7171
- Use `from __future__ import annotations` at the top of new files
7272
- Follow existing patterns in the module you are modifying
73+
- Do not put `pip install` commands in docstrings or code comments. Security scanners flag them as runtime
74+
package installs, which fail in air-gapped or mirror-only environments. Name the extra instead
75+
(e.g. "Requires the ``glide`` extra (``feast[glide]``).") and keep install commands in `docs/`.
7376
- PR titles must follow semantic conventions: `feat:`, `fix:`, `ci:`, `chore:`, `docs:`
7477
- Add a GitHub label to PRs (e.g. `kind/bug`, `kind/feature`, `kind/housekeeping`)
7578
- Sign off commits with `git commit -s` (DCO requirement)

0 commit comments

Comments
 (0)