-
Notifications
You must be signed in to change notification settings - Fork 0
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
Problem: TSN isn't properly tested in CI #334
Comments
Our team is actually just finishing our testing framework (kwilteam/kwil-db#856). We are planning to backport to the |
@brennanjl did it happen? |
@zolotokrylin yes, it got merged a few weeks ago, however the docs aren't up yet. Will get the documentation up today. |
@outerlook we have published docs for testing here: https://prerelease.kwil.com/docs/kuneiform/testing/intro/ You will have to either build kwil-cli from the preview branch, or import the testing SDK from the preview branch:
|
feedback relevant to tsn-sdk and tsn-data-provider tooling: It would be powerful to be able to target this temporary database with a kwil client... Or we can already? I imagine it's because the framework skips The intention here is to test our SDK (that leverages kwil client) using the same temporary environment I'll try using the options Edit: I see that there are many pitfalls here that can make it too complex for now
|
If you are deploying with Kwil-cli, there is a
Can you elaborate on this? I'm not sure if I follow.
We cannot, for exactly the reason you described. The test works by running Kwil's execution engine against Postgres. It does not, however, expose an HTTP server. Kwil's HTTP server only accepts blockchain transactions, and similarly the client only sends blockchain transactions. I can see why this would be desireable though. You essentially want a way to test any other logic against a live database without the need to wait for consensus, right? |
I mean, in the testing framework 😆 Here, we can set what are the schema files but not the schema name. Maybe we could also instead provide parsed schemas to solve that? I know the workaround of providing plain text schemas instead of files, so we can search & replace the name manually. Example usage: we want to use 2 primitive contracts and 1 composed, then we need to use that, but that workaround is available
I was thinking about this workaround of specifying a real kwil database connection so I could reuse the setup&teardown features, but on a real kwil database. But for that to work, I think I would need to able to specify a different database deployer, instead of the hardcoded one
I understand your points. And I think your description is accurate. That would for sure help. The setup&teardown ergonomy is also great there, but we can handle that step based on your framework |
What's a parent Goal here, please? Thank you. |
Hey @zolotokrylin, I initially raised this issue just to get it out of my head, as I felt its pain from time to time. When that kind of situation happens, should I create a goal instead? What is the process? If we should include this in a phase, I'd put some goal such as "Improving TSN tests reliability" which could include the tasks
|
@outerlook All good. You've done everything right by pitting it in GitHub. You can create a goal if it makes sense to be done in isolation from everything else. If it's a problem that belongs to a bigger goal, then it needs to be attached to a relevant goal as a problem that stops you from achieving it. |
I'll set it a goal in isolation soon then, as it does not block other goals, just improves the quality/rework |
Log relevant to the probable reliability goal We need better observability for our debugs, even more when sharing with kwil team: store logs (easiest now, just cloudwatch), observe storage usage from nodes, indexer, etc (I'll still open the goal) |
I know this issue isn't a priority, but it's nice to register
Our tests are manually executed during development with the markdown scripts.
We should create an integration test for those and include at CI
The text was updated successfully, but these errors were encountered: