Skip to content

Commit

Permalink
fix(repo): Solving publisher slowness (#352)
Browse files Browse the repository at this point in the history
* feat(repo): add sv-emitter package

* build(repo): adjust run-publisher

* feat(repo): first version of consumer

* feat(repo): add the rest of payloads

* refactor(repo): reuse executors

* fix(repo): tests

* build(repo): configure devops to emitter/consumer

* build(repo): update chart version

* fix(repo): consumer cli argument

* build(repo): docker action

* build(repo): fix consumer chart

* build(repo): fix consumer chart

* build(repo): fix consumer chart

* build(repo): chart

* fix(repo): general stuff

* build(repo): docker action

* ci(repo): fix

* fix(repo): chain config

* fix(repo): docker images

* feat(repo): improve docker build

* refactor(repo): a lot of improvements

* fix(repo): fix helm chart nats config

* feat(repo): worked using mirror

* fix(repo): adjust nats cluster config

* build(repo): adjust github action

* build(repo): update chart version

* build(repo): fix docker images

* build(repo): lint warnings

* ci(repo): adjust docker action

* build(repo): fix docker file

* fix(repo): stream creation

* build(repo): fix tls for nats

* build(repo): fix chart

* build(repo): fix chart

* build(repo): fix chart

* build(repo): fix chart

* fix(repo): use sts instead of deployment for consumer

* fix(repo): fix chart

* fix(repo): remove initcontainer

* fix(repo): update chart

* fix(repo): fix resources on consumer

* fix(repo): bump chart

* fix(repo): bump chart

* fix(repo): bump chart

* build(repo): fix makefile

* build(repo): add publisher into one single Dockerfile

* ci(repo): fix docker publish action

* build(repo): fix build docker

* ci(repo): fix docker action

* ci(repo): fix tests

* ci(repo): fix ci.yaml

* build(repo): adjust fuel dependencies features
  • Loading branch information
pedronauck authored Dec 16, 2024
1 parent c7244cc commit 86db991
Show file tree
Hide file tree
Showing 90 changed files with 11,636 additions and 2,189 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2

[{Makefile,**.mk}]
# Use tabs for indentation (Makefiles require tabs)
indent_style = tab
44 changes: 19 additions & 25 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
name: CI

on:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
- edited
- reopened
push:
branches:
- main
Expand Down Expand Up @@ -187,24 +181,24 @@ jobs:
- name: Install dependencies
run: cargo fetch

test-helm:
needs: install-deps
name: Test Helm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: "latest"

- name: Install helm unittest plugin
run: |
helm plugin install https://github.com/helm-unittest/helm-unittest.git
- name: Run Helm unit tests
run: |
make helm-test
# test-helm:
# needs: install-deps
# name: Test Helm
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up Helm
# uses: azure/setup-helm@v4
# with:
# version: "latest"

# - name: Install helm unittest plugin
# run: |
# helm plugin install https://github.com/helm-unittest/helm-unittest.git

# - name: Run Helm unit tests
# run: |
# make helm-test

test:
needs: install-deps
Expand Down Expand Up @@ -364,7 +358,7 @@ jobs:
github.event_name == 'workflow_dispatch'
needs:
- test
- test-helm
# - test-helm
- build
runs-on: ubuntu-latest
permissions:
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ concurrency:
jobs:
build-and-publish-image:
runs-on: ubuntu-latest
if: |
(github.event_name == 'release' && github.event.action == 'published') ||
github.ref == 'refs/heads/main' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request'
strategy:
matrix:
package:
- name: fuel-streams-publisher
image: cluster/docker/fuel-core.Dockerfile
- name: sv-emitter
image: cluster/docker/fuel-core.Dockerfile
- name: sv-consumer
image: cluster/docker/sv-consumer.Dockerfile
steps:
- uses: actions/checkout@v4

Expand All @@ -38,5 +42,7 @@ jobs:
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
image: ghcr.io/fuellabs/fuel-streams-publisher
dockerfile: cluster/docker/fuel-streams-publisher.Dockerfile
image: ghcr.io/fuellabs/${{ matrix.package.name }}
dockerfile: ${{ matrix.package.image }}
build-args: |-
PACKAGE_NAME=${{ matrix.package.name }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ coverage/
docs/
**/**/charts/**.tgz
values-publisher-secrets.yaml
.vscode/launch.json
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
helm
cluster
cluster/charts
pnpm-lock.yaml
5 changes: 5 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ use_field_init_shorthand = true
reorder_imports = true
reorder_modules = true
tab_spaces = 4
# Add these new settings
format_macro_matchers = true
format_macro_bodies = true
# If you want macros to ignore the max_width setting
overflow_delimited_expr = true
109 changes: 78 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 18 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,31 @@ clap = { version = "4.5", features = ["derive", "env"] }
dotenvy = "0.15"
displaydoc = "0.2"
futures = "0.3"
fuel-core-bin = { version = "0.40.2", features = ["p2p", "relayer", "rocksdb"] }
fuel-core = { version = "0.40.2", features = ["p2p", "relayer", "rocksdb"] }
fuel-core-client = { version = "0.40.2" }
fuel-core-bin = { version = "0.40.2", default-features = false, features = [
"p2p",
"relayer",
"rocksdb",
] }
fuel-core = { version = "0.40.2", default-features = false, features = [
"p2p",
"relayer",
"rocksdb",
] }
fuel-core-client = { version = "0.40.2", default-features = false, features = ["std"] }
fuel-core-importer = { version = "0.40.2" }
fuel-core-storage = { version = "0.40.2" }
fuel-core-types = { version = "0.40.2", features = ["test-helpers", "serde"] }
fuel-core-services = { version = "0.40.2" }
fuel-core-types = { version = "0.40.2", default-features = false, features = ["std", "serde"] }
fuel-core-services = { version = "0.40.2", default-features = false, features = ["test-helpers"] }
futures-util = "0.3"
itertools = "0.13"
mockall = "0.13"
mockall_double = "0.3.1"
hex = "0.4"
pretty_assertions = "1.4"
num_cpus = "1.16"
rand = "0.8"
serde = { version = "1.0", features = ["derive"] }
rayon = "1.10.0"
serde_json = "1.0"
sha2 = "0.10"
strum = "0.26"
Expand All @@ -65,6 +75,9 @@ fuel-streams-core = { version = "0.0.13", path = "crates/fuel-streams-core" }
fuel-streams-publisher = { version = "0.0.13", path = "crates/fuel-streams-publisher" }
fuel-streams-macros = { version = "0.0.13", path = "crates/fuel-streams-macros" }
subject-derive = { version = "0.0.13", path = "crates/fuel-streams-macros/subject-derive" }
fuel-streams-executors = { version = "0.0.13", path = "crates/fuel-streams-executors" }
sv-emitter = { version = "0.0.13", path = "crates/sv-emitter" }
sv-consumer = { version = "0.0.13", path = "crates/sv-consumer" }

# Workspace projects
[workspace.metadata.cargo-machete]
Expand Down
Loading

0 comments on commit 86db991

Please sign in to comment.