-
Notifications
You must be signed in to change notification settings - Fork 11
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
Define CI tests for validation of testnet deployment #99
Comments
I think it will be hard to achieve this on testnet ( because of the tTAO required to test ) what if we change this to devnet? |
Just followed your lead on this comment of yours @hide-on-bush-x
Maybe we could have our own set of validators and miners deployed on testnet and ping them to have an E2E test there. Feel free to adjust this task as you see fit 💪 |
That would be great too, but I was thinking about the CI and the docker, we need some way to get fresh wallets and in testnet that wont be possible |
We could regenerate wallets based on their private keys hosted on GitHub Secrets and run those wallets on CI as well |
@hide-on-bush-x this card is to be triaged and wasn't planned as part of the sprint. It's fine for now as you have already work in progress, but this shouldn't have been picked up - also - this was blocked by #85 |
Gotcha, thx @mudler |
Marking as blocked by #85 |
@5u6r054 @juanmanso @hide-on-bush-x can you please update the ticket description with acceptance criteria and add follow up tasks after spike is done? |
Testing plan
Integration testsThere are a few things we may want to test here, things such as :
Requirements: Static tests ( potentially the tests that are going to run on CI )
Requirements:
|
I'd say that if we structure our dockerfiles properly so the very last step is the Regarding your last point, I'd say we stick to some bash/git snippet that checks the diff for changed files and if some of the target files were changed, the GH actions runs. Is not that convoluted and let's devs use commits as they see fit (but I agree commits should be rather small and concise) |
If we want to validate after the deployment, then I see your point. However, when I wrote the question I thought we should test before the deployment. If we follow that assumption, then I thought we could have some docker compose which spins up a miner and a validator that connect to the testnet, etc. |
I'd ask to go deeper here. How would we do that? IMO we could test response accuracy by making the same request to the masa protocol ourselves and compare answers. For the metagraph info, which commands should we run for that? @hide-on-bush-x |
Everything else on your comment LGTM |
Will expand on that, probably will writte some code too, thx! |
Here is an example of how we could check that the setting weights method is working: import requests
import bittensor
import time
# Connect to a subnet on the testnet
subnet = bittensor.metagraph(165, "test", lite=False)
initial_weights = subnet.W
print(initial_weights)
# Make a REST request
response = requests.get('http://localhost:8000/data/twitter/profile/getmasafi')
if response.status_code == 200:
print('Successfully retrieved data from localhost')
print(f'Response: ${response.json()}')
else:
print('Failed to retrieve data from localhost')
print("Waiting a few secconds...")
time.sleep(10)
subnet.sync()
after_request_weights = subnet.W
print(after_request_weights)
# Here check that the new weight's table makes sense And for checking just the scores we can read the scores file stored locally ( thats easier ) |
Will create a few tasks for this |
Goal
Have a CI that runs integration testing for deployment of the environment to testnet (and in the future, production).
What needs to be defined
References
Mention of task here
Related issues
Acceptance criteria
The text was updated successfully, but these errors were encountered: