Skip to content

Cherrypick/release 1.3 main fixes#226

Closed
jingxiang-z wants to merge 16 commits into
mainfrom
cherrypick/release-1.3-main-fixes
Closed

Cherrypick/release 1.3 main fixes#226
jingxiang-z wants to merge 16 commits into
mainfrom
cherrypick/release-1.3-main-fixes

Conversation

@jingxiang-z

@jingxiang-z jingxiang-z commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Description

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Summary by CodeRabbit

  • New Features

    • Enrollment now validates optional node group and compute zone values, supports clearing them with empty values, and initializes a stable node UUID automatically.
    • Package releases now include updated Debian/RPM service scripts and improved installation/upgrade handling.
  • Bug Fixes

    • Improved metadata handling, persistent node identity, and export behavior when authentication is unavailable.
    • Adjusted health reporting for some NVIDIA persistence-mode conditions.
  • Documentation

    • Updated installation, usage, contributing, and README guidance for the newer Go version and revised resource/support notes.

jingxiang-z and others added 16 commits May 26, 2026 14:20
Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
Signed-off-by: Amber Xue <ambermingxin@nvidia.com>
Signed-off-by: Amber Xue <ambermingxin@nvidia.com>
Signed-off-by: Amber Xue <ambermingxin@nvidia.com>
Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
Co-authored-by: ambermingxin <ambermingxin@nvidia.com>
Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
Signed-off-by: Amber Xue <ambermingxin@nvidia.com>
Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
…auth token is present. (#199)

Signed-off-by: Michael O'Neill <miconeil@amazon.com>
Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
…#220)

Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
Signed-off-by: Amber Xue <ambermingxin@nvidia.com>
Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 41e7a7b5-3e4d-4bef-a666-81b5d66dc7d2

📥 Commits

Reviewing files that changed from the base of the PR and between 9c6d118 and 6eaf5d2.

📒 Files selected for processing (91)
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • .golangci.yml
  • .goreleaser.yaml
  • CONTRIBUTING.md
  • Dockerfile
  • Dockerfile.citests
  • README.md
  • cmd/fleetint/enroll.go
  • cmd/fleetint/enroll_test.go
  • deployments/helm/fleet-intelligence-agent/templates/daemonset.yaml
  • deployments/helm/fleet-intelligence-agent/values.yaml
  • deployments/packages/scripts/deb/postinst
  • deployments/packages/scripts/deb/postrm
  • deployments/packages/scripts/deb/preinst
  • deployments/packages/scripts/deb/prerm
  • deployments/packages/scripts/postinst
  • deployments/packages/scripts/postrm
  • deployments/packages/scripts/preinst
  • deployments/packages/scripts/prerm
  • deployments/packages/scripts/rpm/postinstall
  • deployments/packages/scripts/rpm/postremove
  • deployments/packages/scripts/rpm/preinstall
  • deployments/packages/scripts/rpm/preremove
  • docs/configuration.md
  • docs/development.md
  • docs/install-deb.md
  • docs/install-rpm.md
  • docs/usage.md
  • go.mod
  • internal/agentstate/sqlite.go
  • internal/agentstate/sqlite_test.go
  • internal/agentstate/state.go
  • internal/attestation/backend_test.go
  • internal/backendclient/types.go
  • internal/config/config.go
  • internal/config/config_test.go
  • internal/enrollment/enrollment.go
  • internal/enrollment/enrollment_test.go
  • internal/exporter/converter/otlp.go
  • internal/exporter/converter/otlp_test.go
  • internal/exporter/exporter.go
  • internal/exporter/exporter_test.go
  • internal/inventory/mapper/backend.go
  • internal/inventory/mapper/backend_test.go
  • internal/inventory/sink/backend.go
  • internal/inventory/sink/backend_test.go
  • internal/inventory/source/source_test.go
  • internal/inventory/types.go
  • internal/nodeidentity/nodeidentity.go
  • internal/nodeidentity/nodeidentity_test.go
  • internal/registry/registry.go
  • internal/registry/registry_test.go
  • internal/scan/scan.go
  • internal/server/server.go
  • internal/server/server_test.go
  • internal/validation/outbound/validator.go
  • internal/validation/outbound/validator_test.go
  • sonar-project.properties
  • third_party/fleet-intelligence-sdk/components/accelerator/nvidia/dcgm/cpu/component.go
  • third_party/fleet-intelligence-sdk/components/accelerator/nvidia/dcgm/mem/metrics.go
  • third_party/fleet-intelligence-sdk/components/accelerator/nvidia/dcgm/nvlink/metrics.go
  • third_party/fleet-intelligence-sdk/components/accelerator/nvidia/dcgm/pcie/metrics.go
  • third_party/fleet-intelligence-sdk/components/accelerator/nvidia/dcgm/power/metrics.go
  • third_party/fleet-intelligence-sdk/components/accelerator/nvidia/dcgm/prof/component.go
  • third_party/fleet-intelligence-sdk/components/accelerator/nvidia/dcgm/thermal/metrics.go
  • third_party/fleet-intelligence-sdk/components/accelerator/nvidia/infiniband/metrics.go
  • third_party/fleet-intelligence-sdk/components/accelerator/nvidia/persistence-mode/component.go
  • third_party/fleet-intelligence-sdk/components/accelerator/nvidia/persistence-mode/component_test.go
  • third_party/fleet-intelligence-sdk/components/accelerator/nvidia/processes/component.go
  • third_party/fleet-intelligence-sdk/components/accelerator/nvidia/processes/component_test.go
  • third_party/fleet-intelligence-sdk/components/accelerator/nvidia/processes/metrics.go
  • third_party/fleet-intelligence-sdk/components/accelerator/nvidia/processes/process_env.go
  • third_party/fleet-intelligence-sdk/components/accelerator/nvidia/processes/processes.go
  • third_party/fleet-intelligence-sdk/components/accelerator/nvidia/processes/processes_test.go
  • third_party/fleet-intelligence-sdk/components/network/ethernet/metrics.go
  • third_party/fleet-intelligence-sdk/components/registry.go
  • third_party/fleet-intelligence-sdk/pkg/metadata/metadata.go
  • third_party/fleet-intelligence-sdk/pkg/metadata/metadata_test.go
  • third_party/fleet-intelligence-sdk/pkg/metrics/scraper/prometheus.go
  • third_party/fleet-intelligence-sdk/pkg/metrics/scraper/prometheus_test.go
  • third_party/fleet-intelligence-sdk/pkg/metrics/settable_const_metric.go
  • third_party/fleet-intelligence-sdk/pkg/metrics/settable_const_metric_test.go
  • third_party/fleet-intelligence-sdk/pkg/metrics/store/sqlite.go
  • third_party/fleet-intelligence-sdk/pkg/metrics/store/sqlite_test.go
  • third_party/fleet-intelligence-sdk/pkg/metrics/types.go
  • third_party/fleet-intelligence-sdk/pkg/nvidia-query/dcgm/field_cache.go
  • third_party/fleet-intelligence-sdk/pkg/nvidia-query/dcgm/instance.go
  • third_party/fleet-intelligence-sdk/pkg/nvidia-query/dcgm/instance_test.go
  • third_party/fleet-intelligence-sdk/pkg/nvidia-query/dcgm/query_validator.go
  • third_party/fleet-intelligence-sdk/pkg/nvidia-query/dcgm/query_validator_test.go

📝 Walkthrough

Walkthrough

The PR updates build and release tooling, adds stable node UUID handling and enrollment validation, threads a metric scrape interval through config and inventory, reworks metric typing and DCGM wiring, and changes exporter, registry, and persistence-mode behavior.

Changes

Build and packaging

Layer / File(s) Summary
Toolchain and CI
go.mod, Dockerfile, Dockerfile.citests, .github/workflows/*.yml, .golangci.yml, CONTRIBUTING.md, README.md, docs/development.md, docs/install-*.md, docs/usage.md
Go, workflow, container, lint, and docs references move to 1.26.4, with CI runner and release-step changes.
Package scripts
.goreleaser.yaml, deployments/packages/scripts/deb/*, deployments/packages/scripts/rpm/*
Goreleaser and package maintainer script wiring now point at the Debian and RPM lifecycle hooks.

Runtime behavior

Layer / File(s) Summary
Node identity state
internal/agentstate/*, internal/nodeidentity/*, third_party/fleet-intelligence-sdk/pkg/metadata/*, internal/attestation/backend_test.go, internal/inventory/sink/backend.*, internal/server/server.go, internal/server/server_test.go
Node UUID state, metadata upserts, and server machine-ID initialization use the shared create-or-repair flow.
Enrollment flow
cmd/fleetint/enroll.*, internal/enrollment/*, deployments/helm/fleet-intelligence-agent/templates/daemonset.yaml, deployments/helm/fleet-intelligence-agent/values.yaml
Optional enrollment metadata validation, node UUID initialization, and the Helm enrollment mount and comments are updated together.
Metric interval contract
internal/backendclient/types.go, internal/config/*, internal/inventory/{types.go,mapper/*,source/*}, internal/enrollment/enrollment.go, internal/server/server.go, internal/validation/outbound/*
MetricScrapeIntervalSeconds is added across the config, inventory, server, and outbound validation paths.
Metric typing
third_party/fleet-intelligence-sdk/pkg/metrics/*, third_party/fleet-intelligence-sdk/pkg/metrics/store/*, third_party/fleet-intelligence-sdk/pkg/metrics/scraper/*, internal/exporter/converter/*
The metrics contract gains typed counter and gauge values, SQLite storage persists the type, the Prometheus scraper records it, and OTLP conversion emits counters as sums.
DCGM group names
third_party/fleet-intelligence-sdk/components/registry.go, third_party/fleet-intelligence-sdk/pkg/nvidia-query/dcgm/*, internal/scan/*, internal/server/server.go, third_party/fleet-intelligence-sdk/components/accelerator/nvidia/dcgm/{cpu,prof}/component.go
DCGM group-name helpers are added and propagated through scan, server, and CPU/profiling component setup.
DCGM error classification
third_party/fleet-intelligence-sdk/pkg/nvidia-query/dcgm/{query_validator.go,query_validator_test.go}
DCGM unhealthy classification changes and tests update the expected status mapping.
Counter metrics
third_party/fleet-intelligence-sdk/components/accelerator/nvidia/dcgm/{mem,nvlink,pcie,power,thermal}/metrics.go, third_party/fleet-intelligence-sdk/components/accelerator/nvidia/infiniband/metrics.go, third_party/fleet-intelligence-sdk/components/network/ethernet/metrics.go
The NVIDIA and ethernet metric vectors in these components switch from gauges to settable counters.
Exporter auth
internal/exporter/exporter.go, internal/exporter/exporter_test.go
HTTP export now continues without an auth token and persists refreshed JWT assertions.
Processes cleanup
internal/registry/{registry.go,registry_test.go}, docs/configuration.md
The NVIDIA processes component is removed from the registry and the configuration docs.
Persistence mode
third_party/fleet-intelligence-sdk/components/accelerator/nvidia/persistence-mode/{component.go,component_test.go}
Persistence-mode checks now report disabled-but-supported GPUs as degraded, with test expectations updated.

Sequence Diagram(s)

sequenceDiagram
  participant EnrollWithConfigAndMetadata
  participant nodeidentity_EnsureNodeUUID as "nodeidentity.EnsureNodeUUID"
  participant sqliteState_GetOrCreateNodeUUID as "sqliteState.GetOrCreateNodeUUID"
  participant GetOrCreateNodeUUIDMetadata as "GetOrCreateNodeUUIDMetadata"
  EnrollWithConfigAndMetadata->>nodeidentity_EnsureNodeUUID: initialize node UUID
  nodeidentity_EnsureNodeUUID->>sqliteState_GetOrCreateNodeUUID: GetOrCreateNodeUUID(...)
  sqliteState_GetOrCreateNodeUUID->>GetOrCreateNodeUUIDMetadata: create or repair UUID
  GetOrCreateNodeUUIDMetadata-->>sqliteState_GetOrCreateNodeUUID: committed UUID
  sqliteState_GetOrCreateNodeUUID-->>nodeidentity_EnsureNodeUUID: UUID
  nodeidentity_EnsureNodeUUID-->>EnrollWithConfigAndMetadata: UUID
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

Suggested reviewers

  • ambermingxin
  • rsampaio
  • ooolafhu

Poem

I hopped through configs, bright and new,
And found a node UUID that stayed true.
My whiskers brushed the build and flame,
While metrics learned a counter name.
🐰🥕 All set for another joyful run.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cherrypick/release-1.3-main-fixes

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6eaf5d2022

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

MetadataKeySAKToken = "sak_token"
MetadataKeyEnrolledAt = "enrolled_at"
MetadataKeyNodeGroup = "nodegroup"
MetadataKeyNodeGroup = "node_group"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve legacy nodegroup assignments

For upgraded agents that enrolled with a node group before this commit, the value is already stored under the old nodegroup key; after this line all readers (GetNodeGroup, the inventory sink, and OTLP resource metadata) look only for node_group, so an upgrade without re-running fleetint enroll --node-group ... silently drops the node group assignment from inventory and telemetry despite the Helm comments saying omitted metadata preserves stored values. Please add a fallback or migration for the legacy key before changing the persisted key.

Useful? React with 👍 / 👎.

@jingxiang-z jingxiang-z deleted the cherrypick/release-1.3-main-fixes branch June 27, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants