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

Add management mode enum to AgentInfo metadata #110

Merged

Conversation

fearful-symmetry
Copy link
Contributor

Needed for elastic/beats#39403

This adds a AgentManagedMode enum to the AgentInfo struct. This is in service of having beats send the fleet mode upstream via the user agent. Right now, management mode is only known to elastic-agent, so that data has to travel from Agent to Beats.

This also tinkers with the magefile, as the go-licenser install was completely broken for me. This should be correct?

@fearful-symmetry fearful-symmetry added the Team:Elastic-Agent Label for the Agent team label May 22, 2024
@fearful-symmetry fearful-symmetry self-assigned this May 22, 2024
@fearful-symmetry fearful-symmetry requested a review from a team as a code owner May 22, 2024 20:07
@fearful-symmetry fearful-symmetry requested review from rdner and blakerouse and removed request for a team May 22, 2024 20:07
@ycombinator ycombinator added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels May 22, 2024
@pierrehilbert pierrehilbert requested review from pchila and leehinman and removed request for rdner May 23, 2024 07:08
@ycombinator
Copy link
Contributor

This also tinkers with the magefile, as the go-licenser install was completely broken for me. This should be correct?

Are we sure we need these changes? Why did this break only now? What did you attempt to do when it broke and what was the symptom — I can try to reproduce this on my end (from main). Also, if we do need these changes, they should go into their own PR as they're unrelated to the topic of this PR.

@fearful-symmetry
Copy link
Contributor Author

@ycombinator Sorry, should have explained that a bit more:

the go get operation we're using breaks on 1.22:

mage prepare:all                                                                                                                                                
go: modules disabled by GO111MODULE=off; see 'go help modules'
Error: running "go get github.com/elastic/go-licenser" failed with exit code 1

I'm guessing the original code did this since it was a bit of a hack to install binaries without using go install However, this doesn't work in go 1.22 anymore:
https://tip.golang.org/doc/go1.22

go get is no longer supported outside of a module in the legacy GOPATH mode (that is, with GO111MODULE=off). Other build commands, such as go build and go test, will continue to work indefinitely for legacy GOPATH programs.

I figured it was a small enough change that I could just throw it in here, but we can spin it out into a different PR if you want.

@ycombinator ycombinator mentioned this pull request May 24, 2024
@ycombinator
Copy link
Contributor

Thanks for the explanation, @fearful-symmetry. I pulled your magefile changes into their own PR here: #111.

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @fearful-symmetry

@fearful-symmetry fearful-symmetry merged commit 2c7ee2d into elastic:main May 24, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants