Skip to content

πŸ› Bug Report: Attribute creation did not finish for too long on AppWrite-CLI 4.1.0Β #135

@tripolskypetr

Description

@tripolskypetr

πŸ‘Ÿ Reproduction steps

appwrite --version
4.1.0

appwrite deploy collection

...

β„Ή Info Collection APARTMENT does not exist in the project. Creating ...
βœ— Error Attribute creation did not finish for too long.

πŸ‘ Expected behavior

I made a migration script and It works well

const { $id, databaseId, attributes } = GET_COLLECTION("APARTMENT");

const migrate = async () => {

await databases.createCollection(databaseId, $id, 'APARTMENT');

for (const { key, type, required, array, size } of attributes) {
    console.log(`creating  ${key}: type=${type} array=${array} size=${size}`)
    if (type === "string") {
        await databases.createStringAttribute(databaseId, $id, key, size, required, undefined, array);
    }
    if (type === "boolean") {
        await databases.createBooleanAttribute(databaseId, $id, key, required, undefined, array);
    }
    await sleep(1_000);
}

}

migrate();

This worked. Looks like appwrite-cli does not reset not responding timeout after each attribute creation.

πŸ‘Ž Actual Behavior

The schema for the following collection should be deployed successfully. Right now It is not

{
    "projectId": "64b53d0c41fcf5193b12",
    "projectName": "ExampleProject",
    "databases": [
        {
            "$id": "64c4de8e7b31179809ef",
            "name": "DATABASE",
            "$createdAt": "2023-09-14T10:10:35.686+00:00",
            "$updatedAt": "2023-09-14T11:59:42.307+00:00",
            "enabled": true
        }
    ],
    "collections": [
        {
            "$id": "64d4a5782854ff66e9a1",
            "$permissions": [
                "create(\"any\")",
                "read(\"any\")",
                "update(\"any\")",
                "delete(\"any\")"
            ],
            "databaseId": "64c4de8e7b31179809ef",
            "name": "APARTMENT",
            "enabled": true,
            "documentSecurity": false,
            "attributes": [
                {
                    "key": "sanuzel_doma",
                    "type": "string",
                    "status": "available",
                    "error": "",
                    "required": false,
                    "array": true,
                    "size": 48,
                    "default": null
                },
                {
                    "key": "balkon_doma",
                    "type": "string",
                    "status": "available",
                    "error": "",
                    "required": false,
                    "array": true,
                    "size": 48,
                    "default": null
                },
                
                ...

🎲 Appwrite version

Appwrite Cloud

πŸ’» Operating system

Linux

🧱 Your Environment

Appwrite Cloud 1.4.5, Appwrite-cli 4.1.0

πŸ‘€ 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?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions