Files
mtusi2026lab6/HELPERS.md

7.7 KiB

OpenObserve helper entrypoints and callers

All maintained new automation is TypeScript/Bun or thin POSIX wrappers. Python check_contract.py/validate_openapi.py and tests/ remain unchanged upstream tools. The application Go backend is a separate preserved95-file manifest; migration helpers do not edit it.

Entrypoint or family Actual consumer and purpose
scripts/up.sh Operator start; preflight images → application/bootstrap owner → build → start stores/OO → wait → provision strict accounts/render → start core/Collector/query gateway → wait both APIs → Grafana → bounded native readiness
scripts/compose.sh Every lifecycle wrapper; pins absolute compose.yaml and project mtuci-vp6-medvedev
scripts/stop.sh, restart.sh, stop-one.sh Operator/upstream resilience callers; only pinned own project; stop preserves volumes
scripts/bootstrap.ts up.sh; preserved application generated private connection files
scripts/bootstrap-openobserve.ts up.sh; own owner initializer, generated password-policy-safe private files; no Grafana owner credential
scripts/preflight-openobserve-images.ts, wait-openobserve.ts, wait-grafana.ts up.sh; exact cached image/plugin hashes, compatible10s scheduler groups, native health/version; bounded cold Grafana wait600s
scripts/bootstrap-grafana.ts → lib/grafana-credential.ts up.sh; required ports preserve existing owner or encrypt/verify a new generated password before runtime publication; age identities/ciphertext remain private
scripts/provision-openobserve-accounts.ts up.sh; native fixed-localhost account HTTP adapter and required bootstrap factory; raw/partial capture → per-account checkpoint → strict capability proof → canonical/derived publication
scripts/lib/openobserve-account-http.ts Provisioner and HTTP tests; mandatory request/capture ports, bounded response, no automatic POST retry
scripts/lib/openobserve-bootstrap.ts Provisioner and bootstrap tests; mandatory persistence/create/verify/publication ports; no production process or Docker side effects inside tests
scripts/render-openobserve-credentials.ts Provisioner only after both principals verify; idempotent exact-value files, mismatch fails closed
scripts/check-backend-unchanged.ts Author/operator verification; hashes all95 current backend files against BACKEND-READY.json
scripts/image-manifests.ts Explicit metadata-only provenance operation; pinned registry manifest/config descriptor discovery, no layer pull
scripts/discover-openobserve-cache.ts, stat-openobserve-cache.ts, copy-openobserve-cache.ts, complete-openobserve-cache.ts, prepare-cache-import.ts Explicit one-time author cache provenance/reuse operations; public exact blobs from stopped owned-source node, own destination and raw SHA/size checks; not required for ordinary startup
scripts/inspect-openobserve-start.ts Explicit author startup diagnostic; own container metadata and private logs, allowlisted safe outcome
student-tests/openobserve-account-http.test.ts, openobserve-bootstrap.test.ts bun test; actual factory behavior with mandatory fake ports; never production entrypoint with optional fakes
student-tests/wait.ts, both-replicas.ts up.sh/readiness and explicit fault acceptance; actual own API replicas/history
student-tests/check-openobserve-config.ts Explicit cached Collector native validate against historical and current configs; no network; config validation does not prove export
student-tests/openobserve-readback.ts, openobserve-signals.ts Explicit native schema/all3 application signal acceptance; creates isolated author receipts, queries actual own storage
student-tests/openobserve-gateway.ts, openobserve-gateway-boundaries.ts Actual HAProxy/nativeOO allow/deny, duplicate/parser/window/chunked cases; intended small requests
student-tests/openobserve-provisioned-queries.ts Explicit23 actual query syntax/content checks; HTTP200 alone is not positive-value/Grafana acceptance
student-tests/openobserve-historical-queries.ts, openobserve-cohort-query.ts Retained-generation diagnostic readbacks for idle/active windows and native instrument labels; original evidence preserved
student-tests/openobserve-positive-queries.ts Actual provisioned expressions + labels + matured/timely controls on the retained known workload;17 bounded positive cases, no new producer
student-tests/openobserve-network-run.ts → openobserve-network.ts Actual cached unprivileged query-SA client on configured Grafana network; query positive and rawOO/hostloopback/Collector negative; Grafana binary not run
student-tests/openobserve-ui-port.ts → openobserve-ui-listener.ts Owned cached listener on actual future Grafana network/28306; native publication check and exact labelled container stop; not Grafana acceptance
student-tests/openobserve-collector-snapshot.ts Explicit before/down/recovered bounded telemetry outage snapshots; queue/cgroup/RSS counters kept distinct
student-tests/openobserve-persisted.ts Explicit before/after retained trace/log/metric fingerprint; no replacement producer; fresh volume cannot satisfy historical fixture
student-tests/grafana-credential.test.ts, grafana-scheduler.test.ts, incident-readback.test.ts, owned-fault.test.ts Bun unit tests of actual factories/oracles with explicit fake ports and retained RED/GREEN
student-tests/grafana-preflight.ts Actual server/datasource health, provisioned18-panel dashboard and5 native rules; metadata only, not visual or firing acceptance
student-tests/grafana-response-boundary.ts Explicit owned native HAProxy + synthetic raw upstream;14 framing classes, distinct ACL/no-marker HTTP outcomes
student-tests/grafana-native-histogram.ts Actual browser omitted-size histogram query compared through native OO and gateway;9 paired cases, no query rewriting
student-tests/grafana-incidents.ts Explicit native owned worker/DB fault experiment; original CLI FAIL retained separately from corrected causal readback
student-tests/grafana-incident-readback.ts Read-only same captured snapshots/jobs with immutable hashes; requires owned accepted cohort and finite queue samples
student-tests/grafana-incident-trace-readback.ts Read-only actual captured app503 request_id→HTTP log→DB error trace; no producer/fault replay
student-tests/grafana-retry.ts → grafana-retry-readback.ts Exactly one owned synthetic staged-object visibility fault, durable retry→ready, restoration/session revocation, then read-only same-trace parents/logs/counter evidence
scripts/lib/browser-lifecycle.ts, student-tests/browser-lifecycle.test.ts Required-port lifecycle; setup/run protected immediately after acquire, close precedes result reporting, primary/secondary failures preserved;10 native fake-port cases
student-tests/grafana-browser.ts Explicit3-scenario authenticated native UI; rejects partial filters, captures statuses/raw query responses before decoding, preserves static cancellation separately; no producer
scripts/package.ts Explicit --build creates a new source-only ZIP/staging/manifest; excludes private/cache/build state and refuses symlinks; separate native unzip verifier checks every hash
student-tests/openobserve-instant-time.ts Native read-only vector(1) grammar provenance; no timestamp shim

Generated runtime inputs are .local/*, never archive/build inputs. Grafana datasource, dashboard and rules are committed source under config/grafana, not self-modifying generators. Its environment file is rendered only after strict account verification. Config/raw cache historical copies and legacy RED extraction text are evidence, not active imports. Source manifests enumerate the exact reviewed bytes; later edits need their own delta receipt.