---
title: "Fission: scale from zero on Kubernetes in Go | VulCode"
description: "In Fission we fixed a 500 after scaling a function up from zero: the executor now waits for an available replica before handing it to the router, in Go."
url: "https://vulcode.com/en/opensource/contributions/fission"
lang: "en"
---

[All contributions](https://vulcode.com/en/opensource/contributions)

fission/fission

# Fission

A serverless functions framework for Kubernetes that runs code as functions and scales them down to zero when they are idle.

[See the repository](https://github.com/fission/fission) [All contributions](https://vulcode.com/en/opensource/contributions)

- **Language**: Go
- **GitHub stars**: 8,950
- **Merged changes**: 1
- **Project site**: [fission.io](https://fission.io)

## What we changed

After scaling a function up from zero, the executor waits until the Deployment controller has observed the new spec and the replica is available, so the router no longer gets a Service without endpoints and no longer returns a 500.

### What this work shows

- Kubernetes Deployments and controllers

- Scale-from-zero race conditions

- Error classification in Go with errors.Is

What was broken

### The router returned 500 after scale from zero

After scaling a function up from zero, the executor judged readiness from the status written before the scale. That status could still count the pod the idle reaper was terminating, so the router got a Service with no endpoints and returned a 500.

How we fixed it

### Waiting for a replica of the current generation

A new DeploymentAvailable check requires the controller to have observed the current spec (ObservedGeneration) and enough replicas to be available, and the newdeploy and container executors wait on it after every scale-up. A timeout on an existing deployment no longer tears it down, and tests cover a stale status and one that never catches up with the spec.

[#3725](https://github.com/fission/fission/pull/3725)

## Merged change 1

- [#3725 executor: wait for the replica after scaling a function in from zero Merged 10 November 2026](https://github.com/fission/fission/pull/3725)

## What it taught us

In Kubernetes a Deployment's status can still describe the previous generation, so readiness has to be checked through ObservedGeneration. A timeout must not tear down a deployment that is still serving traffic.

[More about this technology: Golang](https://vulcode.com/en/technologies/go)

## Other projects we write code for

- [**urfave/cli** Go · 24,329 stars A declarative Go package for building command line tools.](https://vulcode.com/en/opensource/contributions/urfave-cli)

- [**chezmoi** Go · 22,342 stars A dotfiles manager that keeps the same settings on many different machines, securely.](https://vulcode.com/en/opensource/contributions/chezmoi)

- [**goquery** Go · 14,995 stars A Go library for traversing and changing HTML documents in the style of jQuery, built on the golang.org/x/net/html parser.](https://vulcode.com/en/opensource/contributions/goquery)

- [**Ebitengine** Go · 13,647 stars A 2D game engine in Go, used in games released for computers, phones, browsers and consoles.](https://vulcode.com/en/opensource/contributions/ebiten)

- [**Concourse** Go · 7,944 stars A container-based automation system written in Go and used mostly for CI/CD. Pipelines and tasks are described in YAML files.](https://vulcode.com/en/opensource/contributions/concourse)

- [**dromara/carbon** Go · 5,225 stars A Go package for dates and times with a simple, readable API, with helpers such as the start and end of a minute, a day or a century.](https://vulcode.com/en/opensource/contributions/dromara-carbon)

## Describe your project.

A free quote comes back within an hour during working hours.

### Rather skip the form?

Ask in the chat or write to us directly.

Open the chat

- **Email**: [hello@vulcode.com](mailto:hello@vulcode.com)
- **Phone**: [+48 576 043 920](tel:+48576043920)
- **Discord**: [discord.gg/vulcode](https://discord.gg/vulcode)
