Peter Bočan
unread,Feb 20, 2024, 5:07:24 AMFeb 20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Hello Gophers!
I am facing a very odd issue. I have recently joined a company and wrote a small database migration binary which is co-located in the same github repo as the service which database migrations it.
For whatever reason the DB migration binary, when it runs on the cluster, it manages to connect to AWS SQS and consume messages from a queue, however I don't see any direct and indirect dependency on the package which implements the SQS connectivity.
The service (the repo in which the binary is located) does consume the SQS package. Just to be clear, we have a "utils" repo (yeaaaaahhhh, I know.) which contains all the fun bits among which is this SQS client library.
service (repo) -> utils (repo)
migrations (binary) -> utils (repo) but only uses the database package.
The migrations binary is compiled from the repo root directory: go build cmd/migrations/main.go
I am fairly dumbfounded and have a very hard time tracking the dependency (initialization) order. On the upside there are no relevant "init" functions.
Is there a way to debug this? Is there a way to step over the initialisation order?
Cheers,
Peter.