Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to delete project using API when run is in "running" state #402

Closed
xerrni opened this issue Feb 23, 2022 · 5 comments
Closed

Unable to delete project using API when run is in "running" state #402

xerrni opened this issue Feb 23, 2022 · 5 comments
Milestone

Comments

@xerrni
Copy link
Contributor

xerrni commented Feb 23, 2022

Issue:

I'm unable to delete project using REST API using:

curl -L -X DELETE 'localhost:8080/api/projects/UUID/' -H 'Content-Type: application/json'

Response:

<!doctype html>
<html lang="en">
<head>
  <title>Server Error (500)</title>
</head>
<body>
  <h1>Server Error (500)</h1><p></p>
</body>
</html>

Steps to reproduce:

export URL="http://localhost:8080/api/projects/";
curl -L -X POST "${URL}"  \
        -H "Content-Type: application/json"  \
        -d '{ "name": "test", "input_urls": 
        "https:/curl/curl/releases/download/curl-7_81_0/curl-7.81.0.tar.gz",
        "pipeline": "scan_codebase", "execute_now": "true"}' | jq ".uuid" -e > uuid && \
        sleep 10 && curl "${URL}?format=json" |\
        jq '.results[] | select(.name == "test") | select(.runs[0].status == "running")' -e && \
        curl -L -X DELETE "${URL}$(cat uuid | sed 's/\"//g')/"  \
        -H "Content-Type: application/json"
@pombredanne
Copy link
Contributor

Thank for the report. This should not happen indeed.

@xerrni
Copy link
Contributor Author

xerrni commented Feb 23, 2022

It also happens when I try to do it using web UI API (browser)

@pombredanne
Copy link
Contributor

@xerrni are you using the HEAD of the latest main branch?

@xerrni
Copy link
Contributor Author

xerrni commented Feb 23, 2022

I'm using docker build from 20e8057

@tdruez tdruez added this to the v32.0.0 milestone Apr 4, 2022
tdruez added a commit that referenced this issue May 13, 2022
Signed-off-by: Thomas Druez <[email protected]>
tdruez added a commit that referenced this issue May 13, 2022
…s running (#439)

* Ensure project cannot be deleted in the API while a pipeline is running #402

Signed-off-by: Thomas Druez <[email protected]>
@tdruez
Copy link
Contributor

tdruez commented May 13, 2022

@xerrni Thanks for reporting. Fixed in #439

@tdruez tdruez closed this as completed May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants