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

BEDS 425/api app bundle #849

Closed
wants to merge 88 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
d0d7a81
Implemented service to archive dashboards
Eisei24 Aug 14, 2024
43c860d
Fixed boundary off by one error
Eisei24 Aug 19, 2024
d4a486b
Merge branch 'staging' into BEDS-176/Archive_dashboards_service
Eisei24 Aug 20, 2024
20fa8db
Minor fixes
Eisei24 Aug 20, 2024
e938835
Merge branch 'staging' into BEDS-176/Archive_dashboards_service
Eisei24 Aug 20, 2024
724d1b2
Fixed lint issue
Eisei24 Aug 20, 2024
e5c066e
Grouped together the archiving and deleting of dashboards
Eisei24 Aug 22, 2024
0f33756
Merge branch 'staging' into BEDS-176/Archive_dashboards_service
Eisei24 Aug 23, 2024
dfc69f7
Adjusted for single binary handling
Eisei24 Aug 23, 2024
ab43296
Fixed linter issue
Eisei24 Aug 23, 2024
9d24250
changed validators to body param
remoterami Aug 29, 2024
5f91768
public endpoint
remoterami Aug 29, 2024
c0c021e
efficient slice handling
remoterami Aug 29, 2024
7c05c13
Merge remote-tracking branch 'origin/staging' into BEDS-176/Archive_d…
remoterami Sep 2, 2024
db4cac6
leveraging cascading delete
remoterami Sep 2, 2024
8391128
Use cascade delete to simplify group removal
Eisei24 Sep 2, 2024
b4a274f
feat(dashboard): integration test scaffolding
peterbitfly Sep 3, 2024
f02c32c
feat(api): make writing tests more convenient
peterbitfly Sep 3, 2024
f7842ca
CR comments
RomiRand Sep 3, 2024
9974bb7
(BEDS-409) deposit endpoints: remove search param from (#819)
LuccaBitfly Sep 3, 2024
dd3e084
feat(api): improve testing scaffolding
peterbitfly Sep 3, 2024
e481b07
feat(api): simplify json parsing in tests
peterbitfly Sep 3, 2024
6d07c0c
chore(api): improve test formatting
peterbitfly Sep 3, 2024
c88ec7e
feat:Set HTML attributes to prevent popups from third-party apps. BED…
benji-bitfly Sep 3, 2024
6083f77
Fix lint comment.
benji-bitfly Sep 3, 2024
865eb6a
Merge pull request #821 from gobitfly/BEDS-368/bitwarden-popup
benji-bitfly Sep 3, 2024
d81e506
chore(api): remove debug logging
peterbitfly Sep 3, 2024
5c715ed
chore(api): please linter
peterbitfly Sep 3, 2024
8c9e12e
Merge remote-tracking branch 'origin/staging' into BEDS-374/validator…
remoterami Sep 3, 2024
148ade3
Merge remote-tracking branch 'origin/staging' into BEDS-176/Archive_d…
remoterami Sep 3, 2024
4175fcc
Merge pull request #746 from gobitfly/BEDS-176/Archive_dashboards_ser…
remoterami Sep 3, 2024
0f8f148
feat: adjust style for displaying the accordion content. BEDS-405
benji-bitfly Sep 4, 2024
56de7d0
Merge pull request #823 from gobitfly/BEDS-405/validator-modal-text
benji-bitfly Sep 4, 2024
5f98765
BEDS-306: monitoring: increase db timeout
invis-bitfly Sep 4, 2024
8933f7c
feat(api): add integration test workflow
peterbitfly Sep 4, 2024
efb7fd6
Merge branch 'BEDS-401/api_integration_tests' of github.com:gobitfly/…
peterbitfly Sep 4, 2024
89fae48
feat(api): update test workflow
peterbitfly Sep 4, 2024
a5ee230
chore(api): update test workflow
peterbitfly Sep 4, 2024
f4d224d
chore(api): update test workflow
peterbitfly Sep 4, 2024
ecba3dd
chore: update test workflow
peterbitfly Sep 4, 2024
6e28170
chore: update test workflow
peterbitfly Sep 4, 2024
1c4cc5a
chore(api): update test workflow
peterbitfly Sep 4, 2024
f5a3cdc
chore: update test workflow
peterbitfly Sep 4, 2024
8e127a7
chore: enable backend integration tests on push to main and staging b…
peterbitfly Sep 4, 2024
97a5392
refactor: change database connection log level to debug
peterbitfly Sep 4, 2024
4563a9e
Merge branch 'BEDS-401/api_integration_tests' of github.com:gobitfly/…
peterbitfly Sep 4, 2024
76f810b
Merge pull request #824 from gobitfly/BEDS-306/increase-healthz-timeout
invis-bitfly Sep 4, 2024
603ecc6
chore(api): code review comments
peterbitfly Sep 4, 2024
97f016c
Merge branch 'BEDS-401/api_integration_tests' of github.com:gobitfly/…
peterbitfly Sep 4, 2024
73c2653
chore: Update backend integration test workflow
peterbitfly Sep 4, 2024
c63a2ee
fix: :lipstick: Add workaround to fix the shifitng-display issue and …
benji-bitfly Sep 4, 2024
d127dbe
chore: Update backend integration test workflow
peterbitfly Sep 4, 2024
7963294
chore: Initialize services and update logging in service.go
peterbitfly Sep 4, 2024
bf1d9d2
chore: Update backend integration test workflow
peterbitfly Sep 4, 2024
76a0184
chore: Add log statement for test setup completion
peterbitfly Sep 4, 2024
0a71110
chore: Update test setup completion log statement in api_test.go
peterbitfly Sep 4, 2024
f574b40
chore: Initialize services and update logging in service.go
peterbitfly Sep 4, 2024
6ae9373
chore: Update logging in service.go and initialize services
peterbitfly Sep 4, 2024
5819735
Merge branch 'staging' into BEDS-401/api_integration_tests
peterbitfly Sep 4, 2024
2254143
chore: Start data access services in api_test.go setup()
peterbitfly Sep 4, 2024
fbd9716
chore: Refactor backend integration test workflow and update test set…
peterbitfly Sep 4, 2024
3995313
Merge pull request #822 from gobitfly/BEDS-401/api_integration_tests
peterbitfly Sep 4, 2024
528727b
Merge pull request #825 from gobitfly/BEDS-406/Validator-modal
benji-bitfly Sep 4, 2024
9c48bd0
fix(api): correct order in assert
peterbitfly Sep 4, 2024
4f61837
Merge pull request #826 from gobitfly/BEDS-401/fix_assert_order
peterbitfly Sep 4, 2024
b428cf1
Merge pull request #803 from gobitfly/BEDS-374/validators-body-param
remoterami Sep 4, 2024
b103de4
feat(api): add more integration tests
peterbitfly Sep 5, 2024
91d5ff0
feat: Adapt to API changes. BEDS-422
benji-bitfly Sep 5, 2024
f7e9faa
BEDS-306: monitoring: attempt to deflake rolling check
invis-bitfly Sep 5, 2024
b358d7b
BEDS-99: enable support for enabling more log levels
invis-bitfly Sep 5, 2024
753c2fe
feat: Adapt frontend. BEDS-422
benji-bitfly Sep 5, 2024
cf179d2
feat: delete unnecessery comment. BEDS-422
benji-bitfly Sep 5, 2024
e065bff
Merge pull request #830 from gobitfly/BEDS-306/deflake-rolling-check
invis-bitfly Sep 5, 2024
f8a66b1
feat: Add necessery changes for the api update. BEDS-422
benji-bitfly Sep 5, 2024
644aba8
Merge pull request #831 from gobitfly/BEDS-422/validator-modal-api-ch…
benji-bitfly Sep 5, 2024
f2f0a1d
feat: Add changes necessery changes. BEDS-422
benji-bitfly Sep 5, 2024
b8d5f4b
Merge pull request #832 from gobitfly/BEDS-422/validator-modal-api-ch…
benji-bitfly Sep 5, 2024
3bd2ea4
Merge pull request #833 from gobitfly/staging
guybrush Sep 5, 2024
4760bf1
Merge pull request #834 from gobitfly/main
guybrush Sep 5, 2024
918be99
ci: tag docker images (#835)
guybrush Sep 5, 2024
910ade9
(BEDS-442) accept charset param in request content type (#837)
LuccaBitfly Sep 6, 2024
e61defb
ci: fix docker-tags (remove dash at end) (#839)
guybrush Sep 6, 2024
95faf16
Merge pull request #829 from gobitfly/BEDS-428/more_intergration_tests
peterbitfly Sep 7, 2024
b1887c6
(BEDS-425) implement endpoint for mobile app bundles
LuccaBitfly Sep 9, 2024
782cf36
(BEDS-425) move increment to own endpoint
LuccaBitfly Sep 9, 2024
2171c7b
(BEDS-425) GetLatestBundleForNativeVersion: rename param
LuccaBitfly Sep 9, 2024
c398c9a
(BEDS-425) return proper response
LuccaBitfly Sep 10, 2024
e0594f4
(BEDS-425) remove environment query param
LuccaBitfly Sep 10, 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
39 changes: 39 additions & 0 deletions .github/workflows/backend-integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Backend-Integration-Test
on:
push:
paths:
- 'backend/**'
branches:
- main
- staging
pull_request:
paths:
- 'backend/**'
branches:
- '*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: read
checks: write

jobs:
build:
name: integration-test
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: 'backend/go.mod'
cache-dependency-path: 'backend/go.sum'
- name: Test with the Go CLI
working-directory: backend
run: go test -failfast ./pkg/api/... -config "${{ secrets.CI_CONFIG_PATH }}"



5 changes: 5 additions & 0 deletions .github/workflows/backend-publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
paths:
- 'backend/**'
- '.github/**'
branches:
- main
- staging
Expand All @@ -27,6 +28,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set version
run: |
echo "BEACONCHAIN_VERSION=$(TZ=UTC0 git show --quiet --date='format-local:%Y%m%d%H%M%S' --format="%cd" $GITHUB_SHA)-$(git describe $GITHUB_SHA --always --tags)" >> "$GITHUB_ENV"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
Expand All @@ -42,6 +46,7 @@ jobs:
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: ${{ env.BEACONCHAIN_VERSION }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/frontend-publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
paths:
- 'frontend/**'
- '.github/**'
branches:
- main
- staging
Expand Down Expand Up @@ -45,6 +46,7 @@ jobs:
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: ${{ env.BEACONCHAIN_VERSION }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
Expand Down
1 change: 1 addition & 0 deletions backend/cmd/api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func Run() {
dataAccessor = dataaccess.NewDummyService()
} else {
dataAccessor = dataaccess.NewDataAccessService(cfg)
dataAccessor.StartDataAccessServices()
}
defer dataAccessor.Close()

Expand Down
47 changes: 47 additions & 0 deletions backend/cmd/archiver/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package archiver

import (
"flag"
"os"

dataaccess "github.com/gobitfly/beaconchain/pkg/api/data_access"

"github.com/gobitfly/beaconchain/pkg/commons/log"
"github.com/gobitfly/beaconchain/pkg/commons/types"
"github.com/gobitfly/beaconchain/pkg/commons/utils"
"github.com/gobitfly/beaconchain/pkg/commons/version"

"github.com/gobitfly/beaconchain/pkg/archiver"
)

func Run() {
fs := flag.NewFlagSet("fs", flag.ExitOnError)
configPath := fs.String("config", "", "Path to the config file, if empty string defaults will be used")
versionFlag := fs.Bool("version", false, "Show version and exit")
_ = fs.Parse(os.Args[2:])

if *versionFlag {
log.Info(version.Version)
log.Info(version.GoVersion)
return
}

cfg := &types.Config{}
err := utils.ReadConfig(cfg, *configPath)
if err != nil {
log.Fatal(err, "error reading config file", 0)
}
utils.Config = cfg

log.InfoWithFields(log.Fields{"config": *configPath, "version": version.Version, "commit": version.GitCommit, "chainName": utils.Config.Chain.ClConfig.ConfigName}, "starting")

dataAccessor := dataaccess.NewDataAccessService(cfg)
defer dataAccessor.Close()

archiver, err := archiver.NewArchiver(dataAccessor)
if err != nil {
log.Fatal(err, "error initializing archiving service", 0)
}
go archiver.Start()
utils.WaitForCtrlC()
}
3 changes: 3 additions & 0 deletions backend/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"os"

"github.com/gobitfly/beaconchain/cmd/api"
"github.com/gobitfly/beaconchain/cmd/archiver"
"github.com/gobitfly/beaconchain/cmd/blobindexer"
"github.com/gobitfly/beaconchain/cmd/eth1indexer"
"github.com/gobitfly/beaconchain/cmd/ethstore_exporter"
Expand Down Expand Up @@ -32,6 +33,8 @@ func main() {
switch target {
case "api":
api.Run()
case "archiver":
archiver.Run()
case "blobindexer":
blobindexer.Run()
case "eth1indexer":
Expand Down
2 changes: 1 addition & 1 deletion backend/cmd/typescript_converter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const (
)

// Files that should not be converted to TypeScript
var ignoredFiles = []string{"data_access", "search_types"}
var ignoredFiles = []string{"data_access", "search_types", "archiver"}

var typeMappings = map[string]string{
"decimal.Decimal": "string /* decimal.Decimal */",
Expand Down
20 changes: 20 additions & 0 deletions backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ require (
github.com/donovanhide/eventsource v0.0.0-20210830082556-c59027999da0
github.com/doug-martin/goqu/v9 v9.19.0
github.com/ethereum/go-ethereum v1.13.12
github.com/fergusstrange/embedded-postgres v1.29.0
github.com/gavv/httpexpect/v2 v2.16.0
github.com/go-faker/faker/v4 v4.3.0
github.com/go-redis/redis/v8 v8.11.5
github.com/gobitfly/eth-rewards v0.1.2-0.20230403064929-411ddc40a5f7
Expand Down Expand Up @@ -61,6 +63,7 @@ require (
github.com/rocket-pool/smartnode v1.13.6
github.com/shopspring/decimal v1.3.1
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.9.0
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d
github.com/wealdtech/go-ens/v3 v3.6.0
github.com/wealdtech/go-eth2-types/v2 v2.8.2
Expand All @@ -87,6 +90,8 @@ require (
cloud.google.com/go/storage v1.36.0 // indirect
github.com/ClickHouse/ch-go v0.58.2 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2 // indirect
github.com/ajg/form v1.5.1 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
github.com/alessio/shellescape v1.4.1 // indirect
github.com/andybalholm/brotli v1.0.6 // indirect
Expand Down Expand Up @@ -122,6 +127,7 @@ require (
github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/fatih/structtag v1.2.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/ferranbt/fastssz v0.1.3 // indirect
Expand All @@ -133,12 +139,14 @@ require (
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/goccy/go-yaml v1.9.5 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
Expand All @@ -147,6 +155,7 @@ require (
github.com/herumi/bls-eth-go-binary v1.31.0 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/huandu/go-clone v1.6.0 // indirect
github.com/imkira/go-interpol v1.1.0 // indirect
github.com/ipfs/bbloom v0.0.4 // indirect
github.com/ipfs/boxo v0.8.0 // indirect
github.com/ipfs/go-bitfield v1.1.0 // indirect
Expand Down Expand Up @@ -179,6 +188,7 @@ require (
github.com/minio/highwayhash v1.0.2 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
Expand All @@ -194,6 +204,7 @@ require (
github.com/paulmach/orb v0.10.0 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pierrec/lz4/v4 v4.1.18 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/polydawn/refmt v0.89.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.47.0 // indirect
Expand All @@ -204,14 +215,18 @@ require (
github.com/prysmaticlabs/prysm/v3 v3.2.2 // indirect
github.com/r3labs/sse/v2 v2.10.0 // indirect
github.com/rs/zerolog v1.29.1 // indirect
github.com/sanity-io/litter v1.5.5 // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/sethvargo/go-retry v0.2.4 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/thomaso-mirodin/intmath v0.0.0-20160323211736-5dc6d854e46e // indirect
github.com/tklauser/go-sysconf v0.3.13 // indirect
github.com/tklauser/numcpus v0.7.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.34.0 // indirect
github.com/wealdtech/go-bytesutil v1.2.0 // indirect
github.com/wealdtech/go-merkletree v1.0.1-0.20190605192610-2bb163c2ea2a // indirect
github.com/wealdtech/go-multicodec v1.4.0 // indirect
Expand All @@ -220,6 +235,10 @@ require (
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 // indirect
github.com/yudai/gojsondiff v1.0.0 // indirect
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect
Expand All @@ -243,6 +262,7 @@ require (
gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
moul.io/http2curl/v2 v2.3.0 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)

Expand Down
Loading
Loading