---
title: "Son Luong Ngoc (@sluongng) | Hashnode"
description: "DevEx / SRE. Read the latest articles by Son Luong Ngoc on Hashnode."
url: "https://hashnode.com/@sluongng"
---

@sluongng

# Son Luong Ngoc

@sluongng · Netherlands · Joined July 2022

DevEx / SRE

## Comments

[Thanks for reading! The Build Graph I described in this article is a higher level concept for build tools in general. This concept ranges between different tools (Bazel, Bucks, Pants, or even Make) that describe dependencies relationship between build artifacts. Target Graph and Action Graph are technical implementation details that are specific to Bazel that I intentionally left out from this artifcle. The intended audience for this artifcle is beginner users, technical (engineers) or non-technical (PM, C-level execs) so I tried to stir away from implementation details. The final goal is to get more people to understand the general concept of Bazel and thus, increase adoption of the tool. The core differences between Target Graph and Action Graph are the "config hydration": where Bazel took Target Graph and fully resolve all the build time configs and solve all the constraints inside Target Graph to generate Action Graph for execution. To dive into these concepts, we need to dive into how Bazel could augment the Graph with different configs, which I find to be a more advance concept that beginners could make do without knowing about. Perhaps sometime in the future, we could increase the resolution and dive into these concepts a bit deeper.](https://hashnode.com/posts/bazel-caching-explained-pt-1-how-bazel-works/62cb17ebbffc4694f5bc542a/comment/6317a4f8961d2507e75fc4b9#reply-631860a36b34d71380da9f11)

Reply · Article · Sep 7, 2022 · [Bazel Caching Explained (pt. 1): How Bazel Works](https://hashnode.com/posts/bazel-caching-explained-pt-1-how-bazel-works/62cb17ebbffc4694f5bc542a)

[Thanks for reading! Depends on the business, CI could means different things. There are businesses, like one of my former employers, who do very little to no testing. So CI in those cases would be simply building artifacts and making sure your code compile. For others, it could range between compile and various kind of automated tests: pre-merge, post-merge, e2e, etc... Artifacts is specify here as not every deployments is container image based. For example: building a custom RPM to release via systemd over baremetal, or a new rom to flash onto custom chips. Artifacts stage for me encompass the build and stamp of code, resulting in various kind of artifacts to be stored in an artifact store. There, additional validation could be done before deployment is triggered automatically on-demand, on-schedule or semi-manual triggered. Again, these could be present in some businesses and not others. The general idea is that you should invest more effort in understanding how your funnel looks like, what is the conversion rate between stages and where / how to invest to unblock engineers.](https://hashnode.com/posts/bazel-in-ci-part-0-the-developer-experience-funnel/62f0e1c2dfc2b15565886204/comment/6311907956df9e8e5025e5ef#reply-63185e2e5abe8613b3d2d3f6)

Reply · Article · Sep 7, 2022 · [Bazel in CI (Part 0): The Developer Experience Funnel](https://hashnode.com/posts/bazel-in-ci-part-0-the-developer-experience-funnel/62f0e1c2dfc2b15565886204)

[I have a few notes to add to this: In my experience, Bazel OOM is far trickier than it should be. I reported in https://github.com/bazelbuild/bazel/issues/15959 an issue where Bazel JVM could run into OOM... slowly. When that happen, Bazel JVM does not get killed, but instead, get stuck in a deadlock until you manually kill the JVM process. Instead of relying on bazel info | grep heap, you could track JVM memory data via BES with --memory-profile flag. A great mitigation I use is to regularly(weekly / daily) shutdown Bazel JVM with bazel shutdown and perform a clean build to start up a new JVM process to avoid any long-term memory leak issues. This bought us a lot of time to delay the troubleshooting of Bazel's internal memory. experimental\_local\_memory\_estimate is actually no-op in Bazel latest code base. See https://cs.opensource.google/bazel/bazel/+/361ce673ad2b959b73e859a121ff2e996feb561b The downside of using exec\_properties is that you could only set resource constraint per mnemonic via rule definition. These value are hard set, so if you have a small binary A and a big binary B being built using the same rules, both will get the same amount of resources(CPU and RAM). In Bazel 5.3, there is a new change that would allow you to define a starlark function that would adjust resources consumption of each action dynamically, allow Bazel to be smarter about action scheduling.](https://hashnode.com/posts/bazel-oom/6301358174730d13020f311e/comment/630499183f9519428ccea97e)

Comment · Article · Aug 23, 2022 · [Fixing Bazel out-of-memory problems](https://hashnode.com/posts/bazel-oom/6301358174730d13020f311e)
