Skip to content

Commit d6825b7

Browse files
authored
Revert "RemoteNet -> ExistingNet (#2998)" (#3073)
## Motivation * The new name is not particularly better than the previous one that made sense at least in contrast with local-net. * The testnet branch and various test scripts use the old name. ## Proposal Revert commit 909b3e7 (minus one detail) ## Test Plan CI ## Release Plan - Nothing to do / These changes follow the usual release cycle.
1 parent 17c8048 commit d6825b7

File tree

5 files changed

+45
-45
lines changed

5 files changed

+45
-45
lines changed

.github/workflows/rust.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ permissions:
4040
contents: read
4141

4242
jobs:
43-
existing-net-test:
43+
remote-net-test:
4444
runs-on: ubuntu-latest-8-cores
4545
timeout-minutes: 40
4646

@@ -65,9 +65,9 @@ jobs:
6565
cargo run --bin linera -- resource-control-policy --block 0.0000001
6666
cargo run --bin linera -- resource-control-policy --block 0.000000
6767
cargo run --bin linera -- faucet --amount 1000 --port 8079 69705f85ac4c9fef6c02b4d83426aaaf05154c645ec1c61665f8e450f0468bc0 &
68-
- name: Run the existing-net tests
68+
- name: Run the remote-net tests
6969
run: |
70-
cargo test -p linera-service existing_net_grpc --features existing-net
70+
cargo test -p linera-service remote_net_grpc --features remote-net
7171
7272
execution-wasmtime-test:
7373
runs-on: ubuntu-latest

linera-service/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ kubernetes = [
5454
"dep:pathdiff",
5555
"dep:fs_extra",
5656
]
57-
existing-net = []
57+
remote-net = []
5858
metrics = ["prometheus", "linera-base/metrics", "linera-client/metrics"]
5959
storage-service = ["linera-client/storage-service", "linera-storage-service"]
6060

linera-service/src/cli_wrappers/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
/// How to run docker operations
99
pub mod docker;
1010

11-
#[cfg(all(with_testing, feature = "existing-net"))]
12-
/// How to connect to an existing/running network.
13-
pub mod existing_net;
1411
#[cfg(feature = "kubernetes")]
1512
/// How to run helmfile operations
1613
mod helmfile;
@@ -25,6 +22,9 @@ mod kubectl;
2522
pub mod local_kubernetes_net;
2623
/// How to run Linera validators locally as native processes.
2724
pub mod local_net;
25+
#[cfg(all(with_testing, feature = "remote-net"))]
26+
/// How to connect to running GCP DevNet.
27+
pub mod remote_net;
2828
#[cfg(feature = "kubernetes")]
2929
/// Util functions for the wrappers
3030
mod util;

linera-service/src/cli_wrappers/existing_net.rs renamed to linera-service/src/cli_wrappers/remote_net.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ use super::{
1515
Network, OnClientDrop,
1616
};
1717

18-
pub struct ExistingNetTestingConfig {
18+
pub struct RemoteNetTestingConfig {
1919
faucet: Faucet,
2020
}
2121

22-
impl ExistingNetTestingConfig {
23-
/// Creates a new [`ExistingNetTestingConfig`] for running tests with an existing Linera
22+
impl RemoteNetTestingConfig {
23+
/// Creates a new [`RemoteNetTestingConfig`] for running tests with an external Linera
2424
/// network.
2525
///
2626
/// The `faucet_url` is used to connect to the network and obtain its configuration,
@@ -39,14 +39,14 @@ impl ExistingNetTestingConfig {
3939
}
4040

4141
#[async_trait]
42-
impl LineraNetConfig for ExistingNetTestingConfig {
43-
type Net = ExistingNet;
42+
impl LineraNetConfig for RemoteNetTestingConfig {
43+
type Net = RemoteNet;
4444

4545
async fn instantiate(self) -> Result<(Self::Net, ClientWrapper)> {
4646
let seed = 37;
47-
let mut net = ExistingNet::new(Some(seed), &self.faucet)
47+
let mut net = RemoteNet::new(Some(seed), &self.faucet)
4848
.await
49-
.expect("Creating ExistingNet should not fail");
49+
.expect("Creating RemoteNet should not fail");
5050

5151
let client = net.make_client().await;
5252
// The tests assume we've created a genesis config with 2
@@ -78,18 +78,18 @@ impl LineraNetConfig for ExistingNetTestingConfig {
7878

7979
/// Remote net
8080
#[derive(Clone)]
81-
pub struct ExistingNet {
81+
pub struct RemoteNet {
8282
network: Network,
8383
testing_prng_seed: Option<u64>,
8484
next_client_id: usize,
8585
tmp_dir: Arc<TempDir>,
8686
}
8787

8888
#[async_trait]
89-
impl LineraNet for ExistingNet {
89+
impl LineraNet for RemoteNet {
9090
async fn ensure_is_running(&mut self) -> Result<()> {
9191
// Leaving this just returning for now.
92-
// We would have to connect to each validator in the existing net then run
92+
// We would have to connect to each validator in the remote net then run
9393
// ensure_connected_cluster_is_running
9494
Ok(())
9595
}
@@ -113,12 +113,12 @@ impl LineraNet for ExistingNet {
113113
}
114114

115115
async fn terminate(&mut self) -> Result<()> {
116-
// We're not killing the existing network :)
116+
// We're not killing the remote net :)
117117
Ok(())
118118
}
119119
}
120120

121-
impl ExistingNet {
121+
impl RemoteNet {
122122
async fn new(testing_prng_seed: Option<u64>, faucet: &Faucet) -> Result<Self> {
123123
let tmp_dir = Arc::new(tempdir()?);
124124
// Write json config to disk

0 commit comments

Comments
 (0)