Readit News logoReadit News
gui77aume commented on Testcontainers   testcontainers.com/... · Posted by u/floriangosse
PaoloBarbolini · 2 years ago
Could you provide an example?
gui77aume · 2 years ago
Legacy systems I guess, maybe cloud specific services
gui77aume commented on Testcontainers   testcontainers.com/... · Posted by u/floriangosse
dm03514 · 2 years ago
Test containers is such a game changer for integration testing, they have language specific docker apis that make it trivial to bring up containers and verify that they are fully initialized and ready to accept connections.

Pretty much every project I create now has testcontainers for integration testing :)

I setup CI so it lints, builds, unit tests then integration tests (using testcontainers)

https://github.com/turbolytics/latte/blob/main/.github/workf...

Their language bindings provide nice helper functions for common database operations (like generating a connection uri from a container user)

https://github.com/turbolytics/latte/blob/main/internal/sour...

I use them in $day job use them in side projects use them everywhere :)

gui77aume · 2 years ago
If you are testing a microservices "ball of mud", you can (and probably should) setup a testing environment and do your integration tests right there, against real dependencies. The tool seems nice for simple dependencies and local testing but I fail to see it as a game changer.
gui77aume commented on Companies embracing SMS for account logins should be blamed for SIM-swap attacks   keydiscussions.com/2024/0... · Posted by u/spenvo
gui77aume · 2 years ago
Would it make it better if it was the other way around? If user would send the ramdom code to the authenticating entity by SMS?
gui77aume commented on AWS us-east-1 down    · Posted by u/rurp
impulser_ · 3 years ago
Why does everyone keep deploying their products to this one region when it always seems like the one that fails?

We don't use big cloud were I work, so maybe I'm missing something. Does East-1 offer something other don't?

gui77aume · 3 years ago
It has the best latency from Chile and I think from other countries of South America
gui77aume commented on Optimizing Docker image size and why it matters   contains.dev/blog/optimiz... · Posted by u/swazzy
gui77aume · 4 years ago
For Java, JIB on distroless works pretty well. It's small, fast and secure.

- https://github.com/GoogleContainerTools/jib

- https://github.com/GoogleContainerTools/distroless

gui77aume commented on Optimizing Docker image size and why it matters   contains.dev/blog/optimiz... · Posted by u/swazzy
yjftsjthsd-h · 4 years ago
Doesn't that only work if you used the exact same base? If I build 2 images from debian:11 but one of them used debian:11 last month and one uses debian:11 today, I thought they end up not sharing a base layer because they're resolving debian:11 to different hashes and actually using the base image by exact image ID.
gui77aume · 4 years ago
Indeed. But the old debian and the new debian images may have a common layer.
gui77aume commented on Container security best practices: Ultimate guide   sysdig.com/blog/container... · Posted by u/knoxa2511
dilyevsky · 4 years ago
They are actually even worse for latency sensitive workload because cfs with 100ms default period will cause crap tail latency (especially for multithreaded processes such as most go programs)
gui77aume · 4 years ago
Interesting. It's my impression too. I understand that CPU limit will artificially throttle CPU, when not necessarily needed, wasting CPU cycles I could use. (Java programs in my case but I imagine it's comparable to Go ones)

Do you recommend to disable CPU limit? In the general case.

gui77aume commented on Container security best practices: Ultimate guide   sysdig.com/blog/container... · Posted by u/knoxa2511
gui77aume · 4 years ago
I'm always a bit confused about the CPU limit (for the pod), some guides (and tools) advice to always set one, but this one [0] doesn't. Ops people I worked with almost always want to lower that limit and I have to insist for raising it (no way they disable it). Is there an ultimate best practice for that?

[0] https://learnk8s.io/production-best-practices

gui77aume commented on My Logging Best Practices (2020)   tuhrig.de/my-logging-best... · Posted by u/isaacfrond
gui77aume · 4 years ago
Two more points:

- Always log errors

- Don't log errors twice (log or rethrow)

gui77aume commented on Temporal: Getting started with JavaScript's new date time API   2ality.com/2021/06/tempor... · Posted by u/Amorymeltzer
raxxorrax · 5 years ago
Didn't find to much info on arithmetic support, although it is mentioned.

However, I hate working with dates because many APIs make question about dates a slog.

Consider the following for the poor people on the dark side of the planet (UTC + something). If any application only saves the date and not the time and you have dates like 2021-06-28T00:00:00 or something like that.

Now it gets saved in a DB as 2021-06-27Z23:00:00, because the user lives in UTC+1-land. It is correct but makes my blood boil and propably causes a lot of errors, even in apps that set their time zone correctly. How often have I seen implementations that just /(.*)T.*/ match the date and create a bug.

I have no solution for this, but I wasted too much time on problems like this. Such errors also notoriously evade unit tests...

This seems decent from a quick look. But let us be honest, it has to compete with moment.js, not with Date().

gui77aume · 5 years ago
I had better luck with date-fns than with moment.js, from Chile perspective, better daylight saving time handling.

u/gui77aume

KarmaCake day25September 20, 2017View Original