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:
Fintan Halpenny 2026-04-17 17:37:56 +01:00
parent 9c37511613
commit 9ff0e8b01f
33 changed files with 128 additions and 69 deletions

View File

@ -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
will be reported back to the user.
- 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
indistinguishable from `[::1]:8776`. Since a port number is always required
along a host when providing an address, IPv6 addresses now always require

View File

@ -152,7 +152,7 @@ are separated from private modules with a blank line:
use std::time;
use std::process;
...
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.
if let Some(e) = result.err() {
...
}
Use 1-word names for function parameters or variables that have larger scopes:
pub fn commit(repo: &Repository, sig: &Signature) -> Result<Commit, Error> {
...
}
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
// user creates a new repository while the node is stopped.
for rid in self.storage.inventory()? {
...
### Referring to radicle.dev in Code

View File

@ -6,7 +6,7 @@ $ rad auth --alias "alice"
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.
✓ You're all set.

View File

@ -59,7 +59,7 @@ the delegates and threshold:
+ "did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi",
+ "did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk"
],
...
- "threshold": 1
+ "threshold": 2

View File

@ -6,7 +6,7 @@ Your inbox is empty.
``` ~bob
$ 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)
$ git commit -m "Change copyright" --allow-empty -q
$ git push rad HEAD:bob/copy
@ -80,7 +80,7 @@ $ rad inbox show 1
│ Author bob z6Mkt67…v4N1tRk │
│ Status open │
│ │
...
[...]
╰──────────────────────────────────────────────────╯
```

View File

@ -22,7 +22,7 @@ And initialize this working copy as that existing repository:
```
$ 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
! Not writing .gitsigners file.

View File

@ -22,7 +22,7 @@ And initialize this working copy as that existing repository:
```
$ 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
✓ Created .gitsigners file

View File

@ -84,7 +84,7 @@ Running the command again gives us an error:
```
$ 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:
@ -126,7 +126,7 @@ $ rad sync status
```
``` (fail)
$ 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)
✗ Hint: to start your node, run `rad node start`.
```

View File

@ -80,7 +80,7 @@ ensure that they are looking at the latest changes:
``` ~bob (fail)
$ rad patch checkout aa45913 --name alice-init
✗ Performing checkout... <canceled>
✗ Performing checkout <canceled>
✗ Error: branch 'alice-init' already exists (use `--force` to overwrite)
```

View File

@ -55,7 +55,7 @@ pub fn init(args: Args) -> anyhow::Result<()> {
term::passphrase_confirm("Enter a passphrase:", env::RAD_PASSPHRASE)?
};
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 mut agent = true;
spinner.finish();
@ -63,7 +63,7 @@ pub fn init(args: Args) -> anyhow::Result<()> {
if let Some(passphrase) = passphrase {
match ssh::agent::Agent::connect() {
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() {
spinner.finish();
} else {

View File

@ -38,7 +38,7 @@ fn execute(args: Args, profile: &Profile) -> anyhow::Result<PathBuf> {
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) {
Ok(repo) => repo,
Err(err) => {

View File

@ -134,7 +134,7 @@ pub fn init(repo: git::Repository, args: Args, profile: &profile::Profile) -> an
let signer = term::signer(profile)?;
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");
match radicle::rad::init(
@ -497,7 +497,7 @@ pub fn setup_signing(
let key = ssh::fmt::fingerprint(node_id);
let yes = if !git::is_signing_configured(path)? {
term::headline(format!(
"Configuring Radicle signing key {}...",
"Configuring Radicle signing key {}",
term::format::tertiary(key)
));
true

View File

@ -120,7 +120,7 @@ pub fn start(
}
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() {
spinner.error("node is not running");
} else {
@ -198,7 +198,7 @@ pub fn connect(
timeout: time::Duration,
) -> anyhow::Result<()> {
let spinner = term::spinner(format!(
"Connecting to {}@{addr}...",
"Connecting to {}@{addr}",
term::format::node_id_human_compact(&nid)
));
match node.connect(
@ -222,11 +222,11 @@ pub fn connect_many(
addrs: Vec<Address>,
timeout: time::Duration,
) -> anyhow::Result<()> {
let mut spinner = term::spinner("Connecting...");
let mut spinner = term::spinner("Connecting");
let mut errors = HashMap::new();
for addr in addrs {
spinner.message(format!(
"Connecting to {}@{addr}...",
"Connecting to {}@{addr}",
term::format::node_id_human_compact(&nid)
));
match node.connect(

View File

@ -54,7 +54,7 @@ pub fn run(
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 commit = match working.find_branch(patch_branch.as_str(), git::raw::BranchType::Local) {

View File

@ -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))?;
spinner.finish();

View File

@ -18,7 +18,7 @@ use radicle_signals as signals;
const HELP_MSG: &str = r#"
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
eg. `0.0.0.0:8776`, and add your external addresses in your configuration.

View File

@ -310,7 +310,7 @@ impl Reactor {
let poll = Poll::new()?;
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 runtime = Runtime {
service,

View File

@ -46,7 +46,7 @@ impl Controller {
}
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 res2 = self.wake();
res1.or(res2).map_err(|_| self)

View File

@ -1224,7 +1224,7 @@ fn test_persistent_peer_reconnect_attempt() {
assert!(ips.contains(&bob.id()));
assert!(ips.contains(&eve.id()));
// ... Negotiated ...
// … Negotiated …
//
// 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.
assert_eq!(alice.fetches().next(), Some((rid2, bob.id)));
// ... but not the third.
// but not the third.
assert_matches!(alice.fetches().next(), None);
// Finish the 2nd fetch.
@ -1651,7 +1651,7 @@ fn test_queued_fetch_from_command_same_rid() {
assert_eq!(rid, rid1);
assert!(peers.remove(&nid));
// ... but not the third.
// but not the third.
assert_matches!(alice.fetches().next(), None);
// Finish the 2nd fetch.

View File

@ -126,7 +126,7 @@ impl<T, const N: usize> BoundedVec<T, N> {
/// vec.push(3).expect("within limit");
/// 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");
/// assert_eq!(vec.len(), 3);
/// ```

View File

@ -749,7 +749,7 @@ where
);
if now - self.last_idle >= IDLE_INTERVAL {
trace!(target: "service", "Running 'idle' task...");
trace!(target: "service", "Running 'idle' task");
self.keep_alive(&now);
self.disconnect_unresponsive_peers(&now);
@ -760,7 +760,7 @@ where
self.last_idle = now;
}
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() {
warn!(target: "service", "Failed to relay stored announcements: {e}");
@ -769,7 +769,7 @@ where
self.last_gossip = now;
}
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() {
warn!(target: "service", "Failed to fetch missing inventory: {e}");
@ -778,14 +778,14 @@ where
self.last_sync = now;
}
if now - self.last_announce >= ANNOUNCE_INTERVAL {
trace!(target: "service", "Running 'announce' task...");
trace!(target: "service", "Running 'announce' task");
self.announce_inventory();
self.outbox.wakeup(ANNOUNCE_INTERVAL);
self.last_announce = now;
}
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) {
warn!(target: "service", "Failed to prune routing entries: {err}");
@ -2631,7 +2631,7 @@ where
for (nid, addr, attempts) in reconnect {
if self.reconnect(nid, addr) {
debug!(target: "service", "Reconnecting to {nid} (attempts={attempts})...");
debug!(target: "service", "Reconnecting to {nid} (attempts={attempts})");
}
}
}

View File

@ -191,7 +191,7 @@ impl From<StreamType> for u8 {
/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/// | 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)]

View File

@ -258,7 +258,7 @@ pub fn indented(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) {

View File

@ -238,7 +238,7 @@ impl Formatter for CanonicalFormatter {
// 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,
// 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>(
&mut self,
writer: &mut W,

View File

@ -1046,7 +1046,7 @@ impl Doc {
&crate::cob::identity::TYPENAME,
&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(
id_ref.as_str(),
cob_ref.as_str(),

View File

@ -3,7 +3,7 @@
//! $RAD_HOME/ # Radicle home
//! storage/ # Storage root
//! zEQNunJUqkNahQ8VvQYuWZZV7EJB/ # Project git repository
//! ... # More projects...
//! … # More projects…
//! keys/
//! radicle # Secret key (PKCS 8)
//! radicle.pub # Public key (PKCS 8)

View File

@ -19,7 +19,7 @@ post-checkout:
# Run commit-msg checks
[group('hooks')]
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}}"
# Run pre-commit checks
@ -35,7 +35,7 @@ pre-commit: check-conflict-markers format-rust check-rust check-docs check-typos
[group('format')]
[parallel]
format-rust: (verify-tool "cargo")
@echo "{{CHECK}}Cargo fmt...{{NORMAL}}"
@echo "{{CHECK}}Cargo fmt{{NORMAL}}"
@{{cargo_cmd}} fmt --all --check
# Run cargo check
@ -44,7 +44,7 @@ format-rust: (verify-tool "cargo")
[group('check')]
[parallel]
check-rust:
@echo "{{CHECK}}Cargo check...{{NORMAL}}"
@echo "{{CHECK}}Cargo check{{NORMAL}}"
@{{cargo_cmd}} check --workspace --all-targets --all-features
# Check documentation for warnings
@ -53,7 +53,7 @@ check-rust:
[group('check')]
[parallel]
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
# Check for typos
@ -61,17 +61,22 @@ check-docs:
[group('pre-push')]
[group('check')]
[parallel]
check-typos: (verify-tool "typos" "typos-cli")
@echo "{{CHECK}}Checking for spelling typos...{{NORMAL}}"
check-typos: (verify-tool "typos" "typos-cli") check-ellipses
@echo "{{CHECK}}Checking for spelling typos{{NORMAL}}"
@typos
[group('check')]
check-ellipses:
@echo "{{CHECK}}Checking for ellipses…{{NORMAL}}"
scripts/just/check-ellipses.sh
# Run codespell
[group('pre-commit')]
[group('pre-push')]
[group('check')]
[parallel]
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
# just runs with `/bin/sh` which has no doublestar glob
@ -84,7 +89,7 @@ check-spelling: (verify-tool "codespell")
[group('check')]
[parallel]
check-scripts: (verify-tool "shellcheck")
@echo "{{CHECK}}Checking shell scripts...{{NORMAL}}"
@echo "{{CHECK}}Checking shell scripts{{NORMAL}}"
@find . -type f -name "*.sh" -exec shellcheck {} +
# Run checks for forbidden keywords
@ -101,7 +106,7 @@ check-keywords: (verify-tool "rg" "ripgrep")
[group('check')]
[parallel]
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})( |$)'
# Format Nix files
@ -122,7 +127,7 @@ pre-push: check-conflict-markers format-rust check-rust check-keywords check-doc
# Run Clippy lints
[group('pre-push')]
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
# Check if required tools are in PATH.
@ -148,5 +153,5 @@ check-hooks:
[group('test')]
[group('pre-push')]
test-rust:
@echo "{{CHECK}}Cargo test...{{NORMAL}}"
@echo "{{CHECK}}Cargo test{{NORMAL}}"
@{{cargo_cmd}} nextest run --workspace --all-features --no-fail-fast

View File

@ -28,7 +28,7 @@ install() {
main() {
if [ $# -lt 2 ]; then
echo "usage: $0 <output-dir> <input-file>..."
echo "usage: $0 <output-dir> <input-file>"
exit 1
fi

54
scripts/just/check-ellipses.sh Executable file
View File

@ -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

View File

@ -1,6 +1,6 @@
#! /usr/bin/env bash
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
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep '\.rs$' || true)

View File

@ -69,7 +69,7 @@ Here is an example of how the topology is structured:
```cue
package main
// ...
//
// Declare instances to deploy
values: {
@ -181,7 +181,7 @@ See the [Goals] section for more info.
- [X] Flexibility to define network topologies.
- [ ] Easy to construct and run new simulations.
- [ ] Reproducible starting state.
- [ ] Adverse network emulation e.g. dropped packets, network delays...
- [ ] Adverse network emulation e.g. dropped packets, network delays
## Plan

View File

@ -34,7 +34,7 @@ create-cluster: (verify-tool "talosctl") ensure-ovmf
#!/usr/bin/env bash
set -e
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}}"
if [ "{{provisioner}}" = "qemu" ]; then
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
[private]
configure-cluster: (verify-tool "kubectl") create-cluster
@echo "{{CHECK}}Configuring cluster...{{NORMAL}}"
@echo "{{CHECK}}Configuring cluster{{NORMAL}}"
# Add local-path storage system
@kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
# Relax security on namespaces
@ -60,7 +60,7 @@ configure-cluster: (verify-tool "kubectl") create-cluster
# Start the simulation network only
[group('start')]
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
@just show-cluster
@ -71,11 +71,11 @@ vendor-timoni-dependencies: (verify-tool "timoni")
set -e
cd {{radicle_node_module}}
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
fi
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
fi
@ -95,13 +95,13 @@ delete: delete-pods delete-pvc
# Delete pods only
[group('delete')]
delete-pods: (verify-tool "kubectl")
@echo "{{CHECK}}Deleting pods...{{NORMAL}}"
@echo "{{CHECK}}Deleting pods{{NORMAL}}"
@kubectl delete pods -l app=radicle-node --wait=false
# Delete storage volumes
[group('delete')]
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
# Destroy the Talos cluster and clean up kubeconfig
@ -117,14 +117,14 @@ destroy: (verify-tool "kubectl") (verify-tool "talosctl") show-cluster
exit 1
fi
echo "{{CHECK}}Destroying talos cluster '{{cluster_name}}'...{{NORMAL}}"
echo "{{CHECK}}Destroying talos cluster '{{cluster_name}}'{{NORMAL}}"
if [ "{{provisioner}}" = "qemu" ]; then
sudo --preserve-env=HOME,PATH talosctl cluster destroy --name {{cluster_name}} --provisioner {{provisioner}}
else
talosctl cluster destroy --name {{cluster_name}} --provisioner {{provisioner}}
fi
echo "{{CHECK}}Removing kube config entries...{{NORMAL}}"
echo "{{CHECK}}Removing kube config entries{{NORMAL}}"
CONTEXT=$(kubectl config current-context 2>/dev/null || echo "")
if [ -n "$CONTEXT" ]; then
CLUSTER=$(echo "$CONTEXT" | cut -d '@' -f 2)
@ -162,7 +162,7 @@ ensure-ovmf:
exit 0
fi
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 ln -sf "$OVMF_FD_PATH"/* /usr/share/OVMF/
fi

View File

@ -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]: 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]: 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