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

[Ingest Manager] Send snapshot flag together with metadata #21285

Merged
merged 7 commits into from
Oct 1, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ type AgentECSMeta struct {
ID string `json:"id"`
// Version specifies current version of an agent.
Version string `json:"version"`
// Snapshot is a flag specifying that the agent used is a snapshot build.
Snapshot bool `json:"snapshot,omitempty"`
// BuildOriginal is an extended build information for the agent.
BuildOriginal string `json:"build.original"`
}

// SystemECSMeta is a collection of operating system metadata in ECS compliant object form.
Expand Down Expand Up @@ -126,8 +130,10 @@ func (i *AgentInfo) ECSMetadata() (*ECSMeta, error) {
return &ECSMeta{
Elastic: &ElasticECSMeta{
Agent: &AgentECSMeta{
ID: i.agentID,
Version: release.Version(),
ID: i.agentID,
Version: release.Version(),
Snapshot: release.Snapshot(),
BuildOriginal: release.Info().String(),
Copy link
Contributor

Choose a reason for hiding this comment

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

This is probably a great place to put if the agent is also upgradable.

Should we add Upgradable: false for now, then replace it with the correct check once #21206 lands.

},
},
Host: &HostECSMeta{
Expand Down
2 changes: 1 addition & 1 deletion x-pack/elastic-agent/pkg/release/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func Info() VersionInfo {
}

// String returns the string format for the version information.
func (v *VersionInfo) String() string {
func (v VersionInfo) String() string {
var sb strings.Builder

sb.WriteString(v.Version)
Expand Down