vdev 0.3.1

CLI utilities for Vector (vector.dev) development and CI workflows
vdev-0.3.1 is not a library.

vdev


The V(ector) Dev(elopment) tool.

This is the command line tooling for Vector development. You don't need to use or install this unless you are doing development in the Vector repo.

Table of Contents:

Pre-requisites

This assumes that you have the following tools installed:

Some other tools may need to be installed depending on the command you are running. All other dependencies can be installed by running

./scripts/environment/prepare.sh

Installation

Note that installation is not required, since cargo vdev commands will invoke vdev from within the repository.

Run the following command from the root of the Vector repository:

cargo install -f --path vdev

You can also install vdev from crates.io

cargo install vdev

Or using binstall, which will download a pre-compiled binary (fastest)

cargo binstall vdev

Running Tests

Unit tests can be run by calling make test.

Running Integration tests

Integration tests require docker or podman to run.

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).

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.

Developing vdev

The CLI uses Clap with the derive construction mechanism and is stored in the commands directory.

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.