pkg/trace: stop using info.Version#12849
Merged
Merged
Conversation
d15f68e to
5b7c0a4
Compare
urseberry
approved these changes
Jul 25, 2022
gbbr
reviewed
Jul 26, 2022
Contributor
gbbr
left a comment
There was a problem hiding this comment.
Very nice work Andrew 👏🏻 🎉
This was very much needed! 🙏🏻
| block do | ||
| # defer compilation step in a block to allow getting the project's build version, which is populated | ||
| # only once the software that the project takes its version from (i.e. `datadog-agent`) has finished building | ||
| env['TRACE_AGENT_VERSION'] = project.build_version.gsub(/[^0-9\.]/, '') # used by gorake.rb in the trace-agent, only keep digits and dots |
gbbr
approved these changes
Jul 26, 2022
Contributor
gbbr
left a comment
There was a problem hiding this comment.
Really nice Andrew! Thanks a bunch for doing this! This will allow us now to correctly monitor versions of incoming data!
Hellzy
reviewed
Jul 28, 2022
gbbr
approved these changes
Jul 29, 2022
Hellzy
approved these changes
Jul 29, 2022
KSerrania
approved these changes
Aug 2, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR unifies the version info used by the trace-agent into a single source of truth: The incoming config. This config is set in cmd/trace-agent.
Motivation
This greatly simplifies the disparate places where version info was coming from for the trace-agent.
Additional Notes
Possible Drawbacks / Trade-offs
This change removes a tiny bit of detail from the trace-agent
/infoendpoint (thebuild_date). This is a breaking change for that API which could cause issues for any tracers or code relying on the exact. I did a search through the various tracers and did not find any users of this data, I also asked in slack and it doesn't seem anyone is using it. However, it might be better to instead of dropping the field, just put a static date to absolutely ensure no breakage for users (Please leave thoughts about this as a comment!)Describe how to test/QA your changes
Reviewer's Checklist
I'm not very familiar with the build system (which seems to be across a number of different things here both in ruby and python?) So I'm not confident at all in my changes to the ruby files. There's also the make file here that I believe can be changed but I'm unsure if it's just dropping version info entirely?
Triagemilestone is set.major_changelabel if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.changelog/no-changeloglabel has been applied.qa/skip-qalabel is not applied.team/..label has been applied, indicating the team(s) that should QA this change.need-change/operatorandneed-change/helmlabels have been applied.