Skip to content

Commit eee301d

Browse files
committed
chore(agent-data-plane): address review feedback on build metadata comments
Drop the comments narrating which values moved out of the build tooling, and restore the build metadata description in the release docs. The comments described the change rather than the current state, which isn't useful to a later reader.
1 parent fd020c4 commit eee301d

5 files changed

Lines changed: 4 additions & 15 deletions

File tree

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ export APP_GIT_HASH := $(or $(CI_COMMIT_SHA),$(shell git rev-parse --short HEAD
1111
export APP_BUILD_TIME := $(or $(CI_PIPELINE_CREATED_AT),0000-00-00T00:00:00-00:00)
1212

1313
# ADP-specific settings used during builds.
14-
#
15-
# ADP's name and version aren't here: the binary declares them itself (see `declare_app_details!` in
16-
# bin/agent-data-plane/src/main.rs) and Cargo supplies the version, so builds no longer pass them in. ADP_APP_VERSION
17-
# survives only because release artifacts are named after it.
1814
export ADP_APP_GIT_HASH := $(APP_GIT_HASH)
1915
export ADP_APP_VERSION_AUTO := $(shell cat bin/agent-data-plane/Cargo.toml | grep -E "^version = \"" | head -n 1 | cut -d '"' -f 2)
2016
export ADP_APP_VERSION := $(or $(ADP_APP_VERSION),$(ADP_APP_VERSION_AUTO))

ci/tooling/build-adp-aix.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export CARGO_TARGET_DIR
3030

3131
APP_GIT_HASH_AUTO="$(git -C "${repo_root}" rev-parse --short HEAD 2>/dev/null || echo not-in-git)"
3232

33-
# Only build metadata is passed in; ADP declares its own name and Cargo supplies its version.
3433
export APP_GIT_HASH="${APP_GIT_HASH:-${ADP_APP_GIT_HASH:-${APP_GIT_HASH_AUTO}}}"
3534
# Unlike the Makefile, this script defaults APP_DEV_BUILD to "false", so it can't fall back to a placeholder
3635
# timestamp: saluki-metadata rejects placeholder metadata on release builds. Stamp the current time instead.

ci/tooling/windows-build-adp.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ Install-CachedZipTool `
4646

4747
# saluki-metadata reads these at build time. Must match what the Makefile passes through
4848
# (ADP_APP_GIT_HASH / ADP_APP_BUILD_TIME) so the Windows binary reports the same build
49-
# metadata as the linux/darwin binaries do. The application's name and version aren't here:
50-
# ADP declares those itself and Cargo supplies the version.
49+
# metadata as the linux/darwin binaries do.
5150
# Windows PowerShell 5.1 (the default `powershell.exe` in the LTSC2022 build image) doesn't
5251
# have Get-Date's -AsUTC switch (added in PS 7.1). ToUniversalTime() works on both.
5352
$env:APP_BUILD_TIME = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")

ci/tooling/windows-integration-tests.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ if (-not (Get-Command docker -ErrorAction SilentlyContinue)) {
5757
Invoke-Native docker version
5858

5959
Write-Host "[*] Building Panoramic and Agent Data Plane for Windows..."
60-
# saluki-metadata reads these at build time. ADP declares its own name and version, so only
61-
# build metadata is passed in here.
60+
# saluki-metadata reads these at build time.
6261
# Windows PowerShell 5.1 doesn't have Get-Date's -AsUTC switch (added in PS 7.1).
6362
$env:APP_BUILD_TIME = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
6463
if (-not $env:APP_GIT_HASH) {

docs/agent-data-plane/releasing.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,8 @@ during the build process and is used to drive a number of behaviors:
8181
- outputting the version of ADP, when it was built, the build architecture, etc, as a log at startup
8282
- special constant identifiers that are used to populate things like HTTP request headers (user agent, etc)
8383

84-
ADP's identity—its full name, short name, identifier, and version—isn't passed in by the build. The binary declares it
85-
in `bin/agent-data-plane/src/main.rs` using `saluki_metadata::declare_app_details!`, and Cargo supplies the version from
86-
`bin/agent-data-plane/Cargo.toml`. Changing any of those means editing that declaration, not the build tooling.
87-
88-
What remains describes the build rather than the application, and is calculated with a Make
89-
target—`emit-adp-build-metadata`—which populates it during local builds or regular CI builds:
84+
This build metadata is calculated with a Make target—`emit-adp-build-metadata`—which populates it during local builds or
85+
regular CI builds. The relevant build arguments are all prefixed with `APP_` and are as follows:
9086

9187
- `APP_GIT_HASH`: the Git commit the build was performed from (set to the GitLab CI commit SHA)
9288
- `APP_BUILD_TIME`: the time the build was performed (set to the creation time of the GitLab CI pipeline)

0 commit comments

Comments
 (0)