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

[chore] Use crosslink tidylist in make gotidy #37142

Merged
merged 3 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ jobs:
run: |
make crosslink
git diff --exit-code || (echo 'Replace statements are out of date, please run "make crosslink" and commit the changes in this PR.' && exit 1)
- name: tidylist
run: |
make tidylist
git diff --exit-code || (echo 'Tidylist is out of date, please run "make tidylist" and commit the changes in this PR.' && exit 1)
- name: Check for go mod dependency changes
run: |
make gotidy
Expand Down
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,22 @@ stability-tests: otelcontribcol
gogci:
$(MAKE) $(FOR_GROUP_TARGET) TARGET="gci"

# `internal/tidylist/tidylist.txt` lists modules in topological order, to ensure `go mod tidy` converges.
# `make tidylist` will update this list.
# We exclude otelcontribcol and oteltestbedcol as those modules are not gitted and may not be present.
.PHONY: tidylist
tidylist: $(CROSSLINK)
cd internal/tidylist && \
$(CROSSLINK) tidylist --validate --allow-circular allow-circular.txt tidylist.txt && \
sed -i.bak -E '/cmd\/otel(contrib|testbed)col/d' tidylist.txt && \
rm tidylist.txt.bak
evan-bradley marked this conversation as resolved.
Show resolved Hide resolved

.PHONY: gotidy
gotidy:
$(MAKE) $(FOR_GROUP_TARGET) TARGET="tidy"
@for mod in $$(cat internal/tidylist/tidylist.txt); do \
echo "Tidying $$mod"; \
(cd $$mod && rm -rf go.sum && $(GOCMD) mod tidy -compat=1.22.0) || exit $?; \
done

.PHONY: remove-toolchain
remove-toolchain:
Expand Down
12 changes: 12 additions & 0 deletions internal/tidylist/allow-circular.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file lists modules that are known to have intra-repository circular dependencies.
# The `make tidylist` command will check against this list and error out if circular dependencies
# are accidentally added or removed.

# exporter/datadog <-> connector/datadog
exporter/datadogexporter
connector/datadogconnector

# receiver/otelarrow <-> internal/otelarrow <-> exporter/otelarrow
receiver/otelarrowreceiver
exporter/otelarrowexporter
internal/otelarrow
296 changes: 296 additions & 0 deletions internal/tidylist/tidylist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
cmd/githubgen
cmd/opampsupervisor
confmap/provider/s3provider
confmap/provider/secretsmanagerprovider
pkg/pdatautil
pkg/golden
pkg/pdatatest
internal/coreinternal
pkg/ottl
internal/filter
connector/countconnector
internal/common
internal/aws/ecsutil
internal/k8sconfig
internal/metadataproviders
pkg/resourcetotelemetry
internal/k8stest
processor/k8sattributesprocessor
pkg/sampling
processor/probabilisticsamplerprocessor
processor/resourcedetectionprocessor
internal/pdatautil
processor/transformprocessor
internal/docker
receiver/dockerstatsreceiver
extension/storage
pkg/stanza
receiver/filelogreceiver
pkg/experimentalmetricmetadata
receiver/hostmetricsreceiver
pkg/translator/prometheus
pkg/translator/prometheusremotewrite
exporter/prometheusremotewriteexporter
receiver/prometheusreceiver
pkg/datadog
processor/tailsamplingprocessor
exporter/datadogexporter
connector/datadogconnector
exporter/datadogexporter
connector/exceptionsconnector
connector/failoverconnector
connector/grafanacloudconnector
connector/otlpjsonconnector
connector/roundrobinconnector
connector/routingconnector
connector/servicegraphconnector
connector/spanmetricsconnector
connector/sumconnector
exporter/alertmanagerexporter
exporter/alibabacloudlogserviceexporter
internal/aws/awsutil
internal/aws/cwlogs
exporter/awscloudwatchlogsexporter
internal/aws/metrics
exporter/awsemfexporter
pkg/translator/jaeger
pkg/translator/zipkin
exporter/awskinesisexporter
exporter/awss3exporter
internal/aws/xray
exporter/awsxrayexporter
exporter/azuredataexplorerexporter
exporter/azuremonitorexporter
exporter/carbonexporter
exporter/cassandraexporter
exporter/clickhouseexporter
exporter/coralogixexporter
exporter/datasetexporter
exporter/dorisexporter
exporter/elasticsearchexporter
extension/encoding
extension/encoding/otlpencodingextension
internal/sharedcomponent
exporter/fileexporter
exporter/googlecloudexporter
exporter/googlecloudpubsubexporter
exporter/googlemanagedprometheusexporter
exporter/honeycombmarkerexporter
exporter/influxdbexporter
internal/kafka
pkg/batchpersignal
pkg/kafka/topic
exporter/kafkaexporter
internal/exp/metrics
exporter/loadbalancingexporter
exporter/logicmonitorexporter
exporter/logzioexporter
pkg/translator/loki
exporter/lokiexporter
exporter/mezmoexporter
pkg/translator/opencensus
receiver/opencensusreceiver
exporter/opencensusexporter
exporter/opensearchexporter
internal/grpcutil
receiver/otelarrowreceiver
internal/otelarrow
exporter/otelarrowexporter
receiver/otelarrowreceiver
internal/otelarrow
exporter/otelarrowexporter
receiver/otelarrowreceiver
exporter/prometheusexporter
exporter/pulsarexporter
internal/rabbitmq
exporter/rabbitmqexporter
internal/splunk
pkg/batchperresourceattr
exporter/sapmexporter
exporter/sentryexporter
pkg/translator/signalfx
exporter/signalfxexporter
exporter/splunkhecexporter
extension/sumologicextension
exporter/sumologicexporter
exporter/syslogexporter
exporter/tencentcloudlogserviceexporter
receiver/zipkinreceiver
exporter/zipkinexporter
extension/ackextension
extension/asapauthextension
internal/aws/proxy
extension/awsproxy
extension/basicauthextension
extension/bearertokenauthextension
extension/encoding/avrologencodingextension
extension/encoding/jaegerencodingextension
extension/encoding/jsonlogencodingextension
extension/encoding/textencodingextension
extension/encoding/zipkinencodingextension
extension/googleclientauthextension
extension/headerssetterextension
extension/healthcheckextension
pkg/status
extension/healthcheckv2extension
extension/httpforwarderextension
extension/jaegerremotesampling
extension/oauth2clientauthextension
extension/observer
extension/observer/cfgardenobserver
extension/observer/dockerobserver
extension/observer/ecsobserver
extension/observer/ecstaskobserver
extension/observer/hostobserver
extension/observer/k8sobserver
extension/oidcauthextension
extension/opampcustommessages
extension/opampextension
extension/pprofextension
extension/remotetapextension
extension/sigv4authextension
extension/solarwindsapmsettingsextension
extension/storage/dbstorage
extension/storage/filestorage
extension/storage/redisstorageextension
processor/attributesprocessor
processor/cumulativetodeltaprocessor
processor/deltatocumulativeprocessor
processor/deltatorateprocessor
processor/filterprocessor
processor/geoipprocessor
processor/groupbyattrsprocessor
processor/groupbytraceprocessor
processor/intervalprocessor
processor/logdedupprocessor
processor/metricsgenerationprocessor
processor/metricstransformprocessor
processor/redactionprocessor
processor/remotetapprocessor
processor/resourceprocessor
processor/routingprocessor
processor/spanprocessor
processor/sumologicprocessor
pkg/winperfcounters
receiver/activedirectorydsreceiver
receiver/aerospikereceiver
receiver/apachereceiver
receiver/apachesparkreceiver
receiver/awscloudwatchreceiver
internal/aws/containerinsight
internal/aws/k8s
internal/kubelet
receiver/awscontainerinsightreceiver
receiver/awsecscontainermetricsreceiver
receiver/awsfirehosereceiver
receiver/awss3receiver
receiver/awsxrayreceiver
receiver/azureblobreceiver
pkg/translator/azure
pkg/translator/azurelogs
receiver/azureeventhubreceiver
receiver/azuremonitorreceiver
receiver/bigipreceiver
receiver/carbonreceiver
receiver/chronyreceiver
receiver/cloudflarereceiver
receiver/cloudfoundryreceiver
internal/collectd
receiver/collectdreceiver
receiver/couchdbreceiver
receiver/datadogreceiver
receiver/elasticsearchreceiver
receiver/expvarreceiver
receiver/filestatsreceiver
receiver/flinkmetricsreceiver
receiver/fluentforwardreceiver
receiver/githubreceiver
receiver/googlecloudmonitoringreceiver
receiver/googlecloudpubsubreceiver
receiver/googlecloudspannerreceiver
receiver/haproxyreceiver
receiver/httpcheckreceiver
receiver/huaweicloudcesreceiver
receiver/iisreceiver
receiver/influxdbreceiver
receiver/jaegerreceiver
receiver/jmxreceiver
receiver/journaldreceiver
receiver/k8sclusterreceiver
receiver/k8seventsreceiver
receiver/k8sobjectsreceiver
receiver/kafkametricsreceiver
receiver/kafkareceiver
receiver/kubeletstatsreceiver
receiver/libhoneyreceiver
receiver/lokireceiver
receiver/memcachedreceiver
receiver/mongodbatlasreceiver
receiver/mongodbreceiver
receiver/mysqlreceiver
receiver/namedpipereceiver
receiver/nginxreceiver
receiver/nsxtreceiver
receiver/ntpreceiver
receiver/oracledbreceiver
receiver/otlpjsonfilereceiver
receiver/podmanreceiver
receiver/postgresqlreceiver
receiver/pulsarreceiver
receiver/purefareceiver
receiver/purefbreceiver
receiver/rabbitmqreceiver
receiver/receivercreator
receiver/redisreceiver
receiver/riakreceiver
receiver/sapmreceiver
receiver/signalfxreceiver
receiver/simpleprometheusreceiver
pkg/translator/skywalking
receiver/skywalkingreceiver
receiver/snmpreceiver
receiver/snowflakereceiver
receiver/solacereceiver
receiver/splunkenterprisereceiver
receiver/splunkhecreceiver
internal/sqlquery
receiver/sqlqueryreceiver
receiver/sqlserverreceiver
receiver/sshcheckreceiver
receiver/statsdreceiver
receiver/syslogreceiver
receiver/tcplogreceiver
receiver/udplogreceiver
receiver/vcenterreceiver
receiver/wavefrontreceiver
receiver/webhookeventreceiver
receiver/windowseventlogreceiver
receiver/windowsperfcountersreceiver
receiver/zookeeperreceiver
cmd/telemetrygen
cmd/telemetrygen/internal/e2etest
confmap/provider/aesprovider
connector/signaltometricsconnector
examples/demo/client
examples/demo/server
exporter/datadogexporter/integrationtest
testbed/mockdatasenders/mockdatadogagentexporter
testbed
exporter/elasticsearchexporter/integrationtest
exporter/kineticaexporter
extension/cgroupruntimeextension
.
internal/aws/xray/testdata/sampleapp
internal/aws/xray/testdata/sampleserver
internal/tools
processor/coralogixprocessor
processor/logstransformprocessor
processor/schemaprocessor
receiver/awscloudwatchmetricsreceiver
receiver/netflowreceiver
receiver/osqueryreceiver
receiver/prometheusremotewritereceiver
receiver/saphanareceiver
receiver/simpleprometheusreceiver/examples/federation/prom-counter
receiver/systemdreceiver
receiver/tlscheckreceiver
4 changes: 2 additions & 2 deletions internal/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/jstemmer/go-junit-report v1.0.0
go.opentelemetry.io/build-tools/checkfile v0.15.0
go.opentelemetry.io/build-tools/chloggen v0.15.0
go.opentelemetry.io/build-tools/crosslink v0.15.0
go.opentelemetry.io/build-tools/crosslink v0.16.0
go.opentelemetry.io/build-tools/issuegenerator v0.15.0
go.opentelemetry.io/build-tools/multimod v0.15.0
go.opentelemetry.io/collector/cmd/builder v0.117.0
Expand Down Expand Up @@ -233,7 +233,7 @@ require (
gitlab.com/bosi/decorder v0.4.2 // indirect
go-simpler.org/musttag v0.13.0 // indirect
go-simpler.org/sloglint v0.7.2 // indirect
go.opentelemetry.io/build-tools v0.15.0 // indirect
go.opentelemetry.io/build-tools v0.16.0 // indirect
go.opentelemetry.io/collector/component v0.117.0 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.117.0 // indirect
go.opentelemetry.io/collector/confmap v1.23.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions internal/tools/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading