Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add release docs + general docs cleanup and polish #491

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Datadog Saluki
Copyright 2024-Present Datadog, Inc.
This product includes software developed at Datadog (<https://www.datadoghq.com/).>
This product includes software developed at Datadog (<https://www.datadoghq.com/>).
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# saluki
[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/DataDog/datadog-agent/blob/master/LICENSE)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/DataDog/saluki/blob/main/LICENSE)

Saluki is an experimental toolkit for building telemetry data planes in Rust.

Expand All @@ -13,12 +13,13 @@ In the event that we cease further development, the repository will be put into
Everything under `lib` contains reusable/common code, and everything under `bin` contains dedicated crates for building
application-specific binaries.

### Binaries (data planes)
### Binaries / applications

- `bin/agent-data-plane`: data plane used for testing Saluki, which emulates the [standalone DogStatsD server][standalone-dsd]
in the Datadog Agent
- `bin/correctness`: a number of binaries that are used to run "correctness" tests on ADP/standalone DogStatsD

### Helper crates
### Shared libraries

- `lib/datadog-protos`: Rust bindings generated from Protocol Buffers definitions for metrics/trace intake APIs
- `lib/ddsketch-agent`: Rust implementation of the [DDSketch][ddsketch] algorithm matched to the implementation
Expand All @@ -28,7 +29,7 @@ application-specific binaries.
- `lib/process-memory`: cross-platform library for querying the RSS of the current process with few to no allocations
- `lib/stringtheory`: custom string types and string interning implementations for high-performance string handling

### Saluki
### Saluki (core libraries)

All remaining crates are part of Saluki itself, and all have a name with the prefix `saluki-`:

Expand Down Expand Up @@ -61,12 +62,17 @@ All remaining crates are part of Saluki itself, and all have a name with the pre
If you find an issue with this package and have a fix, or simply want to report it, please review our
[contributing][contributing] guide.

## Documentation

Saluki has no public-facing _code_ documentation at this time (2025-02-11). Procedural documentation -- architecture,
releasing, etc -- can be found in the [docs](docs) directory.

## Security

Please refer to our [Security Policy][security-policy] if you believe you have found a security vulnerability.

[standalone-dsd]: https://github.com/DataDog/datadog-agent/tree/main/cmd/dogstatsd
[ddsketch]: https://www.vldb.org/pvldb/vol12/p2195-masson.pdf
[ddsketch-agent]: https://github.com/DataDog/opentelemetry-mapping-go/blob/main/pkg/quantile/sparse.go
[contributing]: CONTRIBUTING.md
[contributing]: docs/CONTRIBUTING.md
[security-policy]: SECURITY.md
File renamed without changes.
File renamed without changes.
93 changes: 93 additions & 0 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Releasing Saluki / Agent Data Plane

This document describes the process of releasing new versions of Saluki and Agent Data Plane.

## Saluki

At this time (2025-02-11), Saluki is not yet officially released. This means that all usages of Saluki are driven either
through pointing directly at the repository (using a specific branch, tag, or commit hash), or utilizing path-based
dependencies, such as is done in Agent Data Plane.

## Agent Data Plane

Agent Data Plane has official releases which show up in two forms:

- tagged releases that are exposed through Github Releases
- matching container image builds that are pushed to public container image repositories

Agent Data Plane is a data plane built on Saluki, which is meant to operate in tandem with the Datadog Agent. This means
that while we build ADP from the Saluki repository in a standalone way, we couple it to a specific version of the
Datadog Agent, including the container image that we publish.

### Quick steps

- Ensure that `main` is up-to-date with all of the intended changes that should be present, and that CI tests are
passing cleanly (this will get checked in the actual release CI pipeline, but easier to catch problems early)
- Go to the [Releases](https://github.com/DataDog/saluki/releases) page on Github and click the `Draft a new release`
button.
- Fill in the appropriate version tag (see "Determining the version" below) and click `Create new tag ... on publish`.
- Leave `Previous tag` at `auto`, and change `Release title` to `Agent Data Plane <version>`, where `<version>` is the
new version. (i.e., `Agent Data Plane 0.2.0`)
- Click the `Generate release notes` to automatically populate the relevant changes since the last release.
- If there are any additional notes that should be included, add a new section, called `Additional Notes`, at the top of
the release notes (above the auto-generated `What's Changed` section)
- Click `Publish release`
- Go to the [Gitlab CI pipelines dashboard](https://gitlab.ddbuild.io/DataDog/saluki/-/pipelines) for the repository and
find the pipeline that was triggered for the newly-created Git tag. It may take a minute or two for the repository
sync and pipeline creation to occur.
- The pipeline should progress through the `test`, `build`, `correctness`, `benchmark`, and `release` stages without
issue.
- Once all stages have completed, the `release` stage will have two blocked jobs: `publish-bundled-agent-adp-image` and
`publish-bundled-agent-adp-image-jmx`. These jobs perform the actual publishing of the container images to our public
container image registries, and must be manually triggered.
- Once triggered, they should run to completion.
- Once complete, you should be able to navigate to a public container image registry that we use, such as [Docker
Hub](https://hub.docker.com/r/datadog/agent/tags), and find the resulting images: if the tag was `0.2.0`, you should
be able to see a recently-published image with a tag that looks like `<Agent version>-v0.2.0-adp-beta-jmx`. (See
"Determining the version" below for more information on the container image tag format.)

### Determining the version

For ADP, we determine the version of the release solely from the Git tag that is created, which also drives the CI
pipeline used to publish the resulting container images. We _do not_ use the `version` field of the `agent-data-plane`
crate itself.

When deciding what version to use, we follow the [Semantic Versioning](https://semver.org/) specification. This means,
in a nutshell:

- prior to v1.0.0:
* breaking changes are indicated by incrementing the minor version
* new features and bug fixes are generally indicated by incrementing the patch version
* if there are enough new features/bug fixes, we may instead opt to increment the minor version just for simplicity
- after v1.0.0:
* breaking changes are indicated by incrementing the major version (this should generally never happen after v1)
* new features are indicated by incrementing the minor version
* bug fixes are indicated by incrementing the patch version
Comment on lines +55 to +65
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some projects put this in VERSIONING.md so people may expect to find it there. You could create that doc and just point to here or vice versa.

Example: https://github.com/open-telemetry/opentelemetry-go/blob/main/VERSIONING.md

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll definitely consider that as a follow-up improvement.


Additionally, for the container images we build, there is an additional component in the image tag that specifies the
version of the Datadog Agent that the image is based on. The Datadog Agent version is controlled in `.gitlab-ci.yml`, via the `BASE_DD_AGENT_VERSION`
variable. We pull the Datadog Agent image from a public container image registry (Google Container Registry) and layer
on the ADP binary, and supporting files, which results in our final "bundled" ADP container image.

### Build metadata

We calculate a number of values that are used to populate what we call "build metadata", which is information passed in
during the build process and is used to drive a number of behaviors:

- outputting the version of ADP, when it was built, the build architecture, etc, as a log at startup
- special constant identifiers that are used to populate things like HTTP request headers (user agent, etc)

This build metadata is _normally_ calculated with a Make target -- `emit-build-metadata` -- which populates it during
local builds or regular CI builds. However, for release builds, it is set manually when invoking the container image
builds. These settings can be found in the `.gitlab/release.yml` file, under the `build-release-adp-image` job.

The relevant build arguments are all prefixed with `APP_` and are as follows:

- `APP_FULL_NAME`: the full name of the application (hard-coded to `agent-data-plane`)
- `APP_SHORT_NAME`: the short name of the application (hard-coded to `data-plane`)
- `APP_IDENTIFIER`: a short identifier for the application (hard-coded to `adp`)
- `APP_VERSION`: the version of the application (set to the Git tag)
- `APP_BUILD_DATE`: the date the build was performed (set to the creation time of the Gitlab CI pipeline)

This build metadata should not need to be manually changed on a per-release basis, and so this section is mostly
informational and not relevant to the release process itself.
Loading