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

fix: Change shell execution to bash #7

Merged
merged 1 commit into from
Jun 8, 2024
Merged

Conversation

moraesjeremias
Copy link
Member

Reason for Change

  • It was identified that lc up cmd was broken due to a diff shell execution based on Availup script.

Changes

  • Change shell execution from sh to bash

Backgound

Availup script was designed to be run by bash, since it uses some bash expressions that can't be interpreted in sh shell.

Local tests

Running avail lc up as is:

╰─$ avail lc up
🆙 Starting Availup...
sh: 4: [[: not found
sh: 4: [[: not found
🚫 Unable to locate a shell. Availup might not work as intended!
🫣 Unable to locate a compatible shell or rc file, using POSIX default, availup might not work as intended!
🛜  No network selected. Defaulting to turing testnet.
📌 Turing testnet selected.
🗑️  Wiping old config file at ~/.avail/turing/config/config.yml.
📲 No app ID specified. Defaulting to light client mode.
🔑 Identity found at ~/.avail/identity/identity.toml.
⬆️  Avail binary is out of date. Upgrading...
🔄 Resetting configuration and data...
✅ Availup exited successfully.
🧱 Starting Avail.
Error: 
   0: Starting Light Client failed
   1: Failed to load configuration from ~/.avail/turing/config/config.yml
   2: Bad TOML data: expected an equals, found an identifier at line 1 column 4

Location:
   src/types.rs:988

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
🔄 Avail stopped. Future instances of the light client can be started by invoking the avail-light binary or rerunning this script
sh: 173: [[: not found

Running local changes:

╰─$ npm run script lc up

> @availproject/cli@0.1.12 script
> tsc && node index.js lc up

🆙 Starting Availup...
📌 Goldberg network is deprecated. Turing testnet selected.
🗑️  Wiping old config file at ~/.avail/turing/config/config.yml.
📲 No app ID specified. Defaulting to light client mode.
🔑 Identity found at ~/.avail/identity/identity.toml.
🔄 Checking for updates...
✅ Avail binary is up to date.
🔄 Resetting configuration and data...
✅ Availup exited successfully.
🧱 Starting Avail.
2024-06-07T20:33:45.899302Z  WARN avail_light::types: Using deprecated configuration parameter `avail_secret_seed_phrase`, use `avail_secret_uri` instead.
2024-06-07T20:33:45.905039Z  INFO avail_light: Identity loaded from ~/.avail/identity/identity.toml
2024-06-07T20:33:45.905075Z  INFO avail_light: Running Avail light client version: 1.9.0. Role: lightnode.
2024-06-07T20:33:45.905083Z  INFO avail_light: Using config: RuntimeConfig { http_server_host: "127.0.0.1", http_server_port: 7000, secret_key: None, port: 37000, ws_transport_enable: false, autonat_only_global_ips: false, autonat_throttle: 1, autonat_retry_interval: 20, autonat_refresh_interval: 360, autonat_boot_delay: 5, bootstraps: [Compact(CompactMultiaddress((PeerId("12D3KooWBkLsNGaD3SpMaRWtAmWVuiZg1afdNSPbtJ8M8r9ArGRT"), "/dns/bootnode.1.lightclient.turing.avail.so/tcp/37000/p2p/12D3KooWBkLsNGaD3SpMaRWtAmWVuiZg1afdNSPbtJ8M8r9ArGRT")))], bootstrap_period: 3600, operation_mode: Client, relays: [], full_node_ws: ["<REDACTED>"], genesis_hash: "d3d2f3a3495dc597434a99d7d449ebad6616db45e4e4f178f31cc6fa14378b70", app_id: None, confidence: 80.0, avail_path: "~/.avail/turing/data", log_level: "INFO", origin: External, log_format_json: false, ot_collector_endpoint: "<REDACTED>", ot_export_period: 300, ot_export_timeout: 10, otel_flush_frequency_secs: 10, disable_rpc: false, dht_parallelization_limit: 20, query_proof_rpc_parallel_tasks: 8, block_processing_delay: Some(20), block_matrix_partition: None, sync_start_block: None, sync_finality_enable: false, max_cells_per_rpc: Some(30), threshold: 5000, kad_record_ttl: 43200, publication_interval: 43200, replication_interval: 10800, replication_factor: 5, connection_idle_timeout: 30, max_negotiating_inbound_streams: 128, task_command_buffer_size: 32, per_connection_event_buffer_size: 7, dial_concurrency_factor: 8, store_pruning_interval: 180, query_timeout: 10, query_parallelism: 3, caching_max_peers: 1, disjoint_query_paths: false, max_kad_record_number: 2400000, max_kad_record_size: 8192, max_kad_provided_keys: 1024, retry_config: Fibonacci(FibonacciConfig { base: 1, max_delay: 10, retries: 6 }) }
2024-06-07T20:33:45.905255Z  INFO avail_light: Avail ss58 address: 5Fn4nfhrPcPZeqTHibgEiqeHmpQ4KTmcW8VpY3PVsKNNFoYs, public key: a44038d7ed9c51e66a12cd2fd7bbde641012efd264a6688cc8b5c3ac724e7433
2024-06-07T20:33:45.980701Z  INFO avail_light::network::p2p: Local peerID: 12D3KooWPnjJpsjBWjxSWfFZCS9jEU61zCJNXUMHKwt5E2APhF22
2024-06-07T20:33:45.980949Z  INFO avail_light: TCP listener started on port 37000
2024-06-07T20:33:45.981261Z  INFO avail_light: Bootstraping the DHT with bootstrap nodes...
2024-06-07T20:33:49.510432Z  INFO avail_light::network::rpc::client: Genesis hash: 0xd3d2f3a3495dc597434a99d7d449ebad6616db45e4e4f178f31cc6fa14378b70
2024-06-07T20:33:50.814222Z  INFO avail_light: Waiting for first finalized header...
2024-06-07T20:33:51.936194Z  INFO avail_light::network::rpc::subscriptions: Header no.: 307529

@moraesjeremias moraesjeremias requested a review from QEDK June 7, 2024 20:37
Copy link
Member

@QEDK QEDK left a comment

Choose a reason for hiding this comment

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

LGTM.

@QEDK QEDK merged commit 2bfa780 into master Jun 8, 2024
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.

2 participants