51 lines
2.2 KiB
YAML
51 lines
2.2 KiB
YAML
name: VehIQ OLTP extractor (0pt ingestion)
|
|
|
|
# P070 — scheduled poll of app.dealer_stock_entry/app.deal (VehIQ, server10)
|
|
# into opt_dataset_projection (ClickHouse), via the watermark extractor in
|
|
# src/ingestion/vehiq-oltp-ingest-runner.ts. See docs/P070_VEHIQ_OLTP_
|
|
# EXTRACTOR.md for the full design and "what activating this requires".
|
|
#
|
|
# SAFE BY DEFAULT: VEHIQ_INGEST_MODE defaults to "preview" (read-only, never
|
|
# commits a checkpoint, never writes) below. With no VEHIQ_SOURCE_DATABASE_URL
|
|
# secret configured on this repo, the script logs "not_configured" and exits
|
|
# 0 — this workflow can be left enabled indefinitely with zero effect on
|
|
# anything until BOTH the secret is added AND VEHIQ_INGEST_MODE is changed
|
|
# to "run". Neither is done by this workflow file itself.
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "*/15 * * * *"
|
|
|
|
# N6 (server-config ci/jobbstorm-2026-11-10 §4): schemalagd/manuell körning köas i en fast grupp, avbryts inte.
|
|
# ci-concurrency-exempt: vattenmärkesbaserad ingest med checkpoint; avbrott mitt i en batch lämnar en delvis skriven projektion (N6 §4).
|
|
concurrency:
|
|
group: ${{ gitea.workflow }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
extract:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
VEHIQ_SOURCE_DATABASE_URL: ${{ secrets.VEHIQ_SOURCE_DATABASE_URL }}
|
|
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
|
OPT_ANALYTICS_CLICKHOUSE_BASE_URL: ${{ secrets.OPT_ANALYTICS_CLICKHOUSE_BASE_URL }}
|
|
OPT_ANALYTICS_CLICKHOUSE_BASIC_AUTH: ${{ secrets.OPT_ANALYTICS_CLICKHOUSE_BASIC_AUTH }}
|
|
OPT_ANALYTICS_CLICKHOUSE_DATABASE: opt_analytics
|
|
# Activation gate — see docs/P070_VEHIQ_OLTP_EXTRACTOR.md. Flip to
|
|
# "run" only once steps 1-4 in that doc's "What activating this
|
|
# requires" section are actually done.
|
|
VEHIQ_INGEST_MODE: preview
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
- name: Enable corepack + pin pnpm@9
|
|
run: |
|
|
corepack enable
|
|
corepack prepare pnpm@9 --activate
|
|
- name: Install (frozen lockfile)
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Run the extractor (preview mode unless activated)
|
|
run: pnpm run vehiq:oltp-ingest
|