An Airbnb booking image builds green and is missing the calendar client
The scenario
The booking image build is green. A holiday deploy starts the container, the running process, and the health port answers. The calendar client, the library that writes the host calendar, was left out of the image. Reserves fail. The build log shows tests that mocked the client, so they passed.
Model answer
What I'd say first:
I would stop the deploy. A green image that cannot write the calendar is not a booking build, and the mock tests did not prove the client is in the image.
How I'd work it:
- 1Roll back to the last image that includes the calendar client and can write a fixture hold.
- 2Confirm the running image is missing the client, not a bad host. The health port answering is the trap.
- 3Add a build check that imports the real client and writes a fixture home in a throwaway run. Mocks can stay for unit tests. They cannot be the image gate.
- 4Tell the room the holiday deploy waits on that check. We do not patch the client into a running container by hand.
How I'd explain it:
An image is the packaged filesystem the container starts from. If the client never got copied in, the process can still listen on a health port. A wrong answer is to exec in and copy the file on the live pods. The next restart loses it, and the holiday fleet drifts. The build has to contain the client.
How I'd prevent it:
The image pipeline runs a fixture reservation with the real client before it is eligible to deploy. A dependency check fails the build if the calendar library is absent. Mock tests stay in unit scope. Holiday promotion uses only images that passed the fixture.
The follow-up they'll ask
“The health check passes. Can we copy the client onto the pods and keep going?”
I would not copy the client onto the pods. That fix disappears on the next start and leaves the holiday fleet unlike the image we think we shipped. The health check only proves a port answered. I would roll back to an image that already contains the client, then rebuild with a fixture write in the pipeline. Hand patches are how a missing file becomes a mystery restart.
Common mistakes
- Trust mocked tests as proof the client is in the image
- Copy the library onto live containers
- Treat a health port as a calendar write
- Promote the image because the build job was green