Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explorer V2 #161

Draft
wants to merge 32 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
96842d1
Add explorer custom api
kacpersaw Jul 16, 2024
29f8f2f
Push dev image to dockerhub
kacpersaw Jul 16, 2024
de2352b
Disable cache for layer stats
kacpersaw Jul 16, 2024
26d8fb3
Add rewards sum to overview
kacpersaw Jul 17, 2024
f809223
Return 404 if smesher is not found
kacpersaw Jul 17, 2024
11a3923
Add AccountStats
kacpersaw Jul 17, 2024
1cd825e
Clean-up
kacpersaw Jul 18, 2024
4155fd6
Add refresh api server, cache other endpoints
kacpersaw Jul 19, 2024
264760b
Add circulation and decentral endpoints
kacpersaw Jul 31, 2024
9c8df8f
Fix tests, change image name to explorer-stats-api-dev
kacpersaw Aug 6, 2024
ba25b7d
Add metrics
kacpersaw Aug 6, 2024
b818480
Add metrics to Dockerfile
kacpersaw Aug 7, 2024
c3941b1
Update README
kacpersaw Aug 7, 2024
42a1ce7
Add cache-ttl and short-cache-ttl to set cache expiration times
kacpersaw Aug 7, 2024
a20c8fa
Remove bits-per-label
kacpersaw Aug 7, 2024
a0bfbb7
Fix
kacpersaw Aug 7, 2024
b3c2697
Add redis cache store
kacpersaw Aug 20, 2024
01e9be0
Add mongo to docker-compose
kacpersaw Aug 20, 2024
8c346e4
Remove v1 codebase, fix linter & ci, bump go to v1.23.0, clean up a l…
kacpersaw Aug 22, 2024
dd5e520
Update ci.yaml
kacpersaw Aug 22, 2024
0463200
test lint ci
kacpersaw Aug 23, 2024
49afc66
Update golangci to v1.60.3
kacpersaw Aug 23, 2024
3f094b9
golangci-lint only new issues
kacpersaw Aug 23, 2024
b29a4ed
Merge remote-tracking branch 'origin/master' into v2
kacpersaw Aug 26, 2024
dd2441c
Refresh data in goroutine
kacpersaw Aug 29, 2024
332afa5
Add cache metrics
kacpersaw Sep 2, 2024
382f6bb
Fix metrics help text
kacpersaw Sep 3, 2024
64abe90
Fix pipeline and remove metrics for smesher and account
kacpersaw Sep 6, 2024
e70b235
Fix lint
kacpersaw Sep 6, 2024
cdd743e
Add accounts count and vested amount to epoch stats
kacpersaw Sep 12, 2024
beae011
Fix lint
kacpersaw Sep 12, 2024
d27c8e7
Fix epoch stats vested amount calculation
kacpersaw Sep 13, 2024
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
68 changes: 21 additions & 47 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI

env:
go-version: '1.22.3'
go-version: '1.23.0'

# Trigger the workflow on all pull requests, and on push to specific branches
on:
Expand Down Expand Up @@ -31,7 +31,6 @@ jobs:
runs-on: ubuntu-latest
needs: filter-changes
if: ${{ needs.filter-changes.outputs.nondocchanges == 'true' }}
# should not take more than 4-6 mins
timeout-minutes: 10
steps:
- uses: actions/setup-go@v3
Expand All @@ -42,57 +41,32 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.57.1
version: v1.60.3
only-new-issues: true
args: --timeout=3m
args: --timeout=10m --config=.golangci.yml --out-format=github-actions

unittests_api:
docker-push:
runs-on: ubuntu-latest
needs: filter-changes
if: ${{ needs.filter-changes.outputs.nondocchanges == 'true' }}
timeout-minutes: 20
needs: golangci
steps:
- name: checkout
uses: actions/checkout@v2
- name: set up go
uses: actions/setup-go@v2
- uses: actions/checkout@v2

- name: Docker meta stats api
id: meta_statsapi
uses: docker/metadata-action@v4
with:
go-version: ${{ env.go-version }}
- name: start db
run: make ci_up
- name: unit test_api
run: make test_api
images: spacemeshos/explorer-stats-api-dev

unittests_collector:
runs-on: ubuntu-latest
needs: filter-changes
if: ${{ needs.filter-changes.outputs.nondocchanges == 'true' }}
timeout-minutes: 20
steps:
- name: checkout
uses: actions/checkout@v2
- name: set up go
uses: actions/setup-go@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
go-version: ${{ env.go-version }}
- name: start db
run: make ci_up
- name: unit test_collector
run: make test_collector
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

unittests_pkg:
runs-on: ubuntu-latest
needs: filter-changes
if: ${{ needs.filter-changes.outputs.nondocchanges == 'true' }}
timeout-minutes: 20
steps:
- name: checkout
uses: actions/checkout@v2
- name: set up go
uses: actions/setup-go@v2
- uses: docker/build-push-action@v2
with:
go-version: ${{ env.go-version }}
- name: start db
run: make ci_up
- name: unit test_pkg
run: make test_pkg
context: .
repository: spacemeshos/explorer-stats-api-dev
file: ./Dockerfile
push: true
tags: ${{ steps.meta_statsapi.outputs.tags }}
30 changes: 7 additions & 23 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,16 @@ on:
types: [published]

jobs:

publish:
docker-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Docker meta apiserver
id: meta_apiserver
- name: Docker meta stats api
id: meta_statsapi
uses: docker/metadata-action@v4
with:
images: spacemeshos/explorer-apiserver

- name: Docker meta collector
id: meta_collector
uses: docker/metadata-action@v4
with:
images: spacemeshos/explorer-collector
images: spacemeshos/explorer-stats-api

- name: Login to DockerHub
uses: docker/login-action@v1
Expand All @@ -32,16 +25,7 @@ jobs:
- uses: docker/build-push-action@v2
with:
context: .
repository: spacemeshos/explorer-apiserver
file: ./Dockerfile.apiserver
push: true
tags: ${{ steps.meta_apiserver.outputs.tags }}

- uses: docker/build-push-action@v2
with:
context: .
repository: spacemeshos/explorer-collector
file: ./Dockerfile.collector
repository: spacemeshos/explorer-stats-api
file: ./Dockerfile
push: true
tags: ${{ steps.meta_collector.outputs.tags }}

tags: ${{ steps.meta_statsapi.outputs.tags }}
Loading
Loading