Skip to content

feat(run): library entrypoint + thin CLI for the e2e pipeline#24

Draft
pradeepvrd wants to merge 1 commit into
submit/8-harnessfrom
refactor/entrypoint
Draft

feat(run): library entrypoint + thin CLI for the e2e pipeline#24
pradeepvrd wants to merge 1 commit into
submit/8-harnessfrom
refactor/entrypoint

Conversation

@pradeepvrd

@pradeepvrd pradeepvrd commented Jun 20, 2026

Copy link
Copy Markdown
Owner

The e2e pipeline used to be driven by running pkg/evaluator/evaluate.py directly (positional args + env overrides) via scripts/entrypoint.sh; this adds a library entrypoint devops_bench/run.py (run_benchmark + BenchmarkConfig), a thin argparse CLI devops_bench/cli.py (python -m devops_bench), and scripts/entrypoint_harness.sh + Dockerfile.harness. No new deps.

Behavior changes

  • Configuration is typed through BenchmarkConfig.from_env(), with CLI flags overriding env and primary/secondary env names unified (PROJECT_ID/GCP_PROJECT_ID, CLUSTER_NAME/GKE_CLUSTER_NAME).
  • --no-infra / --no-teardown are reflected into the env before the harness is built, keeping the harness the single env-read site.
  • The run returns a typed BenchmarkResult (results, run dir, results.json path); exit codes are 0 success / 1 task failure / 2 config error.

Bugs fixed

  • Required config (project/cluster when infra is enabled) is validated up front and raises ConfigError, instead of failing partway through the run.

@pradeepvrd pradeepvrd force-pushed the refactor/entrypoint branch from 448e337 to 46d99e1 Compare June 20, 2026 21:31
@pradeepvrd pradeepvrd changed the base branch from refactor/integration to submit/8-harness June 20, 2026 21:31
Comment thread devops_bench/__init__.py Outdated
Comment thread devops_bench/__main__.py
Comment thread docs/refactor/upstream-pr-cut-plan.md Outdated
@pradeepvrd pradeepvrd force-pushed the refactor/entrypoint branch from 46d99e1 to f28d2ec Compare June 21, 2026 01:31
@pradeepvrd pradeepvrd force-pushed the refactor/entrypoint branch from c820ad0 to 58d521b Compare June 22, 2026 01:53
@pradeepvrd pradeepvrd force-pushed the refactor/entrypoint branch from 58d521b to c9553ba Compare June 23, 2026 05:04
@pradeepvrd pradeepvrd force-pushed the refactor/entrypoint branch from c9553ba to 0e2995e Compare June 23, 2026 06:09
@pradeepvrd pradeepvrd force-pushed the refactor/entrypoint branch from 0e2995e to a01e4c7 Compare June 23, 2026 06:37
@pradeepvrd pradeepvrd force-pushed the refactor/entrypoint branch from a01e4c7 to fec6322 Compare June 23, 2026 07:46
@pradeepvrd pradeepvrd force-pushed the refactor/entrypoint branch from fec6322 to 104e20a Compare June 23, 2026 08:22
@pradeepvrd pradeepvrd force-pushed the refactor/entrypoint branch from 104e20a to 6b67eed Compare June 23, 2026 18:26
The e2e pipeline used to be driven by running `pkg/evaluator/evaluate.py` directly (positional args + env overrides) via `scripts/entrypoint.sh`; this adds a library entrypoint `devops_bench/run.py` (`run_benchmark` + `BenchmarkConfig`), a thin argparse CLI `devops_bench/cli.py` (`python -m devops_bench`), and `scripts/entrypoint_harness.sh` + `Dockerfile.harness`. No new deps.

**Behavior changes**
- Configuration is typed through `BenchmarkConfig.from_env()`, with CLI flags overriding env and primary/secondary env names unified (`PROJECT_ID`/`GCP_PROJECT_ID`, `CLUSTER_NAME`/`GKE_CLUSTER_NAME`).
- `--no-infra` / `--no-teardown` are reflected into the env before the harness is built, keeping the harness the single env-read site.
- The run returns a typed `BenchmarkResult` (results, run dir, results.json path); exit codes are 0 success / 1 task failure / 2 config error.

**Bugs fixed**
- Required config (project/cluster when infra is enabled) is validated up front and raises `ConfigError`, instead of failing partway through the run.
@pradeepvrd pradeepvrd force-pushed the refactor/entrypoint branch from 6b67eed to 8fdeb40 Compare June 23, 2026 18:35
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