Skip to content

Commit 3905b4f

Browse files
chore(vdev): Update README.md and cleanup unused commands (#24936)
* chore(vdev): Update README.md and cleanup unused commands * Update spelling allow/expect
1 parent 0573297 commit 3905b4f

7 files changed

Lines changed: 43 additions & 95 deletions

File tree

.github/actions/spelling/allow.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Bedove
6060
Benss
6161
bigendian
6262
bindir
63+
binstall
6364
binfmt
6465
bitcast
6566
bitcode

.github/actions/spelling/expect.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,13 @@ duser
170170
dynamicwireless
171171
dyno
172172
ebfcee
173+
ector
173174
edenhill
174175
edns
175176
eeyun
176177
efgh
177178
Elhage
179+
elopment
178180
emerg
179181
endianess
180182
endler

vdev/README.md

Lines changed: 40 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,77 @@
11
# vdev
22

3-
-----
3+
---
44

5-
This is the command line tooling for Vector development.
5+
The V(ector) Dev(elopment) tool.
6+
7+
This is the command line tooling for Vector development. You don't need to use or install this
8+
unless you are doing development in the Vector repo.
69

710
Table of Contents:
811

12+
- [Pre-requisites](#pre-requisites)
913
- [Installation](#installation)
10-
- [Configuration](#configuration)
11-
- [Repository](#repository)
12-
- [Starship](#starship)
13-
- [CLI](#cli)
1414
- [Running Tests](#running-tests)
15+
- [Running Integration tests](#running-integration-tests)
16+
- [Developing vdev](#developing-vdev)
1517

1618
## Pre-requisites
1719

1820
This assumes that you have the following tools installed:
1921

20-
- cargo-nextest - https://nexte.st/
22+
- [git](https://git-scm.com/)
23+
- [cargo](https://rustup.rs/)
24+
- [docker](https://www.docker.com/)
25+
- [npm](https://www.npmjs.com/)
26+
- [ruby](https://www.ruby-lang.org/en/)
27+
28+
Some other tools may need to be installed depending on the command you are running. All other
29+
dependencies can be installed by running
30+
31+
```sh
32+
./scripts/environment/prepare.sh
33+
```
2134

2235
## Installation
2336

37+
Note that installation is not required, since `cargo vdev` commands will invoke vdev from within the
38+
repository.
39+
2440
Run the following command from the root of the Vector repository:
2541

26-
```text
42+
```sh
2743
cargo install -f --path vdev
2844
```
2945

30-
## Configuration
31-
32-
### Repository
46+
You can also install vdev from [crates.io](https://crates.io/crates/vdev)
3347

34-
Setting the path to the repository explicitly allows the application to be used at any time no matter the current working directory.
35-
36-
```text
37-
vdev config set repo .
48+
```sh
49+
cargo install vdev
3850
```
3951

40-
To test, enter your home directory and then run:
52+
Or using [binstall](https://github.com/cargo-bins/cargo-binstall), which will download a
53+
pre-compiled binary (fastest)
4154

42-
```text
43-
vdev exec ls
55+
```sh
56+
cargo binstall vdev
4457
```
4558

46-
### Starship
47-
48-
A custom command for the [Starship](https://starship.rs) prompt is available.
4959

50-
```toml
51-
format = """
52-
...
53-
${custom.vdev}\
54-
...
55-
$line_break\
56-
...
57-
$character"""
60+
## Running Tests
5861

59-
# <clipped>
62+
Unit tests can be run by calling `make test`.
6063

61-
[custom.vdev]
62-
command = "vdev meta starship"
63-
when = true
64-
# Windows
65-
# shell = ["cmd", "/C"]
66-
# Other
67-
# shell = ["sh", "--norc"]
68-
```
64+
### Running Integration tests
6965

70-
## CLI
66+
Integration tests require docker or podman to run.
7167

72-
The CLI uses [Clap](https://github.com/clap-rs/clap) with the `derive` construction mechanism and is stored in the [commands](src/commands) directory.
68+
Integration tests are not run by default when running `make test`. Instead, they are accessible via the integration subcommand `cargo vdev int` (example: `cargo vdev int test aws` runs aws-related integration tests).
7369

74-
Every command group/namespace has its own directory with a `cli` module, including the root `vdev` command group. All commands have an `exec` method that provides the actual implementation, which in the case of command groups will be calling sub-commands.
70+
You should use `./scripts/run-integration-test.sh`, which is the wrapper used by CI and which suits most development needs. Integration tests require a `cargo vdev int start`, `cargo vdev int test`, and `cargo vdev int stop`, which the script handles automatically. You can find the list of available integration tests using `cargo vdev int show`.
7571

7672

77-
## Running Tests
73+
## Developing vdev
7874

79-
Unit tests can be run by calling `cargo vdev test`.
75+
The CLI uses [Clap](https://github.com/clap-rs/clap) with the `derive` construction mechanism and is stored in the [commands](src/commands) directory.
8076

81-
Integration tests are not run by default when running `cargo vdev test`. Instead, they are accessible via the integration subcommand (example: `cargo vdev int test aws` runs aws-related integration tests). You can find the list of available integration tests using `cargo vdev int show`. Integration tests require docker or podman to run.
77+
Every command group/namespace has its own directory with a `cli` module, including the root `vdev` command group. All commands have an `exec` method that provides the actual implementation, which in the case of command groups will be calling sub-commands.

vdev/src/commands/exec.rs

Lines changed: 0 additions & 24 deletions
This file was deleted.

vdev/src/commands/meta/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
mod install_git_hooks;
2-
mod starship;
32

43
crate::cli_subcommands! {
54
"Collection of meta-utilities..."
6-
starship,
75
install_git_hooks,
86
}

vdev/src/commands/meta/starship.rs

Lines changed: 0 additions & 23 deletions
This file was deleted.

vdev/src/commands/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ mod check;
7272
mod complete;
7373
mod crate_versions;
7474
mod e2e;
75-
mod exec;
7675
mod features;
7776
mod fmt;
7877
mod info;
@@ -92,7 +91,6 @@ cli_commands! {
9291
complete,
9392
crate_versions,
9493
e2e,
95-
exec,
9694
features,
9795
fmt,
9896
info,

0 commit comments

Comments
 (0)