-
Notifications
You must be signed in to change notification settings - Fork 8
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
Run unit and validation test against Py based server #25
Comments
@yuyiguo I can't use directly Do you want me to provide a PR to fix this problem in this repo? I already made dmwm/DBS#646 about it, but it was not merged and not propagated to this repository. My suggestion is to adjust
Such options will allow to test ANY combinations of DBS servers which can be deploy on any cluster in any end-point. |
@yuyiguo , moreover I found that since you did not apply dmwm/DBS#657 PR the |
Here PR for |
Here PR for |
Here PR for |
@vkuznet For the testing, we can have different url formatting just for the convenience. |
@yuyiguo I doubt it is feasible. On cmsweb-testbed the DBS Python URLs are fixed to |
In other words, I do agree that when we'll migrate Go server we will preserve the DBS URLs, but if we want to compare results from Python server to Go server and ensure that DBSClient works with both servers we either need to use different URLs, or deploy to the same URLs/end-points different servers. Operationally, I prefer to deploy both servers on the same cluster and use different URLs which will allow testing/validation done quickly, e.g. we can get results from one server using one set of URLs and results from another server using different set of URLs (but both servers will talk to the same DB). This is why I propose changes to support arbitrary URLs. |
@vkuznet Does this make sense? |
@yuyiguo I do agree that official DBS URLs should stay the same during and after migration, but I disagree that we can't support arbitrary URLs. The former are designed to keep production/testbed access without interruption, but for development I can deploy DBS server anywhere including my laptop and I should be able to use DBS Client to test it. It does not make any sense to me that for latter case I always should manually change DBS client code since by default it only access production/testbed URLs. Let separate the production/testbed access from dev cycle. For instance, |
You misunderstood my points. All I said that we should keep the urls to follow the same schema as it is now after migration. As I said in the beginning, for testing it is ok with different url schemas. |
PRs were merged. Please testing for both python and go server. Let me know if you need anything else for the testing. |
Done |
@yuyiguo finally I converged again that Reader and Writer tests are fine (except the dbs_version regexp match as dbs2go uses different versions schema), and I tried validation tests. But I immediately found that in order to do it few things should be fixed in this tests. Before providing concrete PRs I would like to understand the logic of validation test. So here is my findings:
After we fix above issues I still need some time to work on DBS Migration server which is not yet finished, and then I can proceed with DBSValidation_t tests. |
@vkuznet I think we should keep this test until DBS migrated to to go server. But I don't think you need to make this test for working for go. You may want to have a new version test after the migration. In DBSValidation_t you use four different URLs The purpose of DBSValidation test is to verify if DBS server can write, read and migration data correctly. In order to do it, we need to write to server, read it back, then compare the data to be written and read back. We do the same for migration too. DBS validation test run against any DBS python server. My development process is to code locally, test on my VM, then test on cmsweb-testbed. in Python server you use the same set of APIs both in DBSReader and DBSWriter. In dbs2go I separate them such that I can have only read APIs in reader instance and write APIs in writer instance. This make more secure DBS instance, e.g. clients can't use writer DBS instance for data-lookup and therefore can't abuse it with these calls. I don't think your approach make DBS server any more secure, but make client life difficult. DBS read server can only read, but the write server can do both read and write. DBS read and write server has different roles/groups. The writers are limited a group of project and individuals. |
@yuyiguo , thanks for explanation. Then, I'll proceed as following:
|
@vkuznet |
Done. |
@vkuznet
I merged PR #22 . Can you start to run DBS unit and validation tests against the python and Go servers using branch DBSClient4go? I knew you already ran unit tests before, if you haven't run validation tests, here is the command to run it:
python setup_test.py test_system --host=https://cmsweb-testbed.cern.ch --validation
The text was updated successfully, but these errors were encountered: