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

🐛 Bug Report: Delete organization don't delete project #5588

Closed
2 tasks done
rr2-france98 opened this issue May 27, 2023 · 3 comments
Closed
2 tasks done

🐛 Bug Report: Delete organization don't delete project #5588

rr2-france98 opened this issue May 27, 2023 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@rr2-france98
Copy link

👟 Reproduction steps

  1. Create organization
  2. Create project inside
  3. Delete project

Project stay on _console_projects table and it is impossible to create a project with the same id.

👍 Expected behavior

As the message explains in the modal, the project should also be scrapped.

👎 Actual Behavior

image

🎲 Appwrite version

Version 1.3.x

💻 Operating system

Linux

🧱 Your Environment

From fresh 1.3.4 docker compose

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

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@rr2-france98 rr2-france98 added the bug Something isn't working label May 27, 2023
@joeyouss
Copy link

Hi
Your title mentions deleting an org doesn't delete project but your description says you deleted project?

If you mean the former one, please see this once: #5006

@joeyouss joeyouss added the product / console Console, UI and UX issues label May 30, 2023
@rr2-france98
Copy link
Author

Sorry yes

  1. = Delete organization

Apparently not fixed

@stnguyen90
Copy link
Contributor

I tried to reproduce this on 1.3.7 and got a Server Error as well:

image

Appwrite logs shows:

appwrite  | [Error] Timestamp: 2023-07-28T01:12:17+00:00
appwrite  | [Error] Method: POST
appwrite  | [Error] URL: /v1/projects
appwrite  | [Error] Type: Utopia\Database\Exception\Duplicate
appwrite  | [Error] Message: Duplicated document: Duplicate entry 'test' for key '_uid'
appwrite  | [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Adapter/MariaDB.php
appwrite  | [Error] Line: 619

Appwrite worker deletes logs shows:

appwrite-worker-deletes  | [notice] Starting work on (Job{v1-deletes} | ID: 50f4cd8c6fd6e66f1affd2c931a21cd3 | DeletesV1 | [{"project":{"$id":"console","$internalId":"console","name":"Appwrite","$collection":"projects","description":"Appwrite core engine","logo":"","teamId":-1,"webhooks":[],"keys":[],"platforms":[{"$collection":"platforms","name":"Localhost","type":"web","hostname":"localhost"},{"$collection":"platforms","name":"Current Host","type":"web","hostname":"8080-appwrite-integrationfor-yihjgyp4ivt.ws-us102.gitpod.io"}],"legalName":"","legalCountry":"","legalState":"","legalCity":"","legalAddress":"","legalTaxId":"","auths":{"limit":1,"duration":31536000},"authWhitelistEmails":[],"authWhitelistIPs":[]},"type":"document","document":{"name":"Personal Projects","total":1,"search":"64c315c64ad8b9cafb1d Personal Projects","prefs":[],"$id":"64c315c64ad8b9cafb1d","$internalId":"1","$createdAt":"2023-07-28T01:11:34.306+00:00","$updatedAt":"2023-07-28T01:11:34.306+00:00","$permissions":["read(\"team:64c315c64ad8b9cafb1d\")","update(\"team:64c315c64ad8b9cafb1d\/owner\")","delete(\"team:64c315c64ad8b9cafb1d\/owner\")"],"$collection":"teams"},"resource":null,"datetime":null,"hourlyUsageRetentionDatetime":null}])
appwrite-worker-deletes  | Deleting chunk #1. Found 0 documents
appwrite-worker-deletes  | Deleted 0 document by group in 0.00072121620178223 seconds
appwrite-worker-deletes  | Deleting chunk #1. Found 0 documents
appwrite-worker-deletes  | Deleted 0 document by group in 0.00039911270141602 seconds
appwrite-worker-deletes  | Deleting chunk #1. Found 0 documents
appwrite-worker-deletes  | Deleted 0 document by group in 0.00042104721069336 seconds
appwrite-worker-deletes  | Deleting chunk #1. Found 0 documents
appwrite-worker-deletes  | Deleted 0 document by group in 0.00044894218444824 seconds
appwrite-worker-deletes  | Deleting chunk #1. Found 0 documents
appwrite-worker-deletes  | Deleted 0 document by group in 0.00048184394836426 seconds
appwrite-worker-deletes  | [PDO] MySQL connection restarted
appwrite-worker-deletes  | [notice] (Job{v1-deletes} | ID: 50f4cd8c6fd6e66f1affd2c931a21cd3 | DeletesV1 | [{"project":{"$id":"console","$internalId":"console","name":"Appwrite","$collection":"projects","description":"Appwrite core engine","logo":"","teamId":-1,"webhooks":[],"keys":[],"platforms":[{"$collection":"platforms","name":"Localhost","type":"web","hostname":"localhost"},{"$collection":"platforms","name":"Current Host","type":"web","hostname":"8080-appwrite-integrationfor-yihjgyp4ivt.ws-us102.gitpod.io"}],"legalName":"","legalCountry":"","legalState":"","legalCity":"","legalAddress":"","legalTaxId":"","auths":{"limit":1,"duration":31536000},"authWhitelistEmails":[],"authWhitelistIPs":[]},"type":"document","document":{"name":"Personal Projects","total":1,"search":"64c315c64ad8b9cafb1d Personal Projects","prefs":[],"$id":"64c315c64ad8b9cafb1d","$internalId":"1","$createdAt":"2023-07-28T01:11:34.306+00:00","$updatedAt":"2023-07-28T01:11:34.306+00:00","$permissions":["read(\"team:64c315c64ad8b9cafb1d\")","update(\"team:64c315c64ad8b9cafb1d\/owner\")","delete(\"team:64c315c64ad8b9cafb1d\/owner\")"],"$collection":"teams"},"resource":null,"datetime":null,"hourlyUsageRetentionDatetime":null}]) has finished

Looking at the database, it looks like all the project tables were deleted:

image

It looks like we're just not removing the entry from the console projects table:

MariaDB [appwrite]> select * from _console_projects;
+-----+------+-------------------------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------+----------------------+------+---------+-------------+------+------+---------+-----------+--------------+------------+-----------+--------------+------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------+----------+------+---------+-----------+
| _id | _uid | _createdAt              | _updatedAt              | _permissions                                                                                                                                                                                                                                | teamInternalId | teamId               | name | region  | description | logo | url  | version | legalName | legalCountry | legalState | legalCity | legalAddress | legalTaxId | services | auths                                                                                                                                                                                                 | authProviders                                                                                                                 | platforms | webhooks | keys | domains | search    |
+-----+------+-------------------------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------+----------------------+------+---------+-------------+------+------+---------+-----------+--------------+------------+-----------+--------------+------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------+----------+------+---------+-----------+
|   1 | test | 2023-07-28 01:11:34.359 | 2023-07-28 01:11:34.359 | ["read(\"team:64c315c64ad8b9cafb1d\")","update(\"team:64c315c64ad8b9cafb1d\/owner\")","update(\"team:64c315c64ad8b9cafb1d\/developer\")","delete(\"team:64c315c64ad8b9cafb1d\/owner\")","delete(\"team:64c315c64ad8b9cafb1d\/developer\")"] | 1              | 64c315c64ad8b9cafb1d | test | default |             |      |      | 1.3.7   |           |              |            |           |              |            | {}       | {"limit":0,"maxSessions":10,"passwordHistory":0,"passwordDictionary":false,"duration":31536000,"emailPassword":true,"usersAuthMagicURL":true,"anonymous":true,"invites":true,"JWT":true,"phone":true} | {"data":"y8g=","method":"aes-128-gcm","iv":"8234f43694c08b2bee39ab12","tag":"36281781e0952125b8e04f001ecb3a18","version":"1"} | NULL      | NULL     | NULL | NULL    | test test |
+-----+------+-------------------------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------+----------------------+------+---------+-------------+------+------+---------+-----------+--------------+------------+-----------+--------------+------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------+----------+------+---------+-----------+
1 row in set (0.000 sec)

@stnguyen90 stnguyen90 removed the product / console Console, UI and UX issues label Jul 28, 2023
@stnguyen90 stnguyen90 self-assigned this Jul 28, 2023
@stnguyen90 stnguyen90 added this to the 1.4.0 milestone Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants