Commit 7431eaa
committed
Modernize: Go modules + libbeat v7.17.29, and full SDLC/CI hygiene (#2)
* Migrate from glide/GOPATH vendoring to Go modules
Replace the abandoned glide + libbeat-Makefile vendoring with a
standard Go module targeting Go 1.26 and Elastic libbeat v7.17.29
(the last maintained v7 line, keeping the libbeat/... import paths).
Dependency notes:
- Mirror elastic/beats' own replace directives into go.mod; Go modules
do not apply a dependency's replaces transitively, so consumers of
libbeat must copy them (Shopify/sarama, fsnotify, gopacket, etc.).
- Pin txn2/rxtx to v1.3.2 (the exact prod revision) to preserve the
rtq.MessageBatch wire format. Pin its 2018-era transitive deps
coreos/bbolt and satori/go.uuid to the commits prod ran, since the
newer tags renamed the bbolt package and changed uuid.NewV4's
signature, breaking rtq's source under modern MVS.
libbeat v7.17 API drift:
- beat.ClientConfig.ACKCount removed; use acker.RawCounting.
- cmd.GenRootCmd removed; use GenRootCmdWithSettings + instance.Settings.
- logp.Error removed; route the unmarshal error to the zap logger.
Housekeeping in the same pass:
- io/ioutil -> io, fix the lost context cancel in shutdown.
- Guard main_test.go flag lookups against nil (test flags register
lazily on modern Go, which panicked at init()).
Build, vet, and tests pass; binary reports libbeat 7.17.29.
* Add modern SDLC and project hygiene
Bring rtbeat in line with the txn2/kubefwd and mcp-data-platform
conventions, replacing the abandoned beats/Travis tooling.
CI/CD (GitHub Actions, all action refs SHA-pinned):
- ci.yml: lint (golangci-lint v2.12.1), test matrix (ubuntu+macos,
-race + coverage to Codecov), build + goreleaser check.
- release.yml: GoReleaser v2 on tag push — Cosign keyless signing,
SBOMs, multi-arch Docker, SLSA provenance.
- codeql.yml, scorecard.yml, docs.yml (MkDocs to GitHub Pages),
dependabot.yml.
Tooling/config:
- .golangci.yml (v2) with a clean lint baseline; fixed the findings in
beater/rtbeat.go (errcheck, gocritic, ineffassign, revive, staticcheck).
- Makefile: `make verify` mirrors CI (go-version + tidy-check + lint +
test + validate-actions); auto-installs the pinned linter to .tools/.
- scripts/validate-action-shas.sh enforces SHA-pinned actions.
- .goreleaser.yml rewritten to v2 (static CGO-free builds, version
stamped into libbeat/version); modern multi-arch Dockerfile replaces
the per-arch dockerfiles/.
- codecov.yml, .gitignore updates; stop tracking the libbeat runtime
data/meta.json.
Docs & community:
- SECURITY.md, CODE_OF_CONDUCT.md, CONTRIBUTING.md, CHANGELOG.md,
CLAUDE.md, CODEOWNERS, issue/PR templates.
- MkDocs site (mkdocs.yml + docs/) and a modernized README.
Retired: .travis.yml, the libbeat-generated Makefile, glide-era and
per-arch Docker tooling.
make verify passes; mkdocs build --strict passes.
* Harden deps from adversarial review
Two fixes surfaced by an adversarial review of the modernization:
- go.mod: mirror the full 15-directive replace block from
elastic/beats/v7@v7.17.29 (previously only 7). We import few libbeat
packages today, but keeping the complete upstream set means a future
dependency bump that pulls in more of beats won't break against a
fork-expecting package (e.g. docker/docker => docker/engine).
- .goreleaser.yml: document that `brews:` is valid on the CI-pinned
goreleaser line (~> v2.13) but deprecated as of v2.16, so the key must
be migrated before bumping the goreleaser-action pin.
make verify passes; binary still reports libbeat 7.17.29.1 parent c80bc1c commit 7431eaa
24,128 files changed
Lines changed: 3266 additions & 6810543 deletions
File tree
- .github
- ISSUE_TEMPLATE
- workflows
- beater
- cmd
- data
- dockerfiles
- amd64
- arm32v6
- docs
- scripts
- vendor/github.com
- DataDog/zstd
- .github
- Microsoft/go-winio
- archive/tar
- testdata
- backuptar
- vhd
- wim
- lzx
- validate
- Shopify/sarama
- .github
- examples
- http_server
- mocks
- tools
- kafka-console-consumer
- kafka-console-partitionconsumer
- kafka-console-producer
- vagrant
- StackExchange/wmi
- beorn7/perks
- histogram
- quantile
- topk
- coreos/bbolt
- cmd/bolt
- davecgh/go-spew
- spew
- testdata
- docker
- distribution
- cmd
- digest
- registry-api-descriptor-template
- registry
- configuration
- context
- contrib
- apache
- compose
- nginx
- docker-integration
- malevolent-certs
- nginx
- v1
- tokenserver-oauth
- certs
- tokenserver
- certs
- token-server
- digestset
- docs
- spec
- auth
- images
- health
- api
- checks
- manifest
- manifestlist
- ocischema
- schema1
- schema2
- metrics
- notifications
- project
- dev-image
- hooks
- reference
- registry
- api
- errcode
- v2
- auth
- htpasswd
- silly
- token
- client
- auth
- challenge
- transport
- handlers
- listener
- middleware
- registry
- repository
- proxy
- scheduler
- storage
- cache
- cachecheck
- memory
- redis
- driver
- azure
- base
- factory
- filesystem
- gcs
- inmemory
- middleware
- cloudfront
- redirect
- oss
- s3-aws
- swift
- testdriver
- testsuites
- releases
- script
- setup
- validate
- testutil
- uuid
- vendor
- github.com
- Azure
- azure-sdk-for-go
- storage
- version
- go-autorest
- autorest
- adal
- azure
- date
- aws/aws-sdk-go
- aws
- awserr
- awsutil
- client
- metadata
- corehandlers
- credentials
- ec2rolecreds
- endpointcreds
- stscreds
- csm
- defaults
- ec2metadata
- endpoints
- request
- session
- signer/v4
- internal
- sdkio
- sdkrand
- sdkuri
- private
- protocol
- eventstream
- eventstreamapi
- query
- queryutil
- restxml
- rest
- xml/xmlutil
- service
- cloudfront/sign
- s3
- sts
- beorn7/perks
- quantile
- bshuster-repo/logrus-logstash-hook
- bugsnag
- bugsnag-go
- errors
- osext
- panicwrap
- denverdino/aliyungo
- common
- oss
- util
- dgrijalva/jwt-go
- docker
- go-metrics
- libtrust
- garyburd/redigo
- internal
- redis
- go-ini/ini
- golang/protobuf
- proto
- gorilla
- handlers
- mux
- inconshreveable/mousetrap
- jmespath/go-jmespath
- marstr/guid
- matttproud/golang_protobuf_extensions
- pbutil
- miekg/dns
- mitchellh/mapstructure
- ncw/swift
- swifttest
- opencontainers
- go-digest
- image-spec
- specs-go
- v1
- prometheus
- client_golang
- prometheus
- promhttp
- client_model
- go
- common
- expfmt
- internal/bitbucket.org/ww/goautoneg
- model
- procfs
- internal/util
- nfs
- xfs
- satori/go.uuid
- sirupsen/logrus
- spf13
- cobra
- pflag
- xenolf/lego
- acme
- yvasiyarov
- go-metrics
- gorelic
- newrelic_platform_go
- golang.org/x
- crypto
- bcrypt
- blowfish
- ocsp
- otr
- net
- context
- ctxhttp
- http2
- hpack
- internal/timeseries
- publicsuffix
- trace
- oauth2
- google
- internal
- jws
- jwt
- time
- rate
- google.golang.org
- api
- gensupport
- googleapi
- internal/uritemplates
- storage/v1
- appengine
- internal
- app_identity
- base
- datastore
- log
- modules
- remote_api
- urlfetch
- urlfetch
- cloud
- compute/metadata
- internal
- opts
- storage
- grpc
- codes
- credentials
- grpclog
- internal
- metadata
- naming
- peer
- transport
- gopkg.in
- check.v1
- square/go-jose.v1
- cipher
- json
- yaml.v2
- rsc.io/letsencrypt
- version
- docker
- .github
- api
- server
- backend/build
- httputils
- middleware
- router
- build
- checkpoint
- container
- debug
- distribution
- image
- network
- plugin
- session
- swarm
- system
- volume
- templates/server
- types
- backend
- blkiodev
- container
- events
- filters
- image
- mount
- network
- plugins/logdriver
- registry
- strslice
- swarm
- runtime
- time
- versions
- v1p19
- v1p20
- volume
- builder
- builder-next
- adapters
- containerimage
- snapshot
- exporter
- imagerefchecker
- worker
- dockerfile
- dockerignore
- fscache
- remotecontext
- git
- client
- testdata
- cli
- config
- debug
- cmd/dockerd
- hack
- container
- stream
- contrib
- apparmor
- desktop-integration
- chromium
- gparted
- docker-device-tool
- gitdm
- httpserver
- init
- openrc
- systemd
- sysvinit-debian
- sysvinit-redhat
- upstart
- mkimage
- nnp-test
- syntax
- nano
- textmate
- Docker.tmbundle
- Preferences
- Syntaxes
- vim
- doc
- ftdetect
- syntax
- syscall-test
- udev
- vagrant-docker
- daemon
- caps
- cluster
- controllers/plugin
- convert
- executor
- container
- provider
- config
- discovery
- events
- testutils
- exec
- graphdriver
- aufs
- btrfs
- copy
- devmapper
- graphtest
- lcow
- overlay2
- overlayutils
- overlay
- quota
- register
- vfs
- windows
- zfs
- images
- initlayer
- links
- listeners
- logger
- awslogs
- etwlogs
- fluentd
- gcplogs
- gelf
- journald
- jsonfilelog
- jsonlog
- local
- logentries
- loggerutils
- splunk
- syslog
- templates
- names
- network
- stats
- testdata
- distribution
- fixtures/validate_manifest
- metadata
- utils
- xfer
- dockerversion
- docs
- api
- contributing
- images
- static_files
- errdefs
- hack
- ci
- dockerfile/install
- integration-cli-on-swarm
- agent
- master
- types
- vendor/github.com/bfirsh/funker-go
- worker
- host
- make
- .resources-windows
- test
- validate
- image
- cache
- spec
- tarexport
- v1
- integration-cli
- checker
- cli
- build
- daemon
- environment
- fixtures
- auth
- credentialspecs
- https
- registry
- requirement
- testdata
- integration
- build
- config
- container
- image
- internal
- container
- network
- requirement
- swarm
- network
- ipvlan
- macvlan
- plugin
- authz
- common
- graphdriver
- logging
- cmd
- close_on_start
- dummy
- volumes
- cmd
- dummy
- secret
- service
- session
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
0 commit comments