i am trying to merge a pr, and the ci test step keep failing with
go: updates to go.mod needed; to update it:
go mod tidy
previous steps in our ci are successfully running go mod tidy, and they also make sure there are no un-committed changes afterwards.
the test step is basically running
for d in $(go list ./...); do
go test -v $d
done
and it passes successfully on the main branch, on the PR branch on my machine, and also inside the same container image as the test step in our ci. i even executed all the previous steps in that container, in order. just to make sure there are no leftovers from previous steps that mess things up. but i couldn't reproduce the problem anywhere except for the build pipeline.
i tried to debug it, and added go mod tidy as well as git status inside the test loop. as expected - the tidy did nothing, and the status showed no file was changed. but the tests do pass this way.
i really don't understand this issue. has anyone encountered anything similar, and can help shed some light on the cause for this problem?
i will happily give any required details to anybody who is willing to help me.
thanks in advance.