From 97c4d6cc6c0233fb79c671c865b127478cd731b4 Mon Sep 17 00:00:00 2001 From: davdhacs <105243888+davdhacs@users.noreply.github.com> Date: Mon, 23 Feb 2026 14:59:24 -0700 Subject: [PATCH] refactor(tools): extract tools/retest into independent Go module tools/retest only depends on go-github and has no imports from the main stackrox module. Making it a standalone module means: - Its go.sum only contains 6 dependencies instead of the full monorepo's - The setup-go cache key in retest_periodic.yml is now based on this small go.sum, so it only invalidates when go-github is updated rather than on every repo-wide dependency bump - Removes go-github/v60 from the root go.mod (no other code uses it) Update retest_periodic.yml to use tools/retest/go.mod for Go version and tools/retest/go.sum for cache-dependency-path. Partially generated by AI. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/retest_periodic.yml | 3 ++- go.mod | 1 - go.sum | 2 -- tools/retest/go.mod | 15 +++++++++++++++ tools/retest/go.sum | 18 ++++++++++++++++++ 5 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 tools/retest/go.mod create mode 100644 tools/retest/go.sum diff --git a/.github/workflows/retest_periodic.yml b/.github/workflows/retest_periodic.yml index ae15f50e59843..c05d1991186cb 100644 --- a/.github/workflows/retest_periodic.yml +++ b/.github/workflows/retest_periodic.yml @@ -22,7 +22,8 @@ jobs: - name: Setup Go environment uses: actions/setup-go@v6 with: - go-version-file: go.mod + go-version-file: tools/retest/go.mod + cache-dependency-path: tools/retest/go.sum - name: Retest env: diff --git a/go.mod b/go.mod index 68c830878e785..c057bfb725ba5 100644 --- a/go.mod +++ b/go.mod @@ -60,7 +60,6 @@ require ( github.com/google/gnostic-models v0.7.1 github.com/google/go-cmp v0.7.0 github.com/google/go-containerregistry v0.20.7 - github.com/google/go-github/v60 v60.0.0 github.com/google/uuid v1.6.0 github.com/googleapis/gax-go/v2 v2.18.0 github.com/gorilla/schema v1.4.1 diff --git a/go.sum b/go.sum index fb44d6f230347..ceb157d7dfe05 100644 --- a/go.sum +++ b/go.sum @@ -798,8 +798,6 @@ github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX github.com/google/go-containerregistry v0.20.7 h1:24VGNpS0IwrOZ2ms2P1QE3Xa5X9p4phx0aUgzYzHW6I= github.com/google/go-containerregistry v0.20.7/go.mod h1:Lx5LCZQjLH1QBaMPeGwsME9biPeo1lPx6lbGj/UmzgM= github.com/google/go-github/v32 v32.1.0/go.mod h1:rIEpZD9CTDQwDK9GDrtMTycQNA4JU3qBsCizh3q2WCI= -github.com/google/go-github/v60 v60.0.0 h1:oLG98PsLauFvvu4D/YPxq374jhSxFYdzQGNCyONLfn8= -github.com/google/go-github/v60 v60.0.0/go.mod h1:ByhX2dP9XT9o/ll2yXAu2VD8l5eNVg8hD4Cr0S/LmQk= github.com/google/go-github/v73 v73.0.0 h1:aR+Utnh+Y4mMkS+2qLQwcQ/cF9mOTpdwnzlaw//rG24= github.com/google/go-github/v73 v73.0.0/go.mod h1:fa6w8+/V+edSU0muqdhCVY7Beh1M8F1IlQPZIANKIYw= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= diff --git a/tools/retest/go.mod b/tools/retest/go.mod new file mode 100644 index 0000000000000..e58c5dd40ed12 --- /dev/null +++ b/tools/retest/go.mod @@ -0,0 +1,15 @@ +module github.com/stackrox/rox/tools/retest + +go 1.25.0 + +require ( + github.com/google/go-github/v60 v60.0.0 + github.com/stretchr/testify v1.11.1 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/google/go-querystring v1.1.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/tools/retest/go.sum b/tools/retest/go.sum new file mode 100644 index 0000000000000..8ec80d7a0a352 --- /dev/null +++ b/tools/retest/go.sum @@ -0,0 +1,18 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-github/v60 v60.0.0 h1:oLG98PsLauFvvu4D/YPxq374jhSxFYdzQGNCyONLfn8= +github.com/google/go-github/v60 v60.0.0/go.mod h1:ByhX2dP9XT9o/ll2yXAu2VD8l5eNVg8hD4Cr0S/LmQk= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=