Skip to content

Adds 'agent_version' to PostStatus request#6542

Merged
sorindumitru merged 12 commits intospiffe:mainfrom
nweisenauer-sap:agent-version-infos
Jan 19, 2026
Merged

Adds 'agent_version' to PostStatus request#6542
sorindumitru merged 12 commits intospiffe:mainfrom
nweisenauer-sap:agent-version-infos

Conversation

@nweisenauer-sap
Copy link
Copy Markdown
Contributor

@nweisenauer-sap nweisenauer-sap commented Jan 9, 2026

Requires spiffe/spire-api-sdk#86

Pull Request check list

  • Commit conforms to CONTRIBUTING.md?
  • Proper tests/regressions included?
  • Documentation updated?

Affected functionality

  • When the agent starts up it will use the PostStatus API to notify the server about it's current status. That API was initially going to be used for tracking bundle propagation, but it's unused and unimplemented now. This PR adds the version to the request and implements the API in spire-server.
  • The server will update the status of the agent in the datastore in the same table that is currently tracking the rest of the agent information.
  • ListAgents and GetAgent should also return the version
  • The CLI will report the version of the agents.

Which issue this PR fixes

resolves #6356

Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>
Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>
Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>
Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>
Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>
Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>
Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@sorindumitru sorindumitru left a comment

Choose a reason for hiding this comment

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

Thanks @nweisenauer-sap, this is looking great! I've left a few comments.

Comment thread pkg/agent/manager/manager.go Outdated
Comment thread pkg/agent/manager/manager.go Outdated
Comment thread pkg/agent/manager/manager_test.go
Comment thread pkg/server/endpoints/middleware.go Outdated
Comment thread pkg/server/api/agent/v1/service.go Outdated
Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>
Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@sorindumitru sorindumitru left a comment

Choose a reason for hiding this comment

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

Thanks @nweisenauer-sap, looks like it's almost ready to merge, I had just 2 small comments.

Comment thread pkg/server/api/agent/v1/service.go Outdated
Comment thread pkg/server/api/agent/v1/service.go Outdated
Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>
@nweisenauer-sap
Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review, @sorindumitru !

Copy link
Copy Markdown
Collaborator

@sorindumitru sorindumitru left a comment

Choose a reason for hiding this comment

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

Thanks for @nweisenauer-sap for working on this! LGTM

@sorindumitru sorindumitru added this pull request to the merge queue Jan 19, 2026
Merged via the queue into spiffe:main with commit 7d1c372 Jan 19, 2026
136 of 143 checks passed
@sorindumitru sorindumitru added this to the 1.14.2 milestone Jan 19, 2026
MikeZappa87 pushed a commit to MikeZappa87/spire that referenced this pull request Mar 3, 2026
* PostStatus posts agent status including the agent version

Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>

* Adds tests for agent_version

Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>

* adds more tests for agent_version

Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>

* fixes formatting

Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>

* updates spire-api-sdk version

Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>

* adds agent versions to server cli tests

Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>

* agent_version is shown when listing agents

Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>

* adds validation and limits to PostStatus

Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>

* upgrades spiffe/spire-api-sdk to latest of next

Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>

* addresses issue regarding logging of agent version

Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>

---------

Signed-off-by: Nico Weisenauer <137267159+nweisenauer-sap@users.noreply.github.com>
@amartinezfayo amartinezfayo removed this from the 1.14.2 milestone Mar 5, 2026
@amartinezfayo amartinezfayo added this to the 1.14.3 milestone Mar 5, 2026
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.

Can spire agent send its build version to spire server for telemetry?

3 participants