-
Notifications
You must be signed in to change notification settings - Fork 160
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
relocate agent codebase into pkg/signalfx-agent #2717
Conversation
735e45b
to
5c67098
Compare
It'd be great if we could move the code keeping the git history. It was done for core->contrib components migration open-telemetry/opentelemetry-collector-contrib#4764. So far, it has been pretty helpful in tracking down historical changes. It's just a suggestion tho. Up to the team |
I'd considered using a subtree but felt the ease and known integrity of relying on One unknown for this potential* effort is the agent already having a large migration effort at the end of v4 and |
I'd personally be fine if we just document a link to the signalfx-agent commit that this migration is based on. |
@rmfitzpatrick Can you rebase to pick up the arm64 bundle integration and tests? |
Not required for this PR, but we should update https://github.com/signalfx/splunk-otel-collector/blob/main/.github/dependabot.yml with |
Probably outside the scope of this PR, but do we plan on migrating the monitor doc processes, e.g. https://github.com/signalfx/signalfx-agent/blob/main/scripts/make-monitor-doc? |
Would agree this is out of scope and offhand I'd think that converging on https://github.com/splunk/collector-config-tools using an updated ~gomplate system as a base could be a good target. @pmcollins may have thoughts? |
Yeah, that's fine with me. I try to justify putting things in that repo that at first glance don't appear to belong there by making sure they are used by the tool, but we could definitely add some kind of display capability for the generated docs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Should we wait to merge until after the v0.73.0 release?
I attempted to migrate the histories with the following and am unable to see anything other than the cd signalfx-agent
git branch -D relocated pkg-relocation
git checkout -b relocated
git clean -fxd
mkdir -p soc/pkg/signalfx-agent/cmd soc/pkg/signalfx-agent/scripts
git mv pkg soc/pkg/signalfx-agent
git mv scripts/collectd-template-to-go soc/pkg/signalfx-agent/scripts
git mv scripts/make-versions soc/pkg/signalfx-agent/scripts
git mv cmd/monitorcodegen soc/pkg/signalfx-agent/cmd
git mv Makefile soc/pkg/signalfx-agent
git mv .gitignore soc/pkg/signalfx-agent
git mv .golangci.yml soc/pkg/signalfx-agent
git commit -m "prepare pkg relocation to splunk-otel-collector" -S
git subtree split -P soc -b pkg-relocation
cd ../splunk-otel-collector
git branch -D sfxawithhistory prep-sfxa-relocation pkg-relocation
git checkout --orphan prep-sfxa-relocation
git pull ../signalfx-agent pkg-relocation
git checkout -b sfxawithhistory
git merge --allow-unrelated-histories prep-sfxa-relocation
git branch -d prep-sfxa-relocation In the process it became clearer to me that migrating thousands of agent commits to this project is probably not desirable overall. |
These changes relocate a reduced set of the Smart Agent codebase to this project for local use by the SA receiver and extension. The workflow to land the changes is as follows:
go mod vendor
this project and move the SA project topkg/signalfx-agent
, deleting the vendor dir. This process includes elements that are used by the core agent and not necessarily by our components. Deleting dead paths can be a helpful aim in the future but I didn't attempt to tackle it here._test.go
files from the SA project topkg/signalfx-agent
cmd/monitorcodegen
for metadata.yamlgenmetadata.go
and collectdtemplate.go
generation capabilities. edit: The monitorcodegen template was slightly modified to not require updates when runninggofmt
(removes unnecessary[]string
declaration for group metric map).Makefile
with dev targets*. edit: I've updated these to include noops for the GH actions..golangci.yaml
from the SA project and update its disabled linters to pass for ourfor-all CMD='make lint'
target.For this PR I request that the comments be limited to the functional effects of the changes. This is not intended to be a forum for SA-wide content suggestions, though improving the quality and coverage for all monitors would be very nice to have. I think it could be helpful to remove the fmt/lint/test wall between the modules over time but the immediate benefits aren't clear to me.
I know this is a large PR but thought it'd be helpful to note these files that weren't directly taken from the agent project: