bench: --bucket is the one S3 setting with no env fallback

Open Beginner friendly
#116 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
cli, devops

Research direction

Start in bench/src/hoglake_bench/cli.py at the --bucket argument around line 104, then inspect the existing HOGLAKE_S3_* environment block in bench/deploy/bench-pod.yaml. Make the bucket read from HOGLAKE_BUCKET with hoglake-bench as the fallback, set that variable in the pod manifest, and verify in-pod commands no longer need an explicit --bucket value.

Written by the indexing model from the issue text.

Description

Every other S3 setting in bench/src/hoglake_bench/cli.py reads from the environment:

p.add_argument("--s3-endpoint",   default=os.environ.get("HOGLAKE_S3_ENDPOINT", "http://localhost:9000"))
p.add_argument("--s3-access-key", default=os.environ.get("HOGLAKE_S3_ACCESS_KEY", "hoglake"))
p.add_argument("--s3-secret-key", default=os.environ.get("HOGLAKE_S3_SECRET_KEY", "hoglake123"))
p.add_argument("--bucket",        default="hoglake-bench")          # cli.py:104

hoglake-bench is the local MinIO bucket name, so in the bench pod — where the other four are set as env and deliberately emptied for the ambient credential chain — this one still points at a bucket that does not exist in AWS. The result is that every in-pod command carries --bucket posthog-gigahog-mw-dev by hand, on a pod that already knows which environment it is in.

Fix

Give it the same treatment as its siblings:

p.add_argument("--bucket", default=os.environ.get("HOGLAKE_BUCKET", "hoglake-bench"))

and set HOGLAKE_BUCKET in bench/deploy/bench-pod.yaml alongside the existing HOGLAKE_S3_* block, so in-pod runs become hoglake-bench analytics-lifecycle --scale 4 --rows-per-load 1000000.

Not a server concern

Worth recording so nobody goes looking: the server cannot supply a default. CreateCatalogRequestDto(name, dataPath) requires a non-nullable dataPath, and the server config has no bucket or data-path setting. In a footer-shipping design the client uploads the objects, so the client chooses where they live and the catalog only records it. There is no server-side default to inherit — the gap is purely that bench does not read its own environment.

Severity

Low: since #110, bench no longer creates buckets against real AWS, so a wrong or unset bucket fails loudly rather than writing somewhere unintended. This is ergonomics on a tool that is now driven by hand from a pod, not a correctness risk.

Dominant language
Kotlin
Stars
0
Forks
0
Avg merge
2h 11m
Merged PRs (30d)
101

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.

More from PostHog/hoglake

All issues in PostHog/hoglake

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.