just: checking for ellipses
Add custom check for ellipses "...", asking for replacement of "…". Git ranges and the CLI wildcard matches are ignored. This change includes fixes to all sites that did not pass the check.
This commit is contained in:
parent
9c37511613
commit
9ff0e8b01f
|
|
@ -219,7 +219,7 @@ COB type names and payload IDs remain unchanged for backwards compatibility.
|
||||||
The `Service` has now learned to return results when an error occurs which
|
The `Service` has now learned to return results when an error occurs which
|
||||||
will be reported back to the user.
|
will be reported back to the user.
|
||||||
- Parsing addresses involving an IPv6 host failed if they were enclosed in
|
- Parsing addresses involving an IPv6 host failed if they were enclosed in
|
||||||
square brackets, e.g. in `rad node connect z6Mk...@[::1]:8776`.
|
square brackets, e.g. in `rad node connect z6Mk…@[::1]:8776`.
|
||||||
Also, ambiguous addresses would parse, e.g. `::1:8776` would be
|
Also, ambiguous addresses would parse, e.g. `::1:8776` would be
|
||||||
indistinguishable from `[::1]:8776`. Since a port number is always required
|
indistinguishable from `[::1]:8776`. Since a port number is always required
|
||||||
along a host when providing an address, IPv6 addresses now always require
|
along a host when providing an address, IPv6 addresses now always require
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ are separated from private modules with a blank line:
|
||||||
use std::time;
|
use std::time;
|
||||||
use std::process;
|
use std::process;
|
||||||
|
|
||||||
...
|
…
|
||||||
|
|
||||||
Imports are organized in groups, from least specific to more specific:
|
Imports are organized in groups, from least specific to more specific:
|
||||||
|
|
||||||
|
|
@ -175,13 +175,13 @@ Use short 1-letter names when the variable scope is only a few lines, or the con
|
||||||
obvious, eg.
|
obvious, eg.
|
||||||
|
|
||||||
if let Some(e) = result.err() {
|
if let Some(e) = result.err() {
|
||||||
...
|
…
|
||||||
}
|
}
|
||||||
|
|
||||||
Use 1-word names for function parameters or variables that have larger scopes:
|
Use 1-word names for function parameters or variables that have larger scopes:
|
||||||
|
|
||||||
pub fn commit(repo: &Repository, sig: &Signature) -> Result<Commit, Error> {
|
pub fn commit(repo: &Repository, sig: &Signature) -> Result<Commit, Error> {
|
||||||
...
|
…
|
||||||
}
|
}
|
||||||
|
|
||||||
Use the most descriptive names for globals:
|
Use the most descriptive names for globals:
|
||||||
|
|
@ -224,7 +224,7 @@ for the reader:
|
||||||
// all of it. It can happen that inventory is not properly tracked if for eg. the
|
// all of it. It can happen that inventory is not properly tracked if for eg. the
|
||||||
// user creates a new repository while the node is stopped.
|
// user creates a new repository while the node is stopped.
|
||||||
for rid in self.storage.inventory()? {
|
for rid in self.storage.inventory()? {
|
||||||
...
|
…
|
||||||
|
|
||||||
### Referring to radicle.dev in Code
|
### Referring to radicle.dev in Code
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ $ rad auth --alias "alice"
|
||||||
|
|
||||||
Initializing your Radicle 👾 identity
|
Initializing your Radicle 👾 identity
|
||||||
|
|
||||||
✓ Creating your Ed25519 keypair...
|
✓ Creating your Ed25519 keypair…
|
||||||
✓ Your Radicle DID is did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi. This identifies your device. Run `rad self` to show it at all times.
|
✓ Your Radicle DID is did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi. This identifies your device. Run `rad self` to show it at all times.
|
||||||
✓ You're all set.
|
✓ You're all set.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ the delegates and threshold:
|
||||||
+ "did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi",
|
+ "did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi",
|
||||||
+ "did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk"
|
+ "did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk"
|
||||||
],
|
],
|
||||||
...
|
…
|
||||||
- "threshold": 1
|
- "threshold": 1
|
||||||
+ "threshold": 2
|
+ "threshold": 2
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ Your inbox is empty.
|
||||||
|
|
||||||
``` ~bob
|
``` ~bob
|
||||||
$ cd heartwood
|
$ cd heartwood
|
||||||
$ rad issue open --title "No license file" --description "..." -q
|
$ rad issue open --title "No license file" --description "…" -q
|
||||||
✓ Synced with 1 seed(s)
|
✓ Synced with 1 seed(s)
|
||||||
$ git commit -m "Change copyright" --allow-empty -q
|
$ git commit -m "Change copyright" --allow-empty -q
|
||||||
$ git push rad HEAD:bob/copy
|
$ git push rad HEAD:bob/copy
|
||||||
|
|
@ -80,7 +80,7 @@ $ rad inbox show 1
|
||||||
│ Author bob z6Mkt67…v4N1tRk │
|
│ Author bob z6Mkt67…v4N1tRk │
|
||||||
│ Status open │
|
│ Status open │
|
||||||
│ │
|
│ │
|
||||||
│ ... │
|
│ [...] │
|
||||||
╰──────────────────────────────────────────────────╯
|
╰──────────────────────────────────────────────────╯
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ And initialize this working copy as that existing repository:
|
||||||
```
|
```
|
||||||
$ rad init --setup-signing --existing rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
|
$ rad init --setup-signing --existing rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
|
||||||
|
|
||||||
Configuring Radicle signing key SHA256:UIedaL6Cxm6OUErh9GQUzzglSk7VpQlVTI1TAFB/HWA...
|
Configuring Radicle signing key SHA256:UIedaL6Cxm6OUErh9GQUzzglSk7VpQlVTI1TAFB/HWA…
|
||||||
|
|
||||||
✓ Signing configured in [..]/heartwood/config
|
✓ Signing configured in [..]/heartwood/config
|
||||||
! Not writing .gitsigners file.
|
! Not writing .gitsigners file.
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ And initialize this working copy as that existing repository:
|
||||||
```
|
```
|
||||||
$ rad init --setup-signing --existing rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
|
$ rad init --setup-signing --existing rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
|
||||||
|
|
||||||
Configuring Radicle signing key SHA256:UIedaL6Cxm6OUErh9GQUzzglSk7VpQlVTI1TAFB/HWA...
|
Configuring Radicle signing key SHA256:UIedaL6Cxm6OUErh9GQUzzglSk7VpQlVTI1TAFB/HWA…
|
||||||
|
|
||||||
✓ Signing configured in [..]/heartwood/.git/config
|
✓ Signing configured in [..]/heartwood/.git/config
|
||||||
✓ Created .gitsigners file
|
✓ Created .gitsigners file
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ Running the command again gives us an error:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ rad node stop
|
$ rad node stop
|
||||||
✗ Stopping node... error: node is not running
|
✗ Stopping node… error: node is not running
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that if we unseed a repository, it is no longer part of our inventory:
|
Note that if we unseed a repository, it is no longer part of our inventory:
|
||||||
|
|
@ -126,7 +126,7 @@ $ rad sync status
|
||||||
```
|
```
|
||||||
``` (fail)
|
``` (fail)
|
||||||
$ rad node connect z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk@radicle.example:58776
|
$ rad node connect z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk@radicle.example:58776
|
||||||
✗ Connecting to z6Mkt67…v4N1tRk@radicle.example:58776... <canceled>
|
✗ Connecting to z6Mkt67…v4N1tRk@radicle.example:58776… <canceled>
|
||||||
✗ Error: failed to open node control socket "[..]/.radicle/node/control.sock" (entity not found)
|
✗ Error: failed to open node control socket "[..]/.radicle/node/control.sock" (entity not found)
|
||||||
✗ Hint: to start your node, run `rad node start`.
|
✗ Hint: to start your node, run `rad node start`.
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ ensure that they are looking at the latest changes:
|
||||||
|
|
||||||
``` ~bob (fail)
|
``` ~bob (fail)
|
||||||
$ rad patch checkout aa45913 --name alice-init
|
$ rad patch checkout aa45913 --name alice-init
|
||||||
✗ Performing checkout... <canceled>
|
✗ Performing checkout… <canceled>
|
||||||
✗ Error: branch 'alice-init' already exists (use `--force` to overwrite)
|
✗ Error: branch 'alice-init' already exists (use `--force` to overwrite)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ pub fn init(args: Args) -> anyhow::Result<()> {
|
||||||
term::passphrase_confirm("Enter a passphrase:", env::RAD_PASSPHRASE)?
|
term::passphrase_confirm("Enter a passphrase:", env::RAD_PASSPHRASE)?
|
||||||
};
|
};
|
||||||
let passphrase = passphrase.filter(|passphrase| !passphrase.trim().is_empty());
|
let passphrase = passphrase.filter(|passphrase| !passphrase.trim().is_empty());
|
||||||
let spinner = term::spinner("Creating your Ed25519 keypair...");
|
let spinner = term::spinner("Creating your Ed25519 keypair…");
|
||||||
let profile = Profile::init(home, alias, passphrase.clone(), env::seed())?;
|
let profile = Profile::init(home, alias, passphrase.clone(), env::seed())?;
|
||||||
let mut agent = true;
|
let mut agent = true;
|
||||||
spinner.finish();
|
spinner.finish();
|
||||||
|
|
@ -63,7 +63,7 @@ pub fn init(args: Args) -> anyhow::Result<()> {
|
||||||
if let Some(passphrase) = passphrase {
|
if let Some(passphrase) = passphrase {
|
||||||
match ssh::agent::Agent::connect() {
|
match ssh::agent::Agent::connect() {
|
||||||
Ok(mut agent) => {
|
Ok(mut agent) => {
|
||||||
let mut spinner = term::spinner("Adding your Radicle key to ssh-agent...");
|
let mut spinner = term::spinner("Adding your Radicle key to ssh-agent…");
|
||||||
if register(&mut agent, &profile, passphrase).is_ok() {
|
if register(&mut agent, &profile, passphrase).is_ok() {
|
||||||
spinner.finish();
|
spinner.finish();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ fn execute(args: Args, profile: &Profile) -> anyhow::Result<PathBuf> {
|
||||||
anyhow::bail!("the local path {:?} already exists", path.as_path());
|
anyhow::bail!("the local path {:?} already exists", path.as_path());
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut spinner = term::spinner("Performing checkout...");
|
let mut spinner = term::spinner("Performing checkout…");
|
||||||
let repo = match radicle::rad::checkout(args.repo, &remote, path.clone(), &storage, false) {
|
let repo = match radicle::rad::checkout(args.repo, &remote, path.clone(), &storage, false) {
|
||||||
Ok(repo) => repo,
|
Ok(repo) => repo,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ pub fn init(repo: git::Repository, args: Args, profile: &profile::Profile) -> an
|
||||||
|
|
||||||
let signer = term::signer(profile)?;
|
let signer = term::signer(profile)?;
|
||||||
let mut node = radicle::Node::new(profile.socket_from_env());
|
let mut node = radicle::Node::new(profile.socket_from_env());
|
||||||
let mut spinner = term::spinner("Initializing...");
|
let mut spinner = term::spinner("Initializing…");
|
||||||
let mut push_cmd = String::from("git push");
|
let mut push_cmd = String::from("git push");
|
||||||
|
|
||||||
match radicle::rad::init(
|
match radicle::rad::init(
|
||||||
|
|
@ -497,7 +497,7 @@ pub fn setup_signing(
|
||||||
let key = ssh::fmt::fingerprint(node_id);
|
let key = ssh::fmt::fingerprint(node_id);
|
||||||
let yes = if !git::is_signing_configured(path)? {
|
let yes = if !git::is_signing_configured(path)? {
|
||||||
term::headline(format!(
|
term::headline(format!(
|
||||||
"Configuring Radicle signing key {}...",
|
"Configuring Radicle signing key {}…",
|
||||||
term::format::tertiary(key)
|
term::format::tertiary(key)
|
||||||
));
|
));
|
||||||
true
|
true
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ pub fn start(
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn stop(node: Node, profile: &Profile) {
|
pub fn stop(node: Node, profile: &Profile) {
|
||||||
let mut spinner = term::spinner("Stopping node...");
|
let mut spinner = term::spinner("Stopping node…");
|
||||||
if node.shutdown().is_err() {
|
if node.shutdown().is_err() {
|
||||||
spinner.error("node is not running");
|
spinner.error("node is not running");
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -198,7 +198,7 @@ pub fn connect(
|
||||||
timeout: time::Duration,
|
timeout: time::Duration,
|
||||||
) -> anyhow::Result<()> {
|
) -> anyhow::Result<()> {
|
||||||
let spinner = term::spinner(format!(
|
let spinner = term::spinner(format!(
|
||||||
"Connecting to {}@{addr}...",
|
"Connecting to {}@{addr}…",
|
||||||
term::format::node_id_human_compact(&nid)
|
term::format::node_id_human_compact(&nid)
|
||||||
));
|
));
|
||||||
match node.connect(
|
match node.connect(
|
||||||
|
|
@ -222,11 +222,11 @@ pub fn connect_many(
|
||||||
addrs: Vec<Address>,
|
addrs: Vec<Address>,
|
||||||
timeout: time::Duration,
|
timeout: time::Duration,
|
||||||
) -> anyhow::Result<()> {
|
) -> anyhow::Result<()> {
|
||||||
let mut spinner = term::spinner("Connecting...");
|
let mut spinner = term::spinner("Connecting…");
|
||||||
let mut errors = HashMap::new();
|
let mut errors = HashMap::new();
|
||||||
for addr in addrs {
|
for addr in addrs {
|
||||||
spinner.message(format!(
|
spinner.message(format!(
|
||||||
"Connecting to {}@{addr}...",
|
"Connecting to {}@{addr}…",
|
||||||
term::format::node_id_human_compact(&nid)
|
term::format::node_id_human_compact(&nid)
|
||||||
));
|
));
|
||||||
match node.connect(
|
match node.connect(
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ pub fn run(
|
||||||
None => patch.latest(),
|
None => patch.latest(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut spinner = term::spinner("Performing checkout...");
|
let mut spinner = term::spinner("Performing checkout…");
|
||||||
let patch_branch = opts.branch(patch_id)?;
|
let patch_branch = opts.branch(patch_id)?;
|
||||||
|
|
||||||
let commit = match working.find_branch(patch_branch.as_str(), git::raw::BranchType::Local) {
|
let commit = match working.find_branch(patch_branch.as_str(), git::raw::BranchType::Local) {
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ pub fn signer(profile: &Profile) -> anyhow::Result<BoxedDevice> {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let spinner = spinner("Unsealing key...");
|
let spinner = spinner("Unsealing key…");
|
||||||
let signer = MemorySigner::load(&profile.keystore, Some(passphrase))?;
|
let signer = MemorySigner::load(&profile.keystore, Some(passphrase))?;
|
||||||
|
|
||||||
spinner.finish();
|
spinner.finish();
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ use radicle_signals as signals;
|
||||||
const HELP_MSG: &str = r#"
|
const HELP_MSG: &str = r#"
|
||||||
Usage
|
Usage
|
||||||
|
|
||||||
radicle-node [<option>...]
|
radicle-node [<option>…]
|
||||||
|
|
||||||
If you're running a public seed node, make sure to use `--listen` to bind a listening socket to
|
If you're running a public seed node, make sure to use `--listen` to bind a listening socket to
|
||||||
eg. `0.0.0.0:8776`, and add your external addresses in your configuration.
|
eg. `0.0.0.0:8776`, and add your external addresses in your configuration.
|
||||||
|
|
|
||||||
|
|
@ -310,7 +310,7 @@ impl Reactor {
|
||||||
let poll = Poll::new()?;
|
let poll = Poll::new()?;
|
||||||
let controller = Controller::new(sender, Arc::new(Waker::new(poll.registry(), WAKER)?));
|
let controller = Controller::new(sender, Arc::new(Waker::new(poll.registry(), WAKER)?));
|
||||||
|
|
||||||
log::debug!(target: "reactor-controller", "Initializing reactor thread...");
|
log::debug!(target: "reactor-controller", "Initializing reactor thread…");
|
||||||
let thread = builder.spawn(move || {
|
let thread = builder.spawn(move || {
|
||||||
let runtime = Runtime {
|
let runtime = Runtime {
|
||||||
service,
|
service,
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ impl Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn shutdown(self) -> Result<(), Self> {
|
pub fn shutdown(self) -> Result<(), Self> {
|
||||||
log::info!(target: "reactor::controller", "Initiating reactor shutdown...");
|
log::info!(target: "reactor::controller", "Initiating reactor shutdown…");
|
||||||
let res1 = self.sender.send(ControlMessage::Shutdown);
|
let res1 = self.sender.send(ControlMessage::Shutdown);
|
||||||
let res2 = self.wake();
|
let res2 = self.wake();
|
||||||
res1.or(res2).map_err(|_| self)
|
res1.or(res2).map_err(|_| self)
|
||||||
|
|
|
||||||
|
|
@ -1224,7 +1224,7 @@ fn test_persistent_peer_reconnect_attempt() {
|
||||||
assert!(ips.contains(&bob.id()));
|
assert!(ips.contains(&bob.id()));
|
||||||
assert!(ips.contains(&eve.id()));
|
assert!(ips.contains(&eve.id()));
|
||||||
|
|
||||||
// ... Negotiated ...
|
// … Negotiated …
|
||||||
//
|
//
|
||||||
// Now let's disconnect a peer.
|
// Now let's disconnect a peer.
|
||||||
|
|
||||||
|
|
@ -1519,7 +1519,7 @@ fn test_queued_fetch_max_capacity() {
|
||||||
|
|
||||||
// Now the 1st fetch is done, the 2nd fetch is dequeued.
|
// Now the 1st fetch is done, the 2nd fetch is dequeued.
|
||||||
assert_eq!(alice.fetches().next(), Some((rid2, bob.id)));
|
assert_eq!(alice.fetches().next(), Some((rid2, bob.id)));
|
||||||
// ... but not the third.
|
// … but not the third.
|
||||||
assert_matches!(alice.fetches().next(), None);
|
assert_matches!(alice.fetches().next(), None);
|
||||||
|
|
||||||
// Finish the 2nd fetch.
|
// Finish the 2nd fetch.
|
||||||
|
|
@ -1651,7 +1651,7 @@ fn test_queued_fetch_from_command_same_rid() {
|
||||||
assert_eq!(rid, rid1);
|
assert_eq!(rid, rid1);
|
||||||
assert!(peers.remove(&nid));
|
assert!(peers.remove(&nid));
|
||||||
|
|
||||||
// ... but not the third.
|
// … but not the third.
|
||||||
assert_matches!(alice.fetches().next(), None);
|
assert_matches!(alice.fetches().next(), None);
|
||||||
|
|
||||||
// Finish the 2nd fetch.
|
// Finish the 2nd fetch.
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ impl<T, const N: usize> BoundedVec<T, N> {
|
||||||
/// vec.push(3).expect("within limit");
|
/// vec.push(3).expect("within limit");
|
||||||
/// assert_eq!(vec, vec![1, 2, 3].try_into().unwrap());
|
/// assert_eq!(vec, vec![1, 2, 3].try_into().unwrap());
|
||||||
///
|
///
|
||||||
/// // ...but this will exceed its limit, returning an error.
|
/// // …but this will exceed its limit, returning an error.
|
||||||
/// vec.push(4).expect_err("limit exceeded");
|
/// vec.push(4).expect_err("limit exceeded");
|
||||||
/// assert_eq!(vec.len(), 3);
|
/// assert_eq!(vec.len(), 3);
|
||||||
/// ```
|
/// ```
|
||||||
|
|
|
||||||
|
|
@ -749,7 +749,7 @@ where
|
||||||
);
|
);
|
||||||
|
|
||||||
if now - self.last_idle >= IDLE_INTERVAL {
|
if now - self.last_idle >= IDLE_INTERVAL {
|
||||||
trace!(target: "service", "Running 'idle' task...");
|
trace!(target: "service", "Running 'idle' task…");
|
||||||
|
|
||||||
self.keep_alive(&now);
|
self.keep_alive(&now);
|
||||||
self.disconnect_unresponsive_peers(&now);
|
self.disconnect_unresponsive_peers(&now);
|
||||||
|
|
@ -760,7 +760,7 @@ where
|
||||||
self.last_idle = now;
|
self.last_idle = now;
|
||||||
}
|
}
|
||||||
if now - self.last_gossip >= GOSSIP_INTERVAL {
|
if now - self.last_gossip >= GOSSIP_INTERVAL {
|
||||||
trace!(target: "service", "Running 'gossip' task...");
|
trace!(target: "service", "Running 'gossip' task…");
|
||||||
|
|
||||||
if let Err(e) = self.relay_announcements() {
|
if let Err(e) = self.relay_announcements() {
|
||||||
warn!(target: "service", "Failed to relay stored announcements: {e}");
|
warn!(target: "service", "Failed to relay stored announcements: {e}");
|
||||||
|
|
@ -769,7 +769,7 @@ where
|
||||||
self.last_gossip = now;
|
self.last_gossip = now;
|
||||||
}
|
}
|
||||||
if now - self.last_sync >= SYNC_INTERVAL {
|
if now - self.last_sync >= SYNC_INTERVAL {
|
||||||
trace!(target: "service", "Running 'sync' task...");
|
trace!(target: "service", "Running 'sync' task…");
|
||||||
|
|
||||||
if let Err(e) = self.fetch_missing_repositories() {
|
if let Err(e) = self.fetch_missing_repositories() {
|
||||||
warn!(target: "service", "Failed to fetch missing inventory: {e}");
|
warn!(target: "service", "Failed to fetch missing inventory: {e}");
|
||||||
|
|
@ -778,14 +778,14 @@ where
|
||||||
self.last_sync = now;
|
self.last_sync = now;
|
||||||
}
|
}
|
||||||
if now - self.last_announce >= ANNOUNCE_INTERVAL {
|
if now - self.last_announce >= ANNOUNCE_INTERVAL {
|
||||||
trace!(target: "service", "Running 'announce' task...");
|
trace!(target: "service", "Running 'announce' task…");
|
||||||
|
|
||||||
self.announce_inventory();
|
self.announce_inventory();
|
||||||
self.outbox.wakeup(ANNOUNCE_INTERVAL);
|
self.outbox.wakeup(ANNOUNCE_INTERVAL);
|
||||||
self.last_announce = now;
|
self.last_announce = now;
|
||||||
}
|
}
|
||||||
if now - self.last_prune >= PRUNE_INTERVAL {
|
if now - self.last_prune >= PRUNE_INTERVAL {
|
||||||
trace!(target: "service", "Running 'prune' task...");
|
trace!(target: "service", "Running 'prune' task…");
|
||||||
|
|
||||||
if let Err(err) = self.prune_routing_entries(&now) {
|
if let Err(err) = self.prune_routing_entries(&now) {
|
||||||
warn!(target: "service", "Failed to prune routing entries: {err}");
|
warn!(target: "service", "Failed to prune routing entries: {err}");
|
||||||
|
|
@ -2631,7 +2631,7 @@ where
|
||||||
|
|
||||||
for (nid, addr, attempts) in reconnect {
|
for (nid, addr, attempts) in reconnect {
|
||||||
if self.reconnect(nid, addr) {
|
if self.reconnect(nid, addr) {
|
||||||
debug!(target: "service", "Reconnecting to {nid} (attempts={attempts})...");
|
debug!(target: "service", "Reconnecting to {nid} (attempts={attempts})…");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ impl From<StreamType> for u8 {
|
||||||
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||||
/// | Stream ID |TTT|I| Stream ID with Stream [T]ype and [I]nitiator bits
|
/// | Stream ID |TTT|I| Stream ID with Stream [T]ype and [I]nitiator bits
|
||||||
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||||
/// | Data ...| Data (variable size)
|
/// | Data …| Data (variable size)
|
||||||
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||||
/// ```
|
/// ```
|
||||||
#[derive(Debug, PartialEq, Eq)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,7 @@ pub fn indented(msg: impl fmt::Display) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn subcommand(msg: impl fmt::Display) {
|
pub fn subcommand(msg: impl fmt::Display) {
|
||||||
println(style(format!("Running `{msg}`...")).dim());
|
println(style(format!("Running `{msg}`…")).dim());
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn warning(warning: impl fmt::Display) {
|
pub fn warning(warning: impl fmt::Display) {
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@ impl Formatter for CanonicalFormatter {
|
||||||
|
|
||||||
// This is for serde_json's `raw_value` feature, which provides a RawValue type
|
// This is for serde_json's `raw_value` feature, which provides a RawValue type
|
||||||
// that is passed through as-is. That's not good enough for canonical JSON,
|
// that is passed through as-is. That's not good enough for canonical JSON,
|
||||||
// so we parse it and immediately write it back out... as canonical JSON.
|
// so we parse it and immediately write it back out… as canonical JSON.
|
||||||
fn write_raw_fragment<W: Write + ?Sized>(
|
fn write_raw_fragment<W: Write + ?Sized>(
|
||||||
&mut self,
|
&mut self,
|
||||||
writer: &mut W,
|
writer: &mut W,
|
||||||
|
|
|
||||||
|
|
@ -1046,7 +1046,7 @@ impl Doc {
|
||||||
&crate::cob::identity::TYPENAME,
|
&crate::cob::identity::TYPENAME,
|
||||||
&cob.id,
|
&cob.id,
|
||||||
);
|
);
|
||||||
// Set `.../refs/rad/id` -> `.../refs/cobs/xyz.radicle.id/<id>`
|
// Set `…/refs/rad/id` -> `…/refs/cobs/xyz.radicle.id/<id>`
|
||||||
repo.backend.reference_symbolic(
|
repo.backend.reference_symbolic(
|
||||||
id_ref.as_str(),
|
id_ref.as_str(),
|
||||||
cob_ref.as_str(),
|
cob_ref.as_str(),
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
//! $RAD_HOME/ # Radicle home
|
//! $RAD_HOME/ # Radicle home
|
||||||
//! storage/ # Storage root
|
//! storage/ # Storage root
|
||||||
//! zEQNunJUqkNahQ8VvQYuWZZV7EJB/ # Project git repository
|
//! zEQNunJUqkNahQ8VvQYuWZZV7EJB/ # Project git repository
|
||||||
//! ... # More projects...
|
//! … # More projects…
|
||||||
//! keys/
|
//! keys/
|
||||||
//! radicle # Secret key (PKCS 8)
|
//! radicle # Secret key (PKCS 8)
|
||||||
//! radicle.pub # Public key (PKCS 8)
|
//! radicle.pub # Public key (PKCS 8)
|
||||||
|
|
|
||||||
27
justfile
27
justfile
|
|
@ -19,7 +19,7 @@ post-checkout:
|
||||||
# Run commit-msg checks
|
# Run commit-msg checks
|
||||||
[group('hooks')]
|
[group('hooks')]
|
||||||
commit-msg file: (verify-tool "typos" "typos-cli")
|
commit-msg file: (verify-tool "typos" "typos-cli")
|
||||||
@echo "{{CHECK}}Checking commit message for typos...{{NORMAL}}"
|
@echo "{{CHECK}}Checking commit message for typos…{{NORMAL}}"
|
||||||
@NORMAL="{{NORMAL}}" WARN="{{WARN}}" scripts/just/commit-msg.sh "{{file}}"
|
@NORMAL="{{NORMAL}}" WARN="{{WARN}}" scripts/just/commit-msg.sh "{{file}}"
|
||||||
|
|
||||||
# Run pre-commit checks
|
# Run pre-commit checks
|
||||||
|
|
@ -35,7 +35,7 @@ pre-commit: check-conflict-markers format-rust check-rust check-docs check-typos
|
||||||
[group('format')]
|
[group('format')]
|
||||||
[parallel]
|
[parallel]
|
||||||
format-rust: (verify-tool "cargo")
|
format-rust: (verify-tool "cargo")
|
||||||
@echo "{{CHECK}}Cargo fmt...{{NORMAL}}"
|
@echo "{{CHECK}}Cargo fmt…{{NORMAL}}"
|
||||||
@{{cargo_cmd}} fmt --all --check
|
@{{cargo_cmd}} fmt --all --check
|
||||||
|
|
||||||
# Run cargo check
|
# Run cargo check
|
||||||
|
|
@ -44,7 +44,7 @@ format-rust: (verify-tool "cargo")
|
||||||
[group('check')]
|
[group('check')]
|
||||||
[parallel]
|
[parallel]
|
||||||
check-rust:
|
check-rust:
|
||||||
@echo "{{CHECK}}Cargo check...{{NORMAL}}"
|
@echo "{{CHECK}}Cargo check…{{NORMAL}}"
|
||||||
@{{cargo_cmd}} check --workspace --all-targets --all-features
|
@{{cargo_cmd}} check --workspace --all-targets --all-features
|
||||||
|
|
||||||
# Check documentation for warnings
|
# Check documentation for warnings
|
||||||
|
|
@ -53,7 +53,7 @@ check-rust:
|
||||||
[group('check')]
|
[group('check')]
|
||||||
[parallel]
|
[parallel]
|
||||||
check-docs:
|
check-docs:
|
||||||
@echo "{{CHECK}}Checking docs for warnings...{{NORMAL}}"
|
@echo "{{CHECK}}Checking docs for warnings…{{NORMAL}}"
|
||||||
@RUSTDOCFLAGS="--deny warnings" {{cargo_cmd}} doc --workspace --all-features --no-deps
|
@RUSTDOCFLAGS="--deny warnings" {{cargo_cmd}} doc --workspace --all-features --no-deps
|
||||||
|
|
||||||
# Check for typos
|
# Check for typos
|
||||||
|
|
@ -61,17 +61,22 @@ check-docs:
|
||||||
[group('pre-push')]
|
[group('pre-push')]
|
||||||
[group('check')]
|
[group('check')]
|
||||||
[parallel]
|
[parallel]
|
||||||
check-typos: (verify-tool "typos" "typos-cli")
|
check-typos: (verify-tool "typos" "typos-cli") check-ellipses
|
||||||
@echo "{{CHECK}}Checking for spelling typos...{{NORMAL}}"
|
@echo "{{CHECK}}Checking for spelling typos…{{NORMAL}}"
|
||||||
@typos
|
@typos
|
||||||
|
|
||||||
|
[group('check')]
|
||||||
|
check-ellipses:
|
||||||
|
@echo "{{CHECK}}Checking for ellipses…{{NORMAL}}"
|
||||||
|
scripts/just/check-ellipses.sh
|
||||||
|
|
||||||
# Run codespell
|
# Run codespell
|
||||||
[group('pre-commit')]
|
[group('pre-commit')]
|
||||||
[group('pre-push')]
|
[group('pre-push')]
|
||||||
[group('check')]
|
[group('check')]
|
||||||
[parallel]
|
[parallel]
|
||||||
check-spelling: (verify-tool "codespell")
|
check-spelling: (verify-tool "codespell")
|
||||||
@echo "{{CHECK}}Checking for code typos...{{NORMAL}}"
|
@echo "{{CHECK}}Checking for code typos…{{NORMAL}}"
|
||||||
@git ls-files -z | xargs -0 codespell --write-changes --check-filenames
|
@git ls-files -z | xargs -0 codespell --write-changes --check-filenames
|
||||||
|
|
||||||
# just runs with `/bin/sh` which has no doublestar glob
|
# just runs with `/bin/sh` which has no doublestar glob
|
||||||
|
|
@ -84,7 +89,7 @@ check-spelling: (verify-tool "codespell")
|
||||||
[group('check')]
|
[group('check')]
|
||||||
[parallel]
|
[parallel]
|
||||||
check-scripts: (verify-tool "shellcheck")
|
check-scripts: (verify-tool "shellcheck")
|
||||||
@echo "{{CHECK}}Checking shell scripts...{{NORMAL}}"
|
@echo "{{CHECK}}Checking shell scripts…{{NORMAL}}"
|
||||||
@find . -type f -name "*.sh" -exec shellcheck {} +
|
@find . -type f -name "*.sh" -exec shellcheck {} +
|
||||||
|
|
||||||
# Run checks for forbidden keywords
|
# Run checks for forbidden keywords
|
||||||
|
|
@ -101,7 +106,7 @@ check-keywords: (verify-tool "rg" "ripgrep")
|
||||||
[group('check')]
|
[group('check')]
|
||||||
[parallel]
|
[parallel]
|
||||||
check-conflict-markers: (verify-tool "rg" "ripgrep")
|
check-conflict-markers: (verify-tool "rg" "ripgrep")
|
||||||
@echo "{{CHECK}}Checking for conflict markers...{{NORMAL}}"
|
@echo "{{CHECK}}Checking for conflict markers…{{NORMAL}}"
|
||||||
@! rg -n '^(<{7}|\|{7}|={7}|>{7}|%{7}|\+{7}|-{7})( |$)'
|
@! rg -n '^(<{7}|\|{7}|={7}|>{7}|%{7}|\+{7}|-{7})( |$)'
|
||||||
|
|
||||||
# Format Nix files
|
# Format Nix files
|
||||||
|
|
@ -122,7 +127,7 @@ pre-push: check-conflict-markers format-rust check-rust check-keywords check-doc
|
||||||
# Run Clippy lints
|
# Run Clippy lints
|
||||||
[group('pre-push')]
|
[group('pre-push')]
|
||||||
lint-rust: (verify-tool "cargo")
|
lint-rust: (verify-tool "cargo")
|
||||||
@echo "{{CHECK}}Cargo clippy...{{NORMAL}}"
|
@echo "{{CHECK}}Cargo clippy…{{NORMAL}}"
|
||||||
@{{cargo_cmd}} clippy --workspace --all-targets --all-features -- --deny warnings
|
@{{cargo_cmd}} clippy --workspace --all-targets --all-features -- --deny warnings
|
||||||
|
|
||||||
# Check if required tools are in PATH.
|
# Check if required tools are in PATH.
|
||||||
|
|
@ -148,5 +153,5 @@ check-hooks:
|
||||||
[group('test')]
|
[group('test')]
|
||||||
[group('pre-push')]
|
[group('pre-push')]
|
||||||
test-rust:
|
test-rust:
|
||||||
@echo "{{CHECK}}Cargo test...{{NORMAL}}"
|
@echo "{{CHECK}}Cargo test…{{NORMAL}}"
|
||||||
@{{cargo_cmd}} nextest run --workspace --all-features --no-fail-fast
|
@{{cargo_cmd}} nextest run --workspace --all-features --no-fail-fast
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ install() {
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
if [ $# -lt 2 ]; then
|
if [ $# -lt 2 ]; then
|
||||||
echo "usage: $0 <output-dir> <input-file>..."
|
echo "usage: $0 <output-dir> <input-file>…"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
#! /usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Replace '...' with '…' (U+2026) in markdown, just and Rust files, but ignore:
|
||||||
|
# - Git ranges with hex hashes, e.g. 20aa5dd...f2de534
|
||||||
|
# - Git ranges with ref paths, e.g. feature/1...rad/patches/f2de534
|
||||||
|
# - Standalone '...' lines used as output wildcards in CLI example tests
|
||||||
|
# - Wildcards for CLI example tests, i.e. [...]
|
||||||
|
patterns=('*.md' '*.rs' '*justfile')
|
||||||
|
|
||||||
|
# Get all regular files (exclude symlinks, directories, etc.)
|
||||||
|
files=()
|
||||||
|
while IFS= read -r -d '' file; do
|
||||||
|
if [ -f "$file" ] && [ ! -L "$file" ]; then
|
||||||
|
files+=("$file")
|
||||||
|
fi
|
||||||
|
done < <(git ls-files -z "${patterns[@]}")
|
||||||
|
|
||||||
|
if [ ${#files[@]} -eq 0 ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Checksum files before sed so we detect only changes it makes.
|
||||||
|
before=$(printf '%s\0' "${files[@]}" | xargs -0 md5sum)
|
||||||
|
|
||||||
|
standalone_wildcard='^[[:space:]]*\.\.\.[[:space:]]*$'
|
||||||
|
git_hex_range='[0-9a-f]{4,}\.\.\.[0-9a-f]{4,}'
|
||||||
|
git_ref_range='[^[:space:]]*\/[^[:space:]]*\.\.\.[^[:space:]]*\/[^[:space:]]*'
|
||||||
|
bracket_wildcard='\[[[:space:]]*\.\.\.[[:space:]]*\]'
|
||||||
|
|
||||||
|
# Detect GNU vs BSD sed to apply the correct in-place flag
|
||||||
|
if sed --version >/dev/null 2>&1; then
|
||||||
|
sed_cmd=(sed -i -E)
|
||||||
|
else
|
||||||
|
sed_cmd=(sed -i '' -E)
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf '%s\0' "${files[@]}" | xargs -0 "${sed_cmd[@]}" \
|
||||||
|
-e "/${standalone_wildcard}/b" \
|
||||||
|
-e "/${git_hex_range}/b" \
|
||||||
|
-e "/${git_ref_range}/b" \
|
||||||
|
-e "/${bracket_wildcard}/b" \
|
||||||
|
-e 's/\.\.\./…/g'
|
||||||
|
|
||||||
|
after=$(printf '%s\0' "${files[@]}" | xargs -0 md5sum)
|
||||||
|
|
||||||
|
changed=$(diff <(echo "$before") <(echo "$after") | grep '^>' | sed 's/^> [a-f0-9]* //' || true)
|
||||||
|
|
||||||
|
if [ -n "$changed" ]; then
|
||||||
|
echo "error: Replaced '...' with '…' (U+2026) in the following files:"
|
||||||
|
echo "$changed"
|
||||||
|
echo "Please commit these changes."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
echo "${CHECK}Checking for forbidden words in staged files...${NORMAL}"
|
echo "${CHECK}Checking for forbidden words in staged files…${NORMAL}"
|
||||||
|
|
||||||
# Get staged Rust files
|
# Get staged Rust files
|
||||||
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep '\.rs$' || true)
|
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep '\.rs$' || true)
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ Here is an example of how the topology is structured:
|
||||||
```cue
|
```cue
|
||||||
package main
|
package main
|
||||||
|
|
||||||
// ...
|
// …
|
||||||
|
|
||||||
// Declare instances to deploy
|
// Declare instances to deploy
|
||||||
values: {
|
values: {
|
||||||
|
|
@ -181,7 +181,7 @@ See the [Goals] section for more info.
|
||||||
- [X] Flexibility to define network topologies.
|
- [X] Flexibility to define network topologies.
|
||||||
- [ ] Easy to construct and run new simulations.
|
- [ ] Easy to construct and run new simulations.
|
||||||
- [ ] Reproducible starting state.
|
- [ ] Reproducible starting state.
|
||||||
- [ ] Adverse network emulation e.g. dropped packets, network delays...
|
- [ ] Adverse network emulation e.g. dropped packets, network delays…
|
||||||
|
|
||||||
## Plan
|
## Plan
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ create-cluster: (verify-tool "talosctl") ensure-ovmf
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
if [ ! -d "{{clusters_dir}}/{{cluster_name}}" ]; then
|
if [ ! -d "{{clusters_dir}}/{{cluster_name}}" ]; then
|
||||||
echo "{{CHECK}}Creating Talos cluster '{{cluster_name}}' using {{provisioner}}...{{NORMAL}}"
|
echo "{{CHECK}}Creating Talos cluster '{{cluster_name}}' using {{provisioner}}…{{NORMAL}}"
|
||||||
mkdir -p "{{clusters_dir}}"
|
mkdir -p "{{clusters_dir}}"
|
||||||
if [ "{{provisioner}}" = "qemu" ]; then
|
if [ "{{provisioner}}" = "qemu" ]; then
|
||||||
sudo --preserve-env=HOME,PATH talosctl cluster create --name={{cluster_name}} {{provisioner}} --config-patch-controlplanes '{"cluster": {"allowSchedulingOnControlPlanes": true}}'
|
sudo --preserve-env=HOME,PATH talosctl cluster create --name={{cluster_name}} {{provisioner}} --config-patch-controlplanes '{"cluster": {"allowSchedulingOnControlPlanes": true}}'
|
||||||
|
|
@ -48,7 +48,7 @@ create-cluster: (verify-tool "talosctl") ensure-ovmf
|
||||||
# Configure the Kubernetes cluster
|
# Configure the Kubernetes cluster
|
||||||
[private]
|
[private]
|
||||||
configure-cluster: (verify-tool "kubectl") create-cluster
|
configure-cluster: (verify-tool "kubectl") create-cluster
|
||||||
@echo "{{CHECK}}Configuring cluster...{{NORMAL}}"
|
@echo "{{CHECK}}Configuring cluster…{{NORMAL}}"
|
||||||
# Add local-path storage system
|
# Add local-path storage system
|
||||||
@kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
|
@kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
|
||||||
# Relax security on namespaces
|
# Relax security on namespaces
|
||||||
|
|
@ -60,7 +60,7 @@ configure-cluster: (verify-tool "kubectl") create-cluster
|
||||||
# Start the simulation network only
|
# Start the simulation network only
|
||||||
[group('start')]
|
[group('start')]
|
||||||
start-network: (verify-tool "timoni") vendor-timoni-dependencies
|
start-network: (verify-tool "timoni") vendor-timoni-dependencies
|
||||||
@echo "{{CHECK}}Starting simulation network...{{NORMAL}}"
|
@echo "{{CHECK}}Starting simulation network…{{NORMAL}}"
|
||||||
@timoni apply radicle-network {{radicle_node_module}} -f instances/network.cue
|
@timoni apply radicle-network {{radicle_node_module}} -f instances/network.cue
|
||||||
@just show-cluster
|
@just show-cluster
|
||||||
|
|
||||||
|
|
@ -71,11 +71,11 @@ vendor-timoni-dependencies: (verify-tool "timoni")
|
||||||
set -e
|
set -e
|
||||||
cd {{radicle_node_module}}
|
cd {{radicle_node_module}}
|
||||||
if [ ! -d "{{module_pkg}}" ]; then
|
if [ ! -d "{{module_pkg}}" ]; then
|
||||||
echo "{{CHECK}}Fetching Timoni pkg files...{{NORMAL}}"
|
echo "{{CHECK}}Fetching Timoni pkg files…{{NORMAL}}"
|
||||||
timoni artifact pull oci://ghcr.io/stefanprodan/timoni/schemas -o cue.mod/pkg
|
timoni artifact pull oci://ghcr.io/stefanprodan/timoni/schemas -o cue.mod/pkg
|
||||||
fi
|
fi
|
||||||
if [ ! -d "{{module_gen}}" ]; then
|
if [ ! -d "{{module_gen}}" ]; then
|
||||||
echo "{{CHECK}}Fetching Timoni k8s gen files...{{NORMAL}}"
|
echo "{{CHECK}}Fetching Timoni k8s gen files…{{NORMAL}}"
|
||||||
timoni mod vendor k8s
|
timoni mod vendor k8s
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -95,13 +95,13 @@ delete: delete-pods delete-pvc
|
||||||
# Delete pods only
|
# Delete pods only
|
||||||
[group('delete')]
|
[group('delete')]
|
||||||
delete-pods: (verify-tool "kubectl")
|
delete-pods: (verify-tool "kubectl")
|
||||||
@echo "{{CHECK}}Deleting pods...{{NORMAL}}"
|
@echo "{{CHECK}}Deleting pods…{{NORMAL}}"
|
||||||
@kubectl delete pods -l app=radicle-node --wait=false
|
@kubectl delete pods -l app=radicle-node --wait=false
|
||||||
|
|
||||||
# Delete storage volumes
|
# Delete storage volumes
|
||||||
[group('delete')]
|
[group('delete')]
|
||||||
delete-pvc: (verify-tool "kubectl")
|
delete-pvc: (verify-tool "kubectl")
|
||||||
@echo "{{CHECK}}Deleting storage volumes...{{NORMAL}}"
|
@echo "{{CHECK}}Deleting storage volumes…{{NORMAL}}"
|
||||||
@kubectl delete pvc -l app=radicle-node --wait=false
|
@kubectl delete pvc -l app=radicle-node --wait=false
|
||||||
|
|
||||||
# Destroy the Talos cluster and clean up kubeconfig
|
# Destroy the Talos cluster and clean up kubeconfig
|
||||||
|
|
@ -117,14 +117,14 @@ destroy: (verify-tool "kubectl") (verify-tool "talosctl") show-cluster
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "{{CHECK}}Destroying talos cluster '{{cluster_name}}'...{{NORMAL}}"
|
echo "{{CHECK}}Destroying talos cluster '{{cluster_name}}'…{{NORMAL}}"
|
||||||
if [ "{{provisioner}}" = "qemu" ]; then
|
if [ "{{provisioner}}" = "qemu" ]; then
|
||||||
sudo --preserve-env=HOME,PATH talosctl cluster destroy --name {{cluster_name}} --provisioner {{provisioner}}
|
sudo --preserve-env=HOME,PATH talosctl cluster destroy --name {{cluster_name}} --provisioner {{provisioner}}
|
||||||
else
|
else
|
||||||
talosctl cluster destroy --name {{cluster_name}} --provisioner {{provisioner}}
|
talosctl cluster destroy --name {{cluster_name}} --provisioner {{provisioner}}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "{{CHECK}}Removing kube config entries...{{NORMAL}}"
|
echo "{{CHECK}}Removing kube config entries…{{NORMAL}}"
|
||||||
CONTEXT=$(kubectl config current-context 2>/dev/null || echo "")
|
CONTEXT=$(kubectl config current-context 2>/dev/null || echo "")
|
||||||
if [ -n "$CONTEXT" ]; then
|
if [ -n "$CONTEXT" ]; then
|
||||||
CLUSTER=$(echo "$CONTEXT" | cut -d '@' -f 2)
|
CLUSTER=$(echo "$CONTEXT" | cut -d '@' -f 2)
|
||||||
|
|
@ -162,7 +162,7 @@ ensure-ovmf:
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if [ ! -f /usr/share/OVMF/OVMF_CODE.fd ]; then
|
if [ ! -f /usr/share/OVMF/OVMF_CODE.fd ]; then
|
||||||
echo "{{CHECK}}Symlinking OVMF firmware from Nix store into /usr/share/OVMF...{{NORMAL}}"
|
echo "{{CHECK}}Symlinking OVMF firmware from Nix store into /usr/share/OVMF…{{NORMAL}}"
|
||||||
sudo mkdir -p /usr/share/OVMF
|
sudo mkdir -p /usr/share/OVMF
|
||||||
sudo ln -sf "$OVMF_FD_PATH"/* /usr/share/OVMF/
|
sudo ln -sf "$OVMF_FD_PATH"/* /usr/share/OVMF/
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ This module uses a `topology` map to define one or more groups of Radicle nodes.
|
||||||
| `topology: [name]: version` | `string` | `latest` | Container image tag. |
|
| `topology: [name]: version` | `string` | `latest` | Container image tag. |
|
||||||
| `topology: [name]: storage` | `object` | `{className: "local-path", size: "1Gi"}`| Persistent Volume Claim configuration for `/home/radicle/.radicle`. |
|
| `topology: [name]: storage` | `object` | `{className: "local-path", size: "1Gi"}`| Persistent Volume Claim configuration for `/home/radicle/.radicle`. |
|
||||||
| `topology: [name]: sidecars` | `object` | `{events: true}` | Toggles sidecar containers (e.g. the events logger). |
|
| `topology: [name]: sidecars` | `object` | `{events: true}` | Toggles sidecar containers (e.g. the events logger). |
|
||||||
| `topology: [name]: radicleConfig` | `object` | `{node: {network: "test", ...}}` | The contents of the `config.json` injected into the node. |
|
| `topology: [name]: radicleConfig` | `object` | `{node: {network: "test", …}}` | The contents of the `config.json` injected into the node. |
|
||||||
|
|
||||||
## Node Identity / Secrets
|
## Node Identity / Secrets
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue