Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
306ed66
feat(analytics): set up dagster project
PJColombo Feb 16, 2026
7c216a0
refactor(db): enable prisma schema folder feature
PJColombo Feb 16, 2026
aaab559
refactor(db): extract to separated files prisma models from schema
PJColombo Feb 16, 2026
6956181
feat(db): add metrics models
PJColombo Feb 16, 2026
3053969
feat(analytics): create postgres connection resource
PJColombo Feb 16, 2026
c758489
chore(analytics): add package.json for Turborepo detection
PJColombo Feb 16, 2026
7ca13f8
chore: add dagster and python files to gitignore
PJColombo Feb 17, 2026
72a1139
chore(analytics): switch from psycopg v3 to psycopg2
PJColombo Feb 17, 2026
0771eb1
feat(analytics): add external assets
PJColombo Feb 17, 2026
245de8c
refactor(analytics): move resources into `defs` folder
PJColombo Feb 17, 2026
25757ba
chore(analytics): update lock file
PJColombo Feb 17, 2026
f481967
fix(db): add missing counter metrics for correct incremental average …
PJColombo Feb 17, 2026
cb8247d
feat(analytics): add hourly metric assets and its correspondent job s…
PJColombo Feb 17, 2026
68535de
chore(analytics): pass down env vars when running script commands
PJColombo Feb 17, 2026
e0d038f
fix(db): treat NULL values in unique index columns as equal
PJColombo Feb 17, 2026
b7ee7e8
fix(analytics): delete unused files
PJColombo Feb 17, 2026
561c25c
feat(analytics): add daily metrics asset + unify all assets in `asset…
PJColombo Feb 17, 2026
f5b5266
feat(analytics): add weekly, monthly and yearly metrics + backfill pa…
PJColombo Feb 18, 2026
3ed2b35
refactor(analytics): replace scheduled jobs with automation condition…
PJColombo Feb 18, 2026
bbabd3c
refactor(analytics): abstract metrics asset creation logic to a function
PJColombo Feb 19, 2026
08d5332
feat(analytics): periodically update time-based aggregates for live m…
PJColombo Feb 20, 2026
d844121
feat(analytics): add all time metrics asset
PJColombo Feb 22, 2026
186b8e8
feat(analytics): remove unnecessary external assets
PJColombo Feb 22, 2026
2bd1042
refactor(analytics): extract helper functions from assets file
PJColombo Feb 22, 2026
fed22fb
feat(analytics): add support for configuring partition start dates
PJColombo Feb 25, 2026
55b84bb
chore(docker): configure separate Dagster db in Postgres container
PJColombo Feb 27, 2026
fdc4a03
chore: remove workspace and dagster configuration yaml files from git…
PJColombo Feb 27, 2026
4ccce8d
chore(analytics): dockerize analytics app
PJColombo Feb 27, 2026
297e578
chore(docker): add analytics service to local docker-compose setup
PJColombo Feb 27, 2026
3421f0a
chore(analytics): add dockerfile for kubernetes
PJColombo Mar 4, 2026
166ffef
chore(docker): expose dagster webserver on a different port when runn…
PJColombo Mar 4, 2026
4c6e9bc
chore(github-actions): add analytics image building workflows for pro…
PJColombo Mar 4, 2026
d2d1ad3
ci/fix: multiple fixes
PabloCastellano Mar 13, 2026
558a3fa
chore(ci): fix prisma schema path
PJColombo Mar 13, 2026
3884d7c
chore(dagster): add missing `mypy` dep
PJColombo Mar 13, 2026
d92ebce
chore(dagster): fix `type-check` command path
PJColombo Mar 13, 2026
ee95eb5
chore(github-actions): install uv
PJColombo Mar 13, 2026
98c25b5
ci: add ruff
PabloCastellano Mar 13, 2026
22e0d56
ci: fix mypy errors
PabloCastellano Mar 13, 2026
a86cb9e
switch to ISO 8601 format
PabloCastellano Mar 13, 2026
142b37d
refactor: start_dates
PabloCastellano Mar 13, 2026
d972f1f
refactor: inline asset factory into plain @dg.asset definitions, remo…
PabloCastellano Mar 13, 2026
53e99fe
docker review
PabloCastellano Mar 13, 2026
d3793fb
disable telemetry
PabloCastellano Mar 13, 2026
b78b73b
variables
PabloCastellano Mar 13, 2026
09f056d
ci: review actions and docker
PabloCastellano Mar 13, 2026
c426f7e
ci: revert healthcheck
PabloCastellano Mar 13, 2026
f0e433b
chore(lint): add lint config + apply linting changes
PJColombo Mar 16, 2026
7d32510
chore(dagster): bump deps
PJColombo Mar 16, 2026
02d56c7
chore(dagster): add `pytest` dep
PJColombo Mar 16, 2026
efe0437
fix(dagster): default to empty string when retrieving chain id env var
PJColombo Mar 16, 2026
8d7ac56
chore(dagster): add prisma dep
PJColombo Mar 16, 2026
286b8b2
test(dagster): set up postgres fixture
PJColombo Mar 16, 2026
451b11f
test(dagster): add helpers UTs
PJColombo Mar 16, 2026
2c03098
chore(dagster): remove `.dg` folder
PJColombo Mar 16, 2026
9c5da98
chore: add pyright config file
PJColombo Mar 16, 2026
fe04ce9
chore: add python interpreter path to vscode settings
PJColombo Mar 16, 2026
47cbd67
fix(dagster): revert typechecking on assets file
PJColombo Mar 16, 2026
f785e98
style(dagster): fix types
PJColombo Mar 16, 2026
d496843
test(dagster): add schedule UTs
PJColombo Mar 16, 2026
d3cc562
chore(dagster): disable some linting rules for tests
PJColombo Mar 16, 2026
d7d4c20
chore(dagster): keep linting happy
PJColombo Mar 16, 2026
a1b56d0
test(dagster): add sensors UTs
PJColombo Mar 16, 2026
9896869
fix(dagster): resolve an issue where all time sql query wasn't comput…
PJColombo Mar 16, 2026
b89bcfb
fix(dagster): add missing total unique receivers and senders metric a…
PJColombo Mar 16, 2026
9ffae3e
fix(dagster): start weekly partitions on Monday and use ISO 8601 form…
PJColombo Mar 16, 2026
085f7f7
style(dagster): fix lint issue
PJColombo Mar 16, 2026
108a777
test(dagster): add assets tests
PJColombo Mar 16, 2026
3d7655e
chore(vscode): add automatic formatting for python files
PJColombo Mar 16, 2026
b4baee8
chore(dagster): add script to generate sqlalchemy models from prisma …
PJColombo Mar 16, 2026
a066d60
chore(dagster): align prisma client dep version
PJColombo Mar 16, 2026
d0c901e
chore(ci): run dagster tests on github workflow
PJColombo Mar 16, 2026
f41da57
chore: align prisma client dep
PJColombo Mar 16, 2026
a5d2e0a
refactor: remove DAGSTER_ from postgres variables
PabloCastellano Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ jobs:
env:
VITEST_MAINNET_FORK_URL: ${{ secrets.VITEST_MAINNET_FORK_URL }}

- name: Test (dagster)
run: pnpm test:dagster

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/docker_dagster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Docker Dagster

on:
push:
tags: ["v*"]
paths:
- "apps/dagster/**"

jobs:
release_dagster_docker:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set Github ENV variables
shell: bash
run: |
echo "BUILD_TIMESTAMP=$(date '+%F %H:%M:%S')" >> $GITHUB_ENV
echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV

- name: Extract metadata (tags, labels) for Docker (Analytics)
id: meta_dagster
uses: docker/metadata-action@v5
with:
images: |
blossomlabs/blobscan-dagster
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}

- name: Build and push
uses: docker/build-push-action@v6.5.0
with:
context: ./apps/dagster
push: true
tags: ${{ steps.meta_dagster.outputs.tags }}
labels: ${{ steps.meta_dagster.outputs.labels }}
build-args: |
BUILD_TIMESTAMP=${{ env.BUILD_TIMESTAMP }}
GIT_COMMIT=${{ env.GIT_COMMIT }}
42 changes: 42 additions & 0 deletions .github/workflows/docker_dagster_dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Docker Dagster dev

on:
push:
branches: ["main"]
paths:
- "apps/dagster/**"

jobs:
release_dagster_docker:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set Github ENV variables
shell: bash
run: |
echo "BUILD_TIMESTAMP=$(date '+%F %H:%M:%S')" >> $GITHUB_ENV
echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV

- name: Build and push
uses: docker/build-push-action@v6.5.0
with:
context: ./apps/dagster
push: true
tags: |
blossomlabs/blobscan-dagster:development
build-args: |
BUILD_TIMESTAMP=${{ env.BUILD_TIMESTAMP }}
GIT_COMMIT=${{ env.GIT_COMMIT }}
44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,47 @@ yarn-error.log*

# Sentry config file
.sentryclirc

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Dagster
.dagster/
dagster_home/

# Dagster logs and storage
logs/
storage/
history/
schedules/
sensors/
assets/

# Virtual environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,10 @@
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
],
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"python.defaultInterpreterPath": "./apps/dagster/.venv/bin/python",
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true
}
}
203 changes: 203 additions & 0 deletions apps/dagster/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[codz]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py.cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
#uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
#poetry.toml

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
#pdm.lock
#pdm.toml
.pdm-python
.pdm-build/

# pixi
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
#pixi.lock
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
# in the .venv directory. It is recommended not to include this directory in version control.
.pixi

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.envrc
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Abstra
# Abstra is an AI-powered process automation framework.
# Ignore directories containing user credentials, local state, and settings.
# Learn more at https://abstra.io/docs
.abstra/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
# .vscode/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc

# Marimo
marimo/_static/
marimo/_lsp/
__marimo__/

# Streamlit
.streamlit/secrets.toml
Loading
Loading