Skip to content

Cannot delete repository if corresponding VCS repository has been deleted. #5140

Open
@flyingfishflash

Description

@flyingfishflash

Component

server

Describe the bug

v3.5.2

I am trying to delete a repository for which the corresponding VCS repo has been deleted.

When I go to repositories -> {repository} -> actions -> delete repository

The server responds with a http 500 error.

it logs this to the console:

Apr 30 08:37:51 nas woodpecker-ci-app[5742]: 12:37PM ERR error="Error #01: The target couldn't be found.\n" ip=xxx.xxx.xxx.xxx latency=64.931237 method=DELETE path=/api/repos/3 status=500 user-agent="Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0"

Steps to reproduce

delete a repository in your vcs that also has a corresponding repo record in woodpecker, then try and delete the woodpecker repo record.

Expected behavior

When deleting a repository, if the corresponding VCS repo is not found, this should be handled effectively.

woodpecker repo records should be deleted even if VCS repo is not present.

System Info

v3.5.2

Additional context

No response

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/versions]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingserver

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions