Skip to content

feat: custom waku fleet options #17806

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

igor-sirotin
Copy link
Contributor

@igor-sirotin igor-sirotin commented Apr 16, 2025

Description

Added options to run status-desktop with a custom (e.g. local) waku fleet:

  • --waku-fleet
  • --waku-fleets-config

Usage

  1. Start a local waku fleet:

    docker compose -f ./vendor/status-go/tests-functional/docker-compose.waku.yml up --build --remove-orphans
    
  2. Run status-desktop:

    mr ARGS="--waku-fleet=status-go.test --waku-fleets-config=/Users/igorsirotin/Repositories/Status/status-desktop/vendor/status-go/tests-functional/waku_configs/wakufleetconfig.json"
    
  3. Create a new profile.
    ⚠️ This currently does not work with LoginAccount endpoint, as it simply does not have the WakuV2Fleet argument (we should add it, shouldn't be difficult).

@igor-sirotin
Copy link
Contributor Author

A crash happens at the login:

/Users/igorsirotin/Repositories/Status/status-desktop/src/nim_status_client.nim(265) nim_status_client
/Users/igorsirotin/Repositories/Status/status-desktop/src/nim_status_client.nim(262) mainProc
/Users/igorsirotin/Repositories/Status/status-desktop/vendor/nimqml/src/nimqml/private/qguiapplication.nim(24) exec
/Users/igorsirotin/Repositories/Status/status-desktop/vendor/nimqml/src/nimqml/private/qobject.nim(134) qobjectCallback
/Users/igorsirotin/Repositories/Status/status-desktop/vendor/nimqml/src/nimqml/private/qobject.nim(119) onSlotCalled
(3)                      onSlotCalled
/Users/igorsirotin/Repositories/Status/status-desktop/src/app/core/signals/signals_manager.nim(63) receiveSignal
/Users/igorsirotin/Repositories/Status/status-desktop/src/app/core/signals/signals_manager.nim(60) processSignal
/Users/igorsirotin/Repositories/Status/status-desktop/src/app/core/eventemitter.nim(59) emit
/Users/igorsirotin/Repositories/Status/status-desktop/src/app/modules/onboarding/controller.nim(60) :anonymous
/Users/igorsirotin/Repositories/Status/status-desktop/src/app/modules/onboarding/io_interface.nim(19) onNodeLogin
/Users/igorsirotin/Repositories/Status/status-desktop/src/app/modules/onboarding/module.nim(349) onNodeLogin
/Users/igorsirotin/Repositories/Status/status-desktop/src/app/modules/onboarding/module.nim(311) finishAppLoading2
/Users/igorsirotin/Repositories/Status/status-desktop/src/app/boot/app_controller.nim(436) finishAppLoading
/Users/igorsirotin/Repositories/Status/status-desktop/src/app/boot/app_controller.nim(379) load
/Users/igorsirotin/Repositories/Status/status-desktop/src/app_service/service/mailservers/service.nim(110) init
/Users/igorsirotin/Repositories/Status/status-desktop/src/app_service/service/mailservers/service.nim initMailservers
/Users/igorsirotin/Repositories/Status/status-desktop/src/app/core/fleets/fleet_configuration.nim(76) getMailservers
/Users/igorsirotin/Repositories/Status/status-desktop/vendor/nimbus-build-system/vendor/Nim/lib/pure/collections/tables.nim(247) []
/Users/igorsirotin/Repositories/Status/status-desktop/vendor/nimbus-build-system/vendor/Nim/lib/pure/collections/tables.nim(235) raiseKeyError
Error: unhandled exception: key not found:  [KeyError]
make: *** [run-macos] Error 1
.venv(base) [16/04/25 5:06:01] ➜  status-desktop git:(master) ✗ 

It's obvious where it crashes:

proc getMailservers*(self: FleetConfiguration, fleet: Fleet): Table[string, string] =
var fleetKey: string
if fleet == Fleet.StatusProd or fleet == Fleet.StatusStaging:
fleetKey = $FleetNodes.WakuStore
else:
fleetKey = $FleetNodes.Waku
if not self.fleet[$fleet].hasKey(fleetKey):
result = initTable[string, string]()
return
result = self.fleet[$fleet][fleetKey]

But I'm not sure why do we even have this weird code with some hard-coded custom behaviour for prod/staging fleets.
This should be reviewed and perhaps removed. If any such logic is needed for real, it should done in status-go.

@status-im-auto
Copy link
Member

status-im-auto commented Apr 16, 2025

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 415fc79 #1 2025-04-16 16:17:55 ~8 min macos/aarch64 🍎dmg
✔️ 415fc79 #1 2025-04-16 16:18:46 ~9 min tests/nim 📄log
✔️ 415fc79 #1 2025-04-16 16:22:44 ~13 min tests/ui 📄log
✔️ 415fc79 #1 2025-04-16 16:24:37 ~15 min macos/x86_64 🍎dmg
✔️ 415fc79 #1 2025-04-16 16:28:28 ~19 min windows/x86_64 💿exe
✔️ 415fc79 #1 2025-04-16 16:34:38 ~25 min linux-nix/x86_64 📦tgz
✔️ 415fc79 #1 2025-04-16 16:36:58 ~27 min linux/x86_64 📦tgz

@anastasiyaig
Copy link
Contributor

its weird that you see crashes, when tests are green, perhaps the crash is related to macOS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants