Skip to main content

The Great Tiltfile Migration: A Comedy of Errors

Β· 3 min read

Or: How I Created a Museum for a Single File

The story of how a single Tiltfile ended up with its own dedicated directory structure, complete with documentation and a .gitkeep file. A masterclass in architectural over-engineering for the simplest possible use case.

The Setup​

Picture this: You're a developer. You have a Tiltfile. It's a single file. Where do you put it?

If you're a normal person, you put it in the root directory. If you're me, you create an entire architectural monument to house this precious artifact.

The Architecture​

Behold, the masterpiece that was platform/infra/tilt/:

platform/infra/tilt/
β”œβ”€β”€ Tiltfile # The actual useful thing
β”œβ”€β”€ FDD.md # Because we need to document why we moved a file
└── .gitkeep # The cherry on top of this architectural disaster

Three files. THREE. WHOLE. FILES.

It's like creating a whole museum wing to display a single spoon, complete with:

  • The Spoon (Tiltfile) - the thing people actually came to see
  • The Plaque (FDD.md) - explaining why this spoon deserves its own wing
  • The Security Guard (.gitkeep) - ensuring this "architecture" is preserved for posterity

The Reasoning (Or Lack Thereof)​

Why did I do this? Great question! I have absolutely no idea.

Maybe I thought:

  • "This file is too important for the root directory"
  • "It needs its own dedicated space to breathe"
  • "Future developers will thank me for this organizational clarity"

Spoiler alert: Future developers did not thank me. Future me definitely didn't thank past me.

The Comedy Gold​

The best part? The relative paths. Oh, the relative paths!

Because the Tiltfile was buried three levels deep, every path became a beautiful symphony of ../../../:

# What it should have been:
deps=['domains/mercury/backend/src']

# What it actually was:
deps=['../../../domains/mercury/backend/src']

It's like giving someone directions by saying "Go back to your childhood home, then forward to where you are now, then to the grocery store."

The Revelation​

The moment of clarity came when debugging why Tilt wasn't restarting services on code changes. The conversation went like this:

Me: "Why isn't this working?" Also Me: "Maybe the paths are wrong?" Still Me: "Wait... why is the Tiltfile in a bunker?" Finally Me: "This is comedy gold material."

The Fix​

The solution was revolutionary in its simplicity:

  1. Move Tiltfile to root
  2. Delete the entire platform/infra/tilt/ directory
  3. Update the docker-compose path from ../compose/ to platform/infra/compose/
  4. Enjoy not having to explain this architectural decision to new team members

Lessons Learned​

  1. Sometimes the simplest solution is the right solution
  2. Over-engineering can happen at any scale - even with a single file
  3. Future you will judge past you - make sure it's for good reasons
  4. Every mistake is potential standup material - waste not, want not

The Moral​

If you ever find yourself creating a dedicated directory structure for a single configuration file, ask yourself: "Am I solving a problem, or am I creating a museum exhibit?"

Because sometimes, the best architecture is no architecture at all.


This blog post is dedicated to all the developers who have ever over-engineered a simple solution and lived to laugh about it. May your Tiltfiles be in your root directories and your relative paths be short.

P.S.: The .gitkeep file was the real MVP here. It ensured that this architectural masterpiece would be preserved in git history forever, serving as a permanent reminder of this decision. That's commitment to the bit.

P.P.S.: If you're reading this and thinking "I would never do something like this," just wait. We all have our Tiltfile moments. Mine just happened to be very, very literal.