Skip to content

Commit e18abf8

Browse files
committed
Merge main and configure all sketchlib backends as default
- Merged latest main (includes backend abstraction from PR #207) - Set all sketch backends to use sketchlib by default - Count-Min, Count-Min-With-Heap, and KLL all use sketchlib - UDFs correctly configured: all use sketchlib
2 parents 6b24b26 + e6e1858 commit e18abf8

File tree

127 files changed

+2916
-2822
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+2916
-2822
lines changed

.github/workflows/docker.yml

Lines changed: 64 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@ on:
88
branches: [main]
99
paths:
1010
- 'asap-common/installation/**'
11-
- 'asap-planner/**'
12-
- 'asap-sketch-ingest/**'
11+
- 'asap-planner-rs/**'
12+
- 'asap-summary-ingest/**'
1313
- 'asap-query-engine/**'
1414
- 'asap-tools/queriers/prometheus-client/**'
15+
- 'asap-tools/data-sources/prometheus-exporters/fake_exporter/fake_exporter_rust/**'
1516
- '.github/workflows/docker.yml'
1617
workflow_dispatch:
18+
inputs:
19+
image-tag:
20+
description: 'Tag to use for pushed images (e.g. v0.1.0, dev)'
21+
required: true
22+
default: 'dev'
1723

1824
permissions:
1925
packages: write
@@ -36,6 +42,17 @@ jobs:
3642
username: ${{ github.repository_owner }}
3743
password: ${{ secrets.GITHUB_TOKEN }}
3844

45+
- name: Resolve image tag
46+
id: tag
47+
run: |
48+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
49+
echo "value=${{ inputs.image-tag }}" >> $GITHUB_OUTPUT
50+
elif [ "${{ github.event_name }}" = "push" ]; then
51+
echo "value=${{ github.ref_name }}" >> $GITHUB_OUTPUT
52+
else
53+
echo "value=pr-test" >> $GITHUB_OUTPUT
54+
fi
55+
3956
# --- Base image (Python, fast) ---
4057
- name: Build base image
4158
run: |
@@ -45,44 +62,42 @@ jobs:
4562
asap-common
4663
4764
- name: Push base image
48-
if: startsWith(github.ref, 'refs/tags/')
65+
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
4966
run: |
50-
docker tag sketchdb-base:latest ghcr.io/projectasap/asap-base:${{ github.ref_name }}
67+
docker tag sketchdb-base:latest ghcr.io/projectasap/asap-base:${{ steps.tag.outputs.value }}
5168
docker tag sketchdb-base:latest ghcr.io/projectasap/asap-base:latest
52-
docker push ghcr.io/projectasap/asap-base:${{ github.ref_name }}
69+
docker push ghcr.io/projectasap/asap-base:${{ steps.tag.outputs.value }}
5370
docker push ghcr.io/projectasap/asap-base:latest
5471
55-
# --- Planner (Python, depends on base) ---
56-
- name: Build planner image
57-
run: |
58-
docker build \
59-
-t asap-planner:local \
60-
-f asap-planner/Dockerfile \
61-
asap-planner
72+
# --- Planner RS (Rust) ---
73+
- name: Build and push planner-rs
74+
uses: docker/build-push-action@v6
75+
with:
76+
context: .
77+
file: asap-planner-rs/Dockerfile
78+
push: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
79+
tags: |
80+
ghcr.io/projectasap/asap-planner-rs:${{ steps.tag.outputs.value }}
81+
ghcr.io/projectasap/asap-planner-rs:latest
82+
cache-from: type=registry,ref=ghcr.io/projectasap/asap-planner-rs:buildcache
83+
cache-to: ${{ (startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch') && 'type=registry,ref=ghcr.io/projectasap/asap-planner-rs:buildcache,mode=max' || '' }}
6284

63-
- name: Push planner image
64-
if: startsWith(github.ref, 'refs/tags/')
65-
run: |
66-
docker tag asap-planner:local ghcr.io/projectasap/asap-planner:${{ github.ref_name }}
67-
docker tag asap-planner:local ghcr.io/projectasap/asap-planner:latest
68-
docker push ghcr.io/projectasap/asap-planner:${{ github.ref_name }}
69-
docker push ghcr.io/projectasap/asap-planner:latest
7085

71-
# --- Sketch Ingest (Python, depends on base) ---
72-
- name: Build sketch-ingest image
86+
# --- Summary Ingest (Python, depends on base) ---
87+
- name: Build summary-ingest image
7388
run: |
7489
docker build \
75-
-t asap-sketch-ingest:local \
76-
-f asap-sketch-ingest/Dockerfile \
77-
asap-sketch-ingest
90+
-t asap-summary-ingest:local \
91+
-f asap-summary-ingest/Dockerfile \
92+
asap-summary-ingest
7893
79-
- name: Push sketch-ingest image
80-
if: startsWith(github.ref, 'refs/tags/')
94+
- name: Push summary-ingest image
95+
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
8196
run: |
82-
docker tag asap-sketch-ingest:local ghcr.io/projectasap/asap-sketch-ingest:${{ github.ref_name }}
83-
docker tag asap-sketch-ingest:local ghcr.io/projectasap/asap-sketch-ingest:latest
84-
docker push ghcr.io/projectasap/asap-sketch-ingest:${{ github.ref_name }}
85-
docker push ghcr.io/projectasap/asap-sketch-ingest:latest
97+
docker tag asap-summary-ingest:local ghcr.io/projectasap/asap-summary-ingest:${{ steps.tag.outputs.value }}
98+
docker tag asap-summary-ingest:local ghcr.io/projectasap/asap-summary-ingest:latest
99+
docker push ghcr.io/projectasap/asap-summary-ingest:${{ steps.tag.outputs.value }}
100+
docker push ghcr.io/projectasap/asap-summary-ingest:latest
86101
87102
# --- Prometheus Client (Python, depends on base) ---
88103
- name: Build prometheus-client image
@@ -93,22 +108,35 @@ jobs:
93108
asap-tools/queriers/prometheus-client
94109
95110
- name: Push prometheus-client image
96-
if: startsWith(github.ref, 'refs/tags/')
111+
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
97112
run: |
98-
docker tag asap-prometheus-client:local ghcr.io/projectasap/asap-prometheus-client:${{ github.ref_name }}
113+
docker tag asap-prometheus-client:local ghcr.io/projectasap/asap-prometheus-client:${{ steps.tag.outputs.value }}
99114
docker tag asap-prometheus-client:local ghcr.io/projectasap/asap-prometheus-client:latest
100-
docker push ghcr.io/projectasap/asap-prometheus-client:${{ github.ref_name }}
115+
docker push ghcr.io/projectasap/asap-prometheus-client:${{ steps.tag.outputs.value }}
101116
docker push ghcr.io/projectasap/asap-prometheus-client:latest
102117
118+
# --- Fake Exporter (Rust) ---
119+
- name: Build and push fake-exporter
120+
uses: docker/build-push-action@v6
121+
with:
122+
context: asap-tools/data-sources/prometheus-exporters/fake_exporter/fake_exporter_rust/fake_exporter
123+
file: asap-tools/data-sources/prometheus-exporters/fake_exporter/fake_exporter_rust/fake_exporter/Dockerfile
124+
push: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
125+
tags: |
126+
ghcr.io/projectasap/asap-fake-exporter:${{ steps.tag.outputs.value }}
127+
ghcr.io/projectasap/asap-fake-exporter:latest
128+
cache-from: type=registry,ref=ghcr.io/projectasap/asap-fake-exporter:buildcache
129+
cache-to: ${{ (startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch') && 'type=registry,ref=ghcr.io/projectasap/asap-fake-exporter:buildcache,mode=max' || '' }}
130+
103131
# --- Query Engine (Rust, slow — uses GHCR layer cache) ---
104132
- name: Build and push query-engine
105133
uses: docker/build-push-action@v6
106134
with:
107135
context: .
108136
file: asap-query-engine/Dockerfile
109-
push: ${{ startsWith(github.ref, 'refs/tags/') }}
137+
push: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
110138
tags: |
111-
ghcr.io/projectasap/asap-query-engine:${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'pr-test' }}
139+
ghcr.io/projectasap/asap-query-engine:${{ steps.tag.outputs.value }}
112140
ghcr.io/projectasap/asap-query-engine:latest
113141
cache-from: type=registry,ref=ghcr.io/projectasap/asap-query-engine:buildcache
114-
cache-to: type=registry,ref=ghcr.io/projectasap/asap-query-engine:buildcache,mode=max
142+
cache-to: ${{ (startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch') && 'type=registry,ref=ghcr.io/projectasap/asap-query-engine:buildcache,mode=max' || '' }}

.github/workflows/python.yml

Lines changed: 10 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ on:
44
push:
55
branches: [ main ]
66
paths:
7-
- 'asap-sketch-ingest/**'
7+
- 'asap-summary-ingest/**'
88
- 'asap-tools/queriers/prometheus-client/**'
9-
- 'asap-planner/**'
109
- 'asap-tools/**'
1110
- 'asap-tools/data-sources/prometheus-exporters/**'
1211
- 'asap-tools/execution-utilities/**'
@@ -15,9 +14,8 @@ on:
1514
pull_request:
1615
branches: [ main ]
1716
paths:
18-
- 'asap-sketch-ingest/**'
17+
- 'asap-summary-ingest/**'
1918
- 'asap-tools/queriers/prometheus-client/**'
20-
- 'asap-planner/**'
2119
- 'asap-tools/**'
2220
- 'asap-tools/data-sources/prometheus-exporters/**'
2321
- 'asap-tools/execution-utilities/**'
@@ -33,9 +31,8 @@ jobs:
3331
detect-changes:
3432
runs-on: ubuntu-latest
3533
outputs:
36-
arroyo_sketch: ${{ steps.filter.outputs.arroyo_sketch }}
34+
summary_ingest: ${{ steps.filter.outputs.summary_ingest }}
3735
prometheus_client: ${{ steps.filter.outputs.prometheus_client }}
38-
controller: ${{ steps.filter.outputs.controller }}
3936
utilities: ${{ steps.filter.outputs.utilities }}
4037
prometheus_exporters: ${{ steps.filter.outputs.prometheus_exporters }}
4138
execution_utilities: ${{ steps.filter.outputs.execution_utilities }}
@@ -45,15 +42,12 @@ jobs:
4542
id: filter
4643
with:
4744
filters: |
48-
arroyo_sketch:
49-
- 'asap-sketch-ingest/**'
45+
summary_ingest:
46+
- 'asap-summary-ingest/**'
5047
- 'asap-common/dependencies/py/**'
5148
prometheus_client:
5249
- 'asap-tools/queriers/prometheus-client/**'
5350
- 'asap-common/dependencies/py/**'
54-
controller:
55-
- 'asap-planner/**'
56-
- 'asap-common/dependencies/py/**'
5751
utilities:
5852
- 'asap-tools/**'
5953
- 'asap-common/dependencies/py/**'
@@ -64,9 +58,9 @@ jobs:
6458
- 'asap-tools/execution-utilities/**'
6559
- 'asap-common/dependencies/py/**'
6660
67-
test-arroyo-sketch:
61+
test-summary-ingest:
6862
needs: detect-changes
69-
if: needs.detect-changes.outputs.arroyo_sketch == 'true'
63+
if: needs.detect-changes.outputs.summary_ingest == 'true'
7064
runs-on: ubuntu-latest
7165
strategy:
7266
matrix:
@@ -81,12 +75,12 @@ jobs:
8175
run: |
8276
python -m pip install --upgrade pip
8377
pip install black==24.8.0 flake8==6.1.0
84-
if [ -f asap-sketch-ingest/requirements.txt ]; then pip install -r asap-sketch-ingest/requirements.txt; fi
78+
if [ -f asap-summary-ingest/requirements.txt ]; then pip install -r asap-summary-ingest/requirements.txt; fi
8579
- name: Check formatting with Black
86-
working-directory: asap-sketch-ingest
80+
working-directory: asap-summary-ingest
8781
run: black --check --diff .
8882
- name: Lint with flake8
89-
working-directory: asap-sketch-ingest
83+
working-directory: asap-summary-ingest
9084
run: |
9185
# Stop the build if there are Python syntax errors or undefined names
9286
flake8 . --config=../.flake8 --count --select=E9,F63,F7,F82 --show-source --statistics
@@ -125,35 +119,6 @@ jobs:
125119
working-directory: asap-tools/queriers/prometheus-client
126120
run: mypy .
127121

128-
test-controller:
129-
needs: detect-changes
130-
if: needs.detect-changes.outputs.controller == 'true'
131-
runs-on: ubuntu-latest
132-
strategy:
133-
matrix:
134-
python-version: ["3.8", "3.9", "3.10", "3.11"]
135-
steps:
136-
- uses: actions/checkout@v4
137-
- name: Set up Python ${{ matrix.python-version }}
138-
uses: actions/setup-python@v4
139-
with:
140-
python-version: ${{ matrix.python-version }}
141-
- name: Install dependencies
142-
run: |
143-
python -m pip install --upgrade pip
144-
pip install black==24.8.0 flake8==6.1.0
145-
if [ -f asap-planner/requirements.txt ]; then pip install -r asap-planner/requirements.txt; fi
146-
- name: Check formatting with Black
147-
working-directory: asap-planner
148-
run: black --check --diff .
149-
- name: Lint with flake8
150-
working-directory: asap-planner
151-
run: |
152-
# Stop the build if there are Python syntax errors or undefined names
153-
flake8 . --config=../.flake8 --count --select=E9,F63,F7,F82 --show-source --statistics
154-
# Exit-zero treats all errors as warnings
155-
flake8 . --config=../.flake8 --count --exit-zero --max-complexity=10 --statistics
156-
157122
test-utilities:
158123
needs: detect-changes
159124
if: needs.detect-changes.outputs.utilities == 'true'

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
hooks:
1818
- id: hadolint-docker
1919
files: ^.*Dockerfile.*$
20-
args: ['--ignore', 'DL3008']
20+
args: ['--ignore', 'DL3007', '--ignore', 'DL3008', '--ignore', 'DL3013']
2121

2222
# Shell script linting
2323
- repo: https://github.com/shellcheck-py/shellcheck-py

0 commit comments

Comments
 (0)