Skip to content

Git-only pipeline stage update returns 200 and changes nothing #8584

Closed

Description

@cstns

PUT /api/v1/pipelines/:pipelineId/stages/:stageId accepts git settings, returns 200, and silently ignores them unless the body also carries one of instanceId, deviceId or deviceGroupId. The git fields are only applied inside the rebinding branch, which those keys trigger.

Reproduced with two payloads differing only by a blank deviceGroupId:

PUT .../stages/:id  {"gitTokenId":"...","url":".../CHANGED.git","branch":"develop",...}
200, and the stage still reads url=".../repo.git" branch="main"

PUT .../stages/:id  {"gitTokenId":"...","url":".../CHANGED.git","branch":"develop",..., "deviceGroupId":""}
200, and the stage now reads url=".../CHANGED.git" branch="develop"

The frontend doesn't hit this because it always sends a null deviceGroupId (AJV coerces it to ''), which lands in the rebinding branch by accident. Any other caller sending only git fields gets a success response for an update that never happened.

Might be worth applying git settings whenever gitTokenId is present, independently of the rebinding keys.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiWork on the platform APItype:bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions