You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deleting a git token that pipeline stages use leaves the stages broken with an opaque error #8850
DELETE /api/v1/teams/:teamId/git/tokens/:tokenId deletes a token even when git-repository pipeline stages use it. The foreign key is ON DELETE SET NULL, so the stages are kept with no token and every later push or pull fails with a message that does not say why.
Steps to reproduce
Create a git token and a pipeline stage that uses it (PUT /api/v1/pipelines/:id/stages/:stageId with gitTokenId).
Delete the token. The response is 200.
Fetch the stage: gitRepo.gitTokenId is now "". Trigger a deploy or pull on the stage.
Expected
Either the delete is refused with a 409 naming the pipelines that use the token, or the stage is marked clearly as having no token, and the push or pull error says the git token is missing.
Actual
PipelineStageGitRepo.deploy and .pull read gitToken.token from a null token inside their try block, so the stage ends in status error with the message Cannot read properties of null (reading 'token'). The UI shows that text.
Activity