Squid: soucis démarrage de zero pour image 0.5.6

@poka pendant le dernier dev talk ce 2 janvier, on a remarqué avec @BulmAnanaBelle qu’il n’y a pas moyen de démarrer correctement un serveur Squid depuis zero avec l’image 0.5.6.

Je viens de tester en local pour voir; et effectivement; autant j’arrive bien à démarrer de zero avec la 0.5.5; autant avec la 0.5.6 ça plante très rapidement au démarrage:

docker compose up -d  
[+] up 5/5
 ✔ Network duniter-gtest-squid_default       Created                                                                                                                                                                                     0.0s 
 ✔ Volume duniter-gtest-squid_postgres-data  Created                                                                                                                                                                                     0.0s 
 ✔ Container duniter-gtest-squid-db-1        Healthy                                                                                                                                                                                     5.7s 
 ✘ Container duniter-gtest-squid-processor-1 Error dependency processor failed to start                                                                                                                                                  7.7s 
 ✔ Container duniter-gtest-squid-server-1    Created                                                                                                                                                                                     0.0s 
dependency failed to start: container duniter-gtest-squid-processor-1 exited (1)

Et les logs:

processor-1  | {"level":2,"time":1767787126744,"ns":"sqd:processor:mapping","msg":"Flushing changes to storage, this can take a while..."}
processor-1  | {"level":2,"time":1767787126744,"ns":"sqd:processor:mapping","msg":"(about ~5 minutes for all g1 history and genesis data)"}
processor-1  | {"level":2,"time":1767787126767,"ns":"sqd:processor:mapping","msg":"Genesis flushed"}
processor-1  | {"level":2,"time":1767787126767,"ns":"sqd:processor:mapping","msg":"====================="}
processor-1  | {"level":2,"time":1767787126767,"ns":"sqd:processor:mapping","msg":"Starting blockchain indexing with 5 smiths, 9 members and 9 accounts!"}
processor-1  | {"level":5,"time":1767787126787,"ns":"sqd:processor","err":{"stack":"EntityNotFoundError: Could not find any entity of type \"Validator\" matching: {\n    \"id\": \"g1PH3gQ4n53EqpcLVLtG77jRRo71tLUjvDYcm87MENkAa1NPz\"\n}\n    at /squid/node_modules/.pnpm/typeorm@0.3.26_ioredis@5.7.0_pg@8.16.3_reflect-metadata@0.2.2/node_modules/typeorm/entity-manager/EntityManager.js:682:39\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async StoreWithCache.findOneByOrFail (/squid/node_modules/.pnpm/@belopash+typeorm-store@1.5.0_@subsquid+typeorm-config@4.1.1_typeorm@0.3.26_ioredis@5.7_0562d5ed8c2d447272b97a9e909772f4/node_modules/@belopash/typeorm-store/lib/store.js:153:21)\n    at async DataHandler.processNewData (/squid/lib/data_handler.js:352:31)\n    at async /squid/lib/main.js:85:5\n    at async TypeormDatabaseWithCache.performUpdates (/squid/node_modules/.pnpm/@belopash+typeorm-store@1.5.0_@subsquid+typeorm-config@4.1.1_typeorm@0.3.26_ioredis@5.7_0562d5ed8c2d447272b97a9e909772f4/node_modules/@belopash/typeorm-store/lib/database.js:45:13)\n    at async /squid/node_modules/.pnpm/@subsquid+typeorm-store@1.5.1_@subsquid+big-decimal@1.0.0_typeorm@0.3.26_ioredis@5.7.0_pg@8.16.3_reflect-metadata@0.2.2_/node_modules/@subsquid/typeorm-store/lib/database.js:84:13\n    at async EntityManager.transaction (/squid/node_modules/.pnpm/typeorm@0.3.26_ioredis@5.7.0_pg@8.16.3_reflect-metadata@0.2.2/node_modules/typeorm/entity-manager/EntityManager.js:75:28)\n    at async TypeormDatabaseWithCache.submit (/squid/node_modules/.pnpm/@subsquid+typeorm-store@1.5.1_@subsquid+big-decimal@1.0.0_typeorm@0.3.26_ioredis@5.7.0_pg@8.16.3_reflect-metadata@0.2.2_/node_modules/@subsquid/typeorm-store/lib/database.js:164:24)\n    at async Runner.withProgressMetrics (/squid/node_modules/.pnpm/@subsquid+util-internal-processor-tools@4.2.1/node_modules/@subsquid/util-internal-processor-tools/lib/runner.js:217:22)","criteria":{"id":"g1PH3gQ4n53EqpcLVLtG77jRRo71tLUjvDYcm87MENkAa1NPz"},"message":"Could not find any entity of type \"Validator\" matching: {\n    \"id\": \"g1PH3gQ4n53EqpcLVLtG77jRRo71tLUjvDYcm87MENkAa1NPz\"\n}"}}

Et la dernière ligne d’erreur en un peu plus lisible:

{
    "level": 5,
    "time": 1767787126787,
    "ns": "sqd:processor",
    "err": {
        "stack": "EntityNotFoundError: Could not find any entity of type \"Validator\" matching: {\n    \"id\": \"g1PH3gQ4n53EqpcLVLtG77jRRo71tLUjvDYcm87MENkAa1NPz\"\n}\n    at /squid/node_modules/.pnpm/typeorm@0.3.26_ioredis@5.7.0_pg@8.16.3_reflect-metadata@0.2.2/node_modules/typeorm/entity-manager/EntityManager.js:682:39\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async StoreWithCache.findOneByOrFail (/squid/node_modules/.pnpm/@belopash+typeorm-store@1.5.0_@subsquid+typeorm-config@4.1.1_typeorm@0.3.26_ioredis@5.7_0562d5ed8c2d447272b97a9e909772f4/node_modules/@belopash/typeorm-store/lib/store.js:153:21)\n    at async DataHandler.processNewData (/squid/lib/data_handler.js:352:31)\n    at async /squid/lib/main.js:85:5\n    at async TypeormDatabaseWithCache.performUpdates (/squid/node_modules/.pnpm/@belopash+typeorm-store@1.5.0_@subsquid+typeorm-config@4.1.1_typeorm@0.3.26_ioredis@5.7_0562d5ed8c2d447272b97a9e909772f4/node_modules/@belopash/typeorm-store/lib/database.js:45:13)\n    at async /squid/node_modules/.pnpm/@subsquid+typeorm-store@1.5.1_@subsquid+big-decimal@1.0.0_typeorm@0.3.26_ioredis@5.7.0_pg@8.16.3_reflect-metadata@0.2.2_/node_modules/@subsquid/typeorm-store/lib/database.js:84:13\n    at async EntityManager.transaction (/squid/node_modules/.pnpm/typeorm@0.3.26_ioredis@5.7.0_pg@8.16.3_reflect-metadata@0.2.2/node_modules/typeorm/entity-manager/EntityManager.js:75:28)\n    at async TypeormDatabaseWithCache.submit (/squid/node_modules/.pnpm/@subsquid+typeorm-store@1.5.1_@subsquid+big-decimal@1.0.0_typeorm@0.3.26_ioredis@5.7.0_pg@8.16.3_reflect-metadata@0.2.2_/node_modules/@subsquid/typeorm-store/lib/database.js:164:24)\n    at async Runner.withProgressMetrics (/squid/node_modules/.pnpm/@subsquid+util-internal-processor-tools@4.2.1/node_modules/@subsquid/util-internal-processor-tools/lib/runner.js:217:22)",
        "criteria": {
            "id": "g1PH3gQ4n53EqpcLVLtG77jRRo71tLUjvDYcm87MENkAa1NPz"
        },
        "message": "Could not find any entity of type \"Validator\" matching: {\n    \"id\": \"g1PH3gQ4n53EqpcLVLtG77jRRo71tLUjvDYcm87MENkAa1NPz\"\n}"
    }
}
3 Likes

Il semble que la CI ne fonctionne plus depuis ce commit :

Le bug étant assez “énorme” et simple a corriger, on peut se demander si ce n’était pas pour bloquer les builds temporairement.

Et la pipeline du build de la version 5.6 a échouée. Donc je ne sais pas d’où vient l’image 5.6 si elle ne vient pas du build automatique de Gitlab. Peut-être une version poussée par @poka.

1 Like