appwrite / appwrite/console

[Functions] Removing all deployments when there exists at least one active deployment with pending deployments results in an "orphan function"

Open
#2,576 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Svelte
Stars
393
Forks
260
Avg merge
6h 53m
Merged PRs (30d)
24

Description

### 👟 Reproduction steps

1. Create a function manually

Image

2. Wait for it to build
Image

3. If we delete the deployment, when there is only one deployment regardless of pending status (like building...) or active, all will be good and we will get something like this

Image

4. BUT IF WE DELETE ALL DEPLOYMENT when there is more than one deployments, like this (including pending ones like the those with "Building / Waiting / etc" status:

Image

5. ... we will get a 404 error page, and ended up with orphaned functions, when we click on these functions we will get the 404 error on the specific function we choose

Image

Image

CLICKING THE FUNCTION will result in 404

Image

AND WE DON'T HAVE THE OPTION TO DELETE THESE ORPHANED FUNCTIONS

### 👍 Expected behavior

It should instead be like the case where we have no deployments yet (like the situation when we only have one deployment and we delete it)

Image

### 👎 Actual Behavior

We get a 404 error page, and ended up with orphaned functions, when we click on these functions we will get the 404 error on the specific function we choose

Image

Image

CLICKING THE FUNCTION will result in 404

Image

AND WE DON'T HAVE THE OPTION TO DELETE THESE ORPHANED FUNCTIONS

### 🎲 Appwrite version

Appwrite Cloud

### 💻 Operating system

Linux

### 🧱 Your Environment

not relevant - all the steps are via the appwrite cloud console UI

### 👀 Have you spent some time to check if this issue has been raised before?

- [x] I checked and didn't find similar issue

### 🏢 Have you read the Code of Conduct?

- [x] I have read the [Code of Conduct](https://github.com/appwrite/.github/blob/main/CODE_OF_CONDUCT.md)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.