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

feat(makefile): introduce local-env to run local aurora & ipfs #1701

Merged
merged 18 commits into from
Jul 18, 2023
Merged

Conversation

folex
Copy link
Member

@folex folex commented Jul 13, 2023

Description

Introduce local-env and local-nox to Makefile

  • local-env runs aurora and ipfs containers
  • local-nox runs Nox via cargo run, configured to use RPC & IPFS from local-env

Motivation

Make it easier to test deal deploys and related things.

Proposed Changes

  • Add local-env command to Makefile
  • Add local-nox command to Makefile
  • Introduce enable_logs_for to make it possible to set log levels via function call. Very useful if use created-swarms & log-utils as crates in some other project

Checklist

  • The code follows the project's coding conventions and style guidelines.
  • All tests related to the changes have passed successfully.
  • Documentation has been updated to reflect the changes (if applicable).
  • All new and existing unit tests have passed.
  • I have self-reviewed my code and ensured its quality.
  • I have added/updated necessary comments to aid understanding.

Reviewer Checklist

  • Code has been reviewed for quality and adherence to guidelines.
  • Tests have been reviewed and are sufficient to validate the changes.
  • Documentation has been reviewed and is up to date.
  • Any questions or concerns have been addressed.

# Conflicts:
#	Cargo.toml
#	aquamarine/src/particle_executor.rs
#	crates/system-services/Cargo.toml
#	particle-services/src/app_service.rs
Copy link
Contributor

@gurinderu gurinderu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Why do we need a make file? You can probably use a compose file directly
  2. If we still need a make file why is it not described in README.md?
  3. Why have you made unrelated things in this pr? (I mean you touched config)

@folex
Copy link
Member Author

folex commented Jul 14, 2023

  • Why do we need a make file? You can probably use a compose file directly
    It's like scripts in package.json in JS/TS. Very useful, gives you way to share commands with fellow contributors. Good entrypoint.

Also, makefile somehow makes it easier for Cargo to handle incremental compilation. I guess it isolates environment somehow, and Cargo feels better.

  • If we still need a make file why is it not described in README.md?

Would be nice to describe it, I guess.

  • Why have you made unrelated things in this pr? (I mean you touched config)

Why not? It's a few lines. Not sure moving it to a separate PR is worth the overhead.

p.s. comments to code lines are much easier to reply to, on github.

@folex folex added the e2e Run e2e workflow label Jul 14, 2023
aquamarine/src/aqua_runtime.rs Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
folex and others added 2 commits July 17, 2023 12:59
Co-authored-by: Aleksey Proshutisnkiy <justprosh@users.noreply.github.com>
@folex folex merged commit 9199ab1 into master Jul 18, 2023
@kmd-fl
Copy link
Contributor

kmd-fl commented Jul 24, 2023

Envs don't work properly. Nox prints

ignoring `	aquamarine::aqua_runtime=off`: invalid filter directive
... 10 similar entries ...
ignoring `	particle_reap=off`: invalid filter directive

@kmd-fl
Copy link
Contributor

kmd-fl commented Jul 24, 2023

If I remove tabs (or even spaces) from strings, it works fine

server:
	WASM_LOG="trace" \
	RUST_LOG="info,\
aquamarine::aqua_runtime=off,\
ipfs_effector=off,\
ipfs_pure=off,\
system_services=debug,\
marine_core::module::marine_module=info,\
aquamarine=warn,\
tokio_threadpool=info,\
tokio_reactor=info,\
mio=info,\
tokio_io=info,\
soketto=info,\
yamux=info,\
multistream_select=info,\
libp2p_secio=info,\
libp2p_websocket::framed=info,\
libp2p_ping=info,\
libp2p_core::upgrade::apply=info,\
libp2p_kad::kbucket=info,\
cranelift_codegen=info,\
wasmer_wasi=info,\
cranelift_codegen=info,\
wasmer_wasi=info,\
run-console=trace,\
wasmtime_cranelift=off,\
wasmtime_jit=off,\
particle_reap=off" \
	cargo run --release -p nox

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

Successfully merging this pull request may close these issues.

4 participants