Skip to content

Synapse Runtime Kubernetes generates Job names exceeding K8s 63-character label limit #558

@SonaThaj

Description

@SonaThaj

I tried this:

Tried executing a workflow with a slightly longer name(31 characters) than normal. The workflow execution remained stuck at Pending status indefinitely. No error messages were displayed in the Synapse UI, and the workflow appeared to be queued but never progressed. Only by examining the Synapse Operator logs we could discover the root cause.

This happened:

Workflow execution failed. Synapse Runtime attempted to create a Kubernetes Job but received a 422 UnprocessableEntity error:

k8s.Autorest.HttpOperationException: Operation returned an invalid status code 'UnprocessableEntity', 
response body {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure",
"message":"Job.batch \"f*******-m*****-c********-c*****-2d94fbe5650c.default-ae1ab5a9c150\" is invalid: 
spec.template.labels: Invalid value: \"f*******-m*****-c********-c*****-2d94fbe5650c.default-ae1ab5a9c150\": 
must be no more than 63 characters","reason":"Invalid","code":422}

The generated Job name f*******-m*****-c********-c*****-2d94fbe5650c.default-ae1ab5a9c150 is 68 characters, exceeding Kubernetes' 63-character limit for label values.

I expected this:

Synapse Runtime should either:

  1. Automatically truncate/hash workflow names to fit within Kubernetes label constraints
  2. Validate workflow names at creation time and reject names that would exceed limits
  3. Generate Job names using a pattern that guarantees compliance (e.g., hash-based naming)

The workflow should execute successfully without manual name shortening.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions