Skip to content

Commit

Permalink
fix: use the correct client cli name and paths
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandSherwin committed Oct 16, 2024
1 parent edc02c5 commit 2309975
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: pull_request
env:
CARGO_INCREMENTAL: "0"
RUST_BACKTRACE: 1
CLIENT_DATA_PATH: /home/runner/.local/share/safe/client
CLIENT_DATA_PATH: /home/runner/.local/share/safe/autonomi
NODE_DATA_PATH: /home/runner/.local/share/safe/node

jobs:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/generate-benchmark-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
# Criterion outputs the actual bench results to stderr "2>&1 tee output.txt" takes stderr,
# passes to tee which displays it in the terminal and writes to output.txt
run: |
cargo criterion --features=local --message-format=json 2>&1 -p autonomi | tee -a output.txt
cargo criterion --features=local --message-format=json 2>&1 -p autonomi-cli | tee -a output.txt
cat output.txt | rg benchmark-complete | jq -s 'map({
name: (.id | split("/"))[-1],
unit: "MiB/s",
Expand Down Expand Up @@ -158,17 +158,17 @@ jobs:
shell: bash
run: |
peak_mem_usage=$(
rg '"memory_used_mb":[^,]*' $CLIENT_DATA_PATH/logs --glob safe.* -o --no-line-number --no-filename |
rg '"memory_used_mb":[^,]*' $CLIENT_DATA_PATH/logs/*/*.log -o --no-line-number --no-filename |
awk -F':' '/"memory_used_mb":/{print $2}' |
sort -n |
tail -n 1
)
total_mem=$(
rg '"memory_used_mb":[^,]*' $CLIENT_DATA_PATH/logs --glob safe.* -o --no-line-number --no-filename |
rg '"memory_used_mb":[^,]*' $CLIENT_DATA_PATH/logs/*/*.log -o --no-line-number --no-filename |
awk -F':' '/"memory_used_mb":/ {sum += $2} END {printf "%.0f\n", sum}'
)
num_of_times=$(
rg "\"memory_used_mb\"" $CLIENT_DATA_PATH/logs --glob safe.* -c --stats |
rg "\"memory_used_mb\"" $CLIENT_DATA_PATH/logs/*/*.log -c --stats |
rg "(\d+) matches" |
rg "\d+" -o
)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/memcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

env:
SAFE_DATA_PATH: /home/runner/.local/share/safe
CLIENT_DATA_PATH: /home/runner/.local/share/safe/client
CLIENT_DATA_PATH: /home/runner/.local/share/safe/autonomi
NODE_DATA_PATH: /home/runner/.local/share/safe/node
BOOTSTRAP_NODE_DATA_PATH: /home/runner/.local/share/safe/bootstrap_node
RESTART_TEST_NODE_DATA_PATH: /home/runner/.local/share/safe/restart_node
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ jobs:

- name: Delete current register signing key
shell: bash
run: rm -rf ${{ matrix.safe_path }}/client
run: rm -rf ${{ matrix.safe_path }}/autonomi

- name: Generate new register signing key
run: ./target/release/autonomi --log-output-dest=data-dir register generate-key
Expand Down Expand Up @@ -932,7 +932,7 @@ jobs:
# ls -l /home/runner/.local/share/safe
# rm -rf /home/runner/.local/share/safe/test_faucet
# rm -rf /home/runner/.local/share/safe/test_genesis
# rm -rf /home/runner/.local/share/safe/client
# rm -rf /home/runner/.local/share/safe/autonomi
# env:
# SN_LOG: "all"
# timeout-minutes: 5
Expand Down Expand Up @@ -973,7 +973,7 @@ jobs:
# ls -l /home/runner/.local/share/safe
# rm -rf /home/runner/.local/share/safe/test_faucet
# rm -rf /home/runner/.local/share/safe/test_genesis
# rm -rf /home/runner/.local/share/safe/client
# rm -rf /home/runner/.local/share/safe/autonomi
# ~/safe --log-output-dest=data-dir wallet create --no-password
# if GENESIS_PK=a9925296499299fdbf4412509d342a92e015f5b996e9acd1d2ab7f2326e3ad05934326efdc345345a95e973ac1bb6637 GENESIS_SK=40f6bbc870355c68138ac70b450b6425af02b49874df3f141b7018378ceaac66 nohup ~/faucet --log-output-dest=data-dir send 100000000 $(~/safe --log-output-dest=data-dir wallet address | tail -n 1); then
# echo "Faucet with different genesis key not rejected!"
Expand All @@ -995,7 +995,7 @@ jobs:
# ls -l /home/runner/.local/share/safe
# rm -rf /home/runner/.local/share/safe/test_faucet
# rm -rf /home/runner/.local/share/safe/test_genesis
# rm -rf /home/runner/.local/share/safe/client
# rm -rf /home/runner/.local/share/safe/autonomi
# target/release/faucet server &
# sleep 60
# env:
Expand Down Expand Up @@ -1161,15 +1161,15 @@ jobs:
# ls $CLIENT_DATA_PATH/wallet/confirmed_spends -l
# ls $CLIENT_DATA_PATH/logs -l
# env:
# CLIENT_DATA_PATH: /home/runner/.local/share/safe/client
# CLIENT_DATA_PATH: /home/runner/.local/share/safe/autonomi
# timeout-minutes: 1

# replication_bench_with_heavy_upload:
# if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
# name: Replication bench with heavy upload
# runs-on: ubuntu-latest
# env:
# CLIENT_DATA_PATH: /home/runner/.local/share/safe/client
# CLIENT_DATA_PATH: /home/runner/.local/share/safe/autonomi
# steps:
# - uses: actions/checkout@v4

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/nightly_wan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
path: |
~/.local/share/safe/node/*/logs/*.log*
~/.local/share/safe/*/*/*.log*
~/.local/share/safe/client/logs/*/*.log*
~/.local/share/safe/autonomi/logs/*/*.log*
- name: destroy network
if: always()
Expand Down Expand Up @@ -235,7 +235,7 @@ jobs:
# path: |
# ~/.local/share/safe/node/*/logs/*.log*
# ~/.local/share/safe/*/*/*.log*
# ~/.local/share/safe/client/logs/*/*.log*
# ~/.local/share/safe/autonomi/logs/*/*.log*

# - name: destroy network
# uses: maidsafe/sn-testnet-control-action/destroy-network@main
Expand Down Expand Up @@ -349,7 +349,7 @@ jobs:
# path: |
# ~/.local/share/safe/node/*/logs/*.log*
# ~/.local/share/safe/*/*/*.log*
# ~/.local/share/safe/client/logs/*/*.log*
# ~/.local/share/safe/autonomi/logs/*/*.log*
#
# - name: Stop the WAN network
# if: always()
Expand Down Expand Up @@ -555,7 +555,7 @@ jobs:
# path: |
# ~/.local/share/safe/node/*/logs/*.log*
# ~/.local/share/safe/*/*/*.log*
# ~/.local/share/safe/client/logs/*/*.log*
# ~/.local/share/safe/autonomi/logs/*/*.log*
#
# - name: Stop the WAN network
# if: always()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_wan_churn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
path: |
~/.local/share/safe/node/*/logs/*.log*
~/.local/share/safe/*/*/*.log*
~/.local/share/safe/client/logs/*/*.log*
~/.local/share/safe/autonomi/logs/*/*.log*
- name: Stop the WAN network
if: always()
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Libp2p.<br>

### For Users

- [CLI](https://github.com/maidsafe/safe_network/blob/main/autonomi_cli/README.md) The Command Line
- [CLI](https://github.com/maidsafe/safe_network/blob/main/autonomi-cli/README.md) The Command Line
Interface, allowing users to interact with the network from their terminal.
- [Node](https://github.com/maidsafe//safe_network/blob/main/sn_node/README.md) The backbone of the
safe network. Nodes can be run on commodity hardware and provide storage space and validation of
Expand Down Expand Up @@ -65,7 +65,7 @@ cargo build --release --features=network-contacts --bin safenode

- [Autonomi API](https://github.com/maidsafe/safe_network/blob/main/autonomi/README.md) The client APIs
allowing use of the Autonomi Network to users and developers.
- [Autonomi CLI](https://github.com/maidsafe/safe_network/blob/main/autonomi_cli/README.md) The Command Line
- [Autonomi CLI](https://github.com/maidsafe/safe_network/blob/main/autonomi-cli/README.md) The Command Line
Interface, allowing users to interact with the network from their terminal.
- [Node](https://github.com/maidsafe/safe_network/blob/main/sn_node/README.md) The backbone of the
autonomi network. Nodes can be run on commodity hardware and run the Network.
Expand Down
2 changes: 1 addition & 1 deletion autonomi-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A CLI for the Autonomi Network

```
Usage: autonomi_cli [OPTIONS] <COMMAND>
Usage: autonomi [OPTIONS] <COMMAND>
Commands:
file Operations related to file handling
Expand Down
2 changes: 1 addition & 1 deletion autonomi-cli/benches/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ fn get_cli_path() -> PathBuf {
path.push("target");
}
path.push("release");
path.push("autonomi_cli");
path.push("autonomi");
path
}

Expand Down
2 changes: 1 addition & 1 deletion autonomi-cli/src/access/data_dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn get_client_data_dir_path() -> Result<PathBuf> {
let mut home_dirs = dirs_next::data_dir()
.ok_or_else(|| eyre!("Failed to obtain data dir, your OS might not be supported."))?;
home_dirs.push("safe");
home_dirs.push("client");
home_dirs.push("autonomi");
std::fs::create_dir_all(home_dirs.as_path()).wrap_err("Failed to create data dir")?;
Ok(home_dirs)
}
6 changes: 3 additions & 3 deletions autonomi-cli/src/opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ pub(crate) struct Opt {
/// `data-dir` is the default value.
///
/// The data directory location is platform specific:
/// - Linux: $HOME/.local/share/safe/client/logs
/// - macOS: $HOME/Library/Application Support/safe/client/logs
/// - Windows: C:\Users\<username>\AppData\Roaming\safe\client\logs
/// - Linux: $HOME/.local/share/safe/autonomi/logs
/// - macOS: $HOME/Library/Application Support/safe/autonomi/logs
/// - Windows: C:\Users\<username>\AppData\Roaming\safe\autonomi\logs
#[allow(rustdoc::invalid_html_tags)]
#[clap(long, value_parser = LogOutputDest::parse_from_str, verbatim_doc_comment, default_value = "data-dir")]
pub log_output_dest: LogOutputDest,
Expand Down
6 changes: 1 addition & 5 deletions sn_logging/src/layers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,21 +266,17 @@ fn get_logging_targets(logging_env_value: &str) -> Result<Vec<(String, Level)>>
if contains_keyword_all_sn_logs || contains_keyword_verbose_sn_logs {
let mut t = BTreeMap::from_iter(vec![
// bins
("autonomi_cli".to_string(), Level::TRACE),
("autonomi-cli".to_string(), Level::TRACE),
("evm_testnet".to_string(), Level::TRACE),
("faucet".to_string(), Level::TRACE),
("safenode".to_string(), Level::TRACE),
("safenode_rpc_client".to_string(), Level::TRACE),
("safe".to_string(), Level::TRACE),
("safenode_manager".to_string(), Level::TRACE),
("safenodemand".to_string(), Level::TRACE),
// libs
("autonomi".to_string(), Level::TRACE),
("evmlib".to_string(), Level::TRACE),
("sn_evm".to_string(), Level::TRACE),
("sn_build_info".to_string(), Level::TRACE),
("sn_client".to_string(), Level::TRACE),
("sn_faucet".to_string(), Level::TRACE),
("sn_logging".to_string(), Level::TRACE),
("sn_node_manager".to_string(), Level::TRACE),
("sn_node_rpc_client".to_string(), Level::TRACE),
Expand Down

0 comments on commit 2309975

Please sign in to comment.