Skip to content

Commit 4877405

Browse files
committed
Squashed commit of the following:
commit 1f8851e Author: 0xevolve <Artevolve@yahoo.com> Date: Mon Feb 19 17:05:22 2024 +0000 chore: default interval 2hours commit f97cdb9 Author: 0xevolve <Artevolve@yahoo.com> Date: Wed Feb 14 17:18:45 2024 +0100 feat: add 2 hour aggregates (#36) commit 1638302 Author: 0xevolve <Artevolve@yahoo.com> Date: Fri Feb 9 22:32:34 2024 +0100 fix: error messages commit 9452961 Author: 0xevolve <Artevolve@yahoo.com> Date: Thu Jan 25 14:53:16 2024 +0100 fix: decimals retrieval commit cc1bd2d Author: 0xevolve <Artevolve@yahoo.com> Date: Thu Jan 25 14:51:06 2024 +0100 fix: default interval/aggregation commit a1fb4af Author: 0xevolve <Artevolve@yahoo.com> Date: Fri Jan 19 16:14:49 2024 +0100 fix: twap query typo commit 581e8a8 Author: 0xevolve <Artevolve@yahoo.com> Date: Fri Jan 19 14:14:09 2024 +0100 ✨ Add TWAP aggregation (#34) * feat: twap views migration * feat: aggregation query param * fix: twap value name commit e62efb9 Author: 0xevolve <Artevolve@yahoo.com> Date: Thu Jan 18 15:00:29 2024 +0100 fix: base/quote order commit f718465 Author: 0xevolve <Artevolve@yahoo.com> Date: Thu Jan 18 14:57:12 2024 +0100 🤡 remove mock commit cfa614b Author: 0xevolve <Artevolve@yahoo.com> Date: Tue Jan 16 22:36:31 2024 +0100 fix: routing decimals commit d7a3445 Author: Graniet 75 <graniet@users.noreply.github.com> Date: Tue Jan 16 21:08:25 2024 +0000 Base routing (#33) * first draft of routing * result of rebase * fix: normalize values before routing * fix: routing condition * fix: type --------- Co-authored-by: 0xevolve <Artevolve@yahoo.com> commit e345010 Author: 0xevolve <Artevolve@yahoo.com> Date: Fri Jan 12 15:56:10 2024 +0100 feat: candlestick views commit dd37640 Author: 0xevolve <Artevolve@yahoo.com> Date: Fri Jan 12 13:12:19 2024 +0100 fix: optional query params commit 82b745c Author: 0xevolve <Artevolve@yahoo.com> Date: Fri Jan 12 13:00:47 2024 +0100 feat: query by timestamp commit 7efcf12 Author: 0xevolve <Artevolve@yahoo.com> Date: Fri Jan 12 11:43:09 2024 +0100 feat: interval query param commit 66d186f Author: 0xevolve <Artevolve@yahoo.com> Date: Fri Jan 12 11:00:10 2024 +0100 feat: enable realtime aggregation commit 78db85f Author: 0xevolve <Artevolve@yahoo.com> Date: Thu Jan 11 18:52:05 2024 +0100 fix: add DATABASE_MAX_CONN to config commit d63b8cd Author: devops72 <43383438+devops72-sre@users.noreply.github.com> Date: Thu Jan 11 22:24:17 2024 +0530 Deployment setup (#31) * Deployment setup * fixed error * fixed port & config * fix: add brokers to env.example * feat: unique index hypertable * feat: continuous aggregates * update compose, upgrade version rdkafka * undo hypertables * feat: query from realtime view * feat: adapt route to use new views * fix: schema * added kafka brokers * fix: sql types * fix: optional .env file in ingestor --------- Co-authored-by: devops72-sre <> Co-authored-by: 0xevolve <Artevolve@yahoo.com> Co-authored-by: graniet <graniet75@gmail.com> commit 72b9868 Author: 0xevolve <Artevolve@yahoo.com> Date: Thu Jan 11 17:43:33 2024 +0100 fix: optional .env file in ingestor commit 6fadd31 Author: 0xevolve <Artevolve@yahoo.com> Date: Thu Jan 11 17:35:43 2024 +0100 fix: sql types commit f78562f Author: 0xevolve <Artevolve@yahoo.com> Date: Thu Jan 11 17:00:18 2024 +0100 fix: schema commit 0674de9 Author: 0xevolve <Artevolve@yahoo.com> Date: Thu Jan 11 16:06:01 2024 +0100 feat: adapt route to use new views commit 5b92db9 Author: 0xevolve <Artevolve@yahoo.com> Date: Thu Jan 11 15:10:22 2024 +0100 feat: query from realtime view commit 5dcfb06 Merge: 07a3eb6 75139d2 Author: 0xevolve <Artevolve@yahoo.com> Date: Thu Jan 11 14:12:45 2024 +0100 Merge branch 'develop' of https://github.com/astraly-labs/pragma-node into develop commit 07a3eb6 Author: 0xevolve <Artevolve@yahoo.com> Date: Thu Jan 11 14:12:37 2024 +0100 feat: continuous aggregates commit 75139d2 Author: graniet <graniet75@gmail.com> Date: Thu Jan 11 14:12:13 2024 +0100 undo hypertables commit e03a62b Author: graniet <graniet75@gmail.com> Date: Thu Jan 11 14:10:18 2024 +0100 update compose, upgrade version rdkafka commit 963052f Author: 0xevolve <Artevolve@yahoo.com> Date: Thu Jan 11 12:37:10 2024 +0100 feat: unique index hypertable commit 32d0511 Author: 0xevolve <Artevolve@yahoo.com> Date: Thu Jan 11 11:32:46 2024 +0100 fix: add brokers to env.example commit 396c8db Author: Graniet 75 <graniet@users.noreply.github.com> Date: Wed Jan 3 14:18:17 2024 +0000 Improve stability (#30) * remove unwrap, add config file TU, update migration with time zone * add hypertables * cargo fmt commit 9961a24 Author: 0xevolve <Artevolve@yahoo.com> Date: Wed Dec 27 13:48:49 2023 +0100 ✨ New Architecture (#29) * WIP: first init * add timescaledb to compose * update error handling * add comment * WIP: ingestor service * update arch with entities * refactoring * refactoring * rustfmt * update infra arch * update arch * update infra arch * update readme.md * update readme.md with getting started * feat: release workflow * fix: linter * fix: linters * fix: remove markdown lint * fix: clippy * fix: release workflow package name * fix: ignore test --------- Co-authored-by: graniet <graniet75@gmail.com>
1 parent 2d153a1 commit 4877405

File tree

120 files changed

+6469
-1124
lines changed

Some content is hidden

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

120 files changed

+6469
-1124
lines changed

.dockerignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
**/charts
2222
**/docker-compose*
2323
**/compose*
24-
**/Dockerfile*
24+
infra/pragma-ingestor/Dockerfile
2525
**/node_modules
2626
**/npm-debug.log
2727
**/secrets.dev.yaml

.github/workflows/docker-build.yml

+135
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
name: Task - Build and Push Docker Image
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
release_tag_name:
8+
description: "Release tag name"
9+
type: string
10+
required: true
11+
docker_context:
12+
description: "Docker context"
13+
type: string
14+
required: true
15+
package_name:
16+
description: "Package name"
17+
type: string
18+
required: true
19+
workflow_call:
20+
inputs:
21+
release_tag_name:
22+
description: "Release tag name"
23+
type: string
24+
required: true
25+
docker_context:
26+
description: "Docker context"
27+
type: string
28+
required: true
29+
package_name:
30+
description: "Package name"
31+
type: string
32+
required: true
33+
34+
jobs:
35+
build:
36+
runs-on: ubuntu-latest
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
platform:
41+
- linux/amd64
42+
- linux/arm64
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v3
46+
47+
- name: Docker meta
48+
id: meta
49+
uses: docker/metadata-action@v4
50+
with:
51+
images: ${{ inputs.package_name }}
52+
tags: |
53+
type=raw,value=${{ inputs.release_tag_name }}
54+
55+
- name: Set up QEMU
56+
uses: docker/setup-qemu-action@v2
57+
58+
- name: Set up Docker Buildx
59+
uses: docker/setup-buildx-action@v2
60+
61+
- name: Login to GitHub Container Registry
62+
uses: docker/login-action@v2
63+
with:
64+
registry: ghcr.io
65+
username: ${{ github.actor }}
66+
password: ${{ secrets.GITHUB_TOKEN }}
67+
68+
- name: Build and push by digest
69+
id: build
70+
uses: docker/build-push-action@v4
71+
with:
72+
context: ${{ inputs.docker_context }}
73+
file: Dockerfile
74+
platforms: ${{ matrix.platform }}
75+
labels: ${{ steps.meta.outputs.labels }}
76+
outputs: type=image,name=${{ inputs.package_name
77+
}},push-by-digest=true,name-canonical=true,push=true
78+
79+
- name: Export digest
80+
run: |
81+
mkdir -p /tmp/digests
82+
digest="${{ steps.build.outputs.digest }}"
83+
touch "/tmp/digests/${digest#sha256:}"
84+
85+
- name: Upload digest
86+
uses: actions/upload-artifact@v3
87+
with:
88+
name: digests
89+
path: /tmp/digests/*
90+
if-no-files-found: error
91+
retention-days: 1
92+
93+
merge:
94+
runs-on: ubuntu-latest
95+
needs:
96+
- build
97+
steps:
98+
- name: Download digests
99+
uses: actions/download-artifact@v3
100+
with:
101+
name: digests
102+
path: /tmp/digests
103+
104+
- name: Set up Docker Buildx
105+
uses: docker/setup-buildx-action@v2
106+
107+
- name: Docker meta
108+
id: meta
109+
uses: docker/metadata-action@v4
110+
with:
111+
images: ${{ inputs.package_name }}
112+
tags: |
113+
type=raw,value=${{ inputs.release_tag_name }}
114+
115+
- name: Login to GitHub Container Registry
116+
uses: docker/login-action@v2
117+
with:
118+
registry: ghcr.io
119+
username: ${{ github.actor }}
120+
password: ${{ secrets.GITHUB_TOKEN }}
121+
122+
- name: Create manifest list and push
123+
working-directory: /tmp/digests
124+
run: |
125+
tags=$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON")
126+
if [[ -z "$tags" ]]; then
127+
echo "No tags specified, skipping docker buildx imagetools create command"
128+
else
129+
docker buildx imagetools create $tags \
130+
$(printf '${{ inputs.package_name }}@sha256:%s ' *)
131+
fi
132+
133+
- name: Inspect image
134+
run: |
135+
docker buildx imagetools inspect ${{ inputs.package_name }}:${{ steps.meta.outputs.version }}

.github/workflows/linters.yml

-10
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@ jobs:
1414
run: |-
1515
npx prettier --check .
1616
17-
markdown-lint:
18-
runs-on: ubuntu-latest
19-
steps:
20-
- uses: actions/checkout@v3
21-
- uses: avto-dev/markdown-lint@v1
22-
with:
23-
config: "./.markdownlint.json"
24-
args: "."
25-
ignore: "./target"
26-
2717
toml-lint:
2818
runs-on: ubuntu-latest
2919
steps:

.github/workflows/release.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Workflow - Release
3+
4+
on:
5+
workflow_dispatch:
6+
release:
7+
types: [published]
8+
9+
jobs:
10+
docker_release_build_ingestor:
11+
name: Docker release build
12+
uses: ./.github/workflows/docker-build.yml
13+
with:
14+
release_tag_name: ${{ github.event.release.tag_name }}
15+
docker_context: ./infra/pragma-ingestor
16+
package_name: ghcr.io/pragma-ingestor
17+
docker_release_build_node:
18+
name: Docker release build
19+
uses: ./.github/workflows/docker-build.yml
20+
with:
21+
release_tag_name: ${{ github.event.release.tag_name }}
22+
docker_context: ./infra/pragma-node
23+
package_name: ghcr.io/pragma-node

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
/target
22
.idea
33
.env
4+
db/
5+
infra/db/password.txt

0 commit comments

Comments
 (0)