5
witchDev
43d

This fucking ci/cd test keeps deleting my dB collections and I can't see what the fuck is going on. Circleci is of the devil and I won't stop fucking using it. I must crack this shit😡

Comments
  • 1
    This will sound stupid, but have you tried outputting stuff to log or something? When something weird is going on with gitlab-runner and docker I just echo almost everything so that I can see in the logs what's happening during the steps that get cleaned up and leave no trace to be analyzed.

    Admittedly I've not tried Circle Ci due to the pricing.
  • 1
    If my speculations are right (not tested yet as I moved on to another task to get back to this later and it's my co-devs bug anyway so I pushed it to him to add the proper config before I pull his branch and test) the tests are defaulting to apps dB config not the tests dB config. The server is setup to run tests by creating a test dB on the localhost. But I configured circle CI to run in a docker container which I forgot, is not and cannot be referenced as localhost so test is defaulting to nearest mongo uri which is the apps uri. It uses this to run its test and later drops the dB, as it is set up to perform. I will post an update once I properly test to confirm my speculation and also, I echod the shit out of this and still didn't realise what was happening 😂
  • 1
    @witchDev When I was trying to initially wrap my head around GitLab CI and using Docker instead of shell runners ... in my case a lot of my problems were related to incorrectly passing/setting variables (sometimes vars inside the container, sometimes when passing vars from GitLab runner to inside the container env) or incorrect assumptions about the work directories (but I blame this on myself just whaling at it instead of reading the docks first).
  • 1
    @theKarlisK I was right. After creating a cloud deployed dB and setting it in a static test config file, it solved my problem. Now it can do whatever tf it wants to do with the test dB and test accounts and I couldn't care less. Whew. Devops is shit because some errors just occur and there is no error message.
Add Comment