yetitwo
09/04/2024, 5:04 PM0xb4lamx [EU]
09/04/2024, 6:45 PMSPICEDB_TOKEN="random_key"
running the schema creation as part of the globalSetup function of JEST, via client.writeSchema(schemaRequest)
🤔yetitwo
09/04/2024, 6:46 PMrandom_key
static, or is it generated by some function on each invocation?0xb4lamx [EU]
09/04/2024, 6:46 PMyetitwo
09/04/2024, 6:47 PMserve-testing
mode, each different preshared key is functionally its own sandbox, so if it's different between the setup function and the calls that would explain what you're seeing0xb4lamx [EU]
09/04/2024, 6:47 PMyetitwo
09/04/2024, 6:47 PMyetitwo
09/04/2024, 6:47 PMat_least_as_fresh
or fully_consistent
, they may not see the revision that includes your schema0xb4lamx [EU]
09/04/2024, 6:52 PMfully_consistent
, if not some tests become flaky.
My concern here is with the first run only where few tests!
a theory: it seems that the client.writeSchema(schemaRequest)
actually triggers the schema creation in async fashin, the response do not mean that it was fully created, no? 🤔 thus when the jest runner carry on, it starts throwing queries against SpiceDB, too fast, before SpiceDB manages to create parts of the schema 🤔yetitwo
09/04/2024, 6:55 PMJoey
09/04/2024, 8:17 PMJoey
09/04/2024, 8:17 PMJoey
09/04/2024, 8:17 PMJoey
09/04/2024, 8:29 PMJoey
09/04/2024, 8:29 PM0xb4lamx [EU]
09/04/2024, 9:26 PM