Skip to content

Fix typo: rename ActionMetadata.funtion_name → function_name (proto, backend, SDK stubs) #7558

Description

@pingsutw

Summary

There's a typo in one of our protobuf fields: funtion_name should be function_name (missing the c). It lives on the ActionMetadata message and flows through the generated code in every language, the Go backend, and the published flyteidl2 package that the Python SDK depends on.

This spans two repos: most of the work is in flyteorg/flyte (Parts 1–3), plus a small follow-up in flyteorg/flyte-sdk (Part 4). It's totally fine to do Part 4 as a second PR — see the note there.

Background

The field is defined here:

flyteidl2/workflow/run_definition.proto (around line 188)

message ActionMetadata {
  ...
  // Function name
  string funtion_name = 13;   // 👈 typo: "funtion" → "function"
  ...
}

The = 13 is the field's wire number — we keep it as 13 so this change is fully backward-compatible on the wire. We're only fixing the human-readable name.

What needs to change

1. Fix the proto (the only file you edit by hand for the IDL) — repo: flyteorg/flyte

In flyteidl2/workflow/run_definition.proto:

-  string funtion_name = 13;
+  string function_name = 13;

Leave the = 13 and the // Function name comment as-is.

2. Regenerate the code stubs (proto → Go/Python/TypeScript/Rust) — repo: flyteorg/flyte

The files under gen/ are generated — don't edit them by hand. Regenerate them:

make buf

This rewrites the generated stubs, including:

  • gen/go/flyteidl2/workflow/run_definition.pb.go — Go field FuntionNameFunctionName, getter GetFuntionName()GetFunctionName()
  • gen/python/flyteidl2/workflow/run_definition_pb2.pyi (+ _pb2.py) — Python attr funtion_namefunction_name (this is what gets published as the flyteidl2 package)
  • gen/ts/flyteidl2/workflow/run_definition_pb.ts — TypeScript funtionNamefunctionName
  • gen/rust/src/flyteidl2.workflow.rs — Rust funtion_namefunction_name

💡 Don't have the full toolchain (buf/go/uv/cargo) installed? No problem — open your PR with just the proto change, then comment /regen on the PR and CI will regenerate and commit the stubs for you.

3. Fix the backend (Go) references — repo: flyteorg/flyte

Two hand-written spots use the old generated name. In runs/service/run_service.go:

-		FuntionName: action.FunctionName,
+		FunctionName: action.FunctionName,

(around line 1534, inside actionMetadataFromModel)

-	metadata.FuntionName = action.FunctionName
+	metadata.FunctionName = action.FunctionName

(around line 1832)

Note action.FunctionName (the DB model side) is already spelled correctly — you're only renaming the generated proto symbol on the left.

4. Update the Python SDK — repo: flyteorg/flyte-sdk

flyte-sdk doesn't vendor the stubs — it depends on the published flyteidl2 package (see flyteidl2==2.0.x in its pyproject.toml) and imports from flyteidl2.workflow import run_definition_pb2.

So, once the change above is merged and a new flyteidl2 package is released:

  1. Bump the flyteidl2== pin in flyte-sdk's pyproject.toml to the version that contains the fix.
  2. Search the SDK for any reference to the old name and update it:
    grep -rn "funtion_name\|funtionName" .   # in the flyte-sdk repo
    (As of now there are no references, so this is mostly a dependency bump + a sanity grep — but please double-check, since src/flyte/remote/_condition.py imports run_definition_pb2.)

Ordering: Part 4 depends on a flyteidl2 release, which happens after the flyteorg/flyte PR merges. Open it as a separate follow-up PR against flyte-sdk. If you only want to tackle the flyteorg/flyte side, that's a complete and valuable contribution on its own — just leave a comment so someone can pick up the SDK bump.

How to verify you're done (the flyteorg/flyte side)

# 1. No occurrences of the typo anywhere:
grep -rn "funtion" . | grep -v ".git/"      # should print nothing

# 2. Backend compiles:
go build ./runs/...

CI's check-generate job also runs make buf and fails if the generated files weren't updated — so make sure the regenerated gen/ files are committed.

Acceptance criteria

In flyteorg/flyte:

  • funtion_namefunction_name in flyteidl2/workflow/run_definition.proto (field number stays 13)
  • All gen/ stubs regenerated (Go, Python, TypeScript, Rust) and committed
  • Both references in runs/service/run_service.go updated to FunctionName
  • grep -rn "funtion" . returns nothing; go build ./runs/... passes
  • Commits are signed off (git commit -s)

In flyteorg/flyte-sdk (follow-up, after a new flyteidl2 release):

  • flyteidl2== pin bumped to the version containing the fix
  • grep -rn "funtion_name\|funtionName" . returns nothing

Pointers for first-time contributors

  • Contributing guide: see CONTRIBUTING.md in the repo root.
  • The PR template will ask you to pick a changelog label — use changed.
  • Stuck on anything? Comment on this issue and a maintainer will help. 🙌

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions