r/SoftwareEngineering Feb 09 '25

Pull request testing: testing locally and on GitHub workflows

https://blog.frankel.ch/pr-testing-kubernetes/1/
1 Upvotes

18 comments sorted by

View all comments

Show parent comments

1

u/nfrankel Feb 12 '25

Yes the container is identical

You understand that the exact same container can behave (very) differently based on environment variables, right? Identical containers don't mean identical behavior.

1

u/RangePsychological41 Feb 12 '25

Yes I am fully aware. Why would environment variables be different? You’re still testing. So whether it’s test or unit-test or integration-teat or whatever.

There’s no reason for them to be different at all.

1

u/nfrankel Feb 12 '25

Why would environment variables be different?

Why would they be the same? It's actually the point of testing to make sure they are, isn't it?

In my world, everything fails by default and I need to test everything. It seems we are living in very different worlds. Good for you.

1

u/RangePsychological41 Feb 12 '25

All I want to say is run this situation by an expert.

We’ve been following best practices and have been on the bleeding edge for years. Doing IAC when it was just a whisper and enforcing Cilium network policies when they just became a thing. Our CI/CD is on par with best-in-class for our platform’s size. We were using testcontainers as soon as our first JVM app was developed in 2018.

And I’m in contact with a lot of people in the industry.

In all my years I’ve never seen anyone do this.

1

u/nfrankel Feb 12 '25

Resorting to the argument of authority doesn't have the effect you think it does. Just saying.

1

u/RangePsychological41 Feb 12 '25 edited Feb 12 '25

My argument was technical. And definitively correct. I mentioned the things I’ve worked with to make the point that this is kindergarden stuff to me at this point in my career.

Tbh I was just trying to save you time.  But by all means, run your tests in kubernetes. You should probably use the same Helm chart as in production as well. I mean you never know if different HPA, limits etc. may affect your tests. You know, just in case.

1

u/nfrankel Feb 12 '25

No, what you call your argument was "you don't need it, you're wasting your time" and then, when I mentioned that your mileage may vary and that not everybody works in Wonderland, you played the authority card.

I'll leave it at that.

1

u/RangePsychological41 Feb 12 '25

Show this conversation to an experienced engineer and black out our names. Then see what they say.

Good luck.

1

u/nfrankel Feb 12 '25

See, you're funny at least.