-
Notifications
You must be signed in to change notification settings - Fork 100
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
Built-in server #696
Comments
If it's mostly for unit tests, why not just run a Wikibase docker image as part of the CI/CD as well as for local development. |
Dockerized Wikibase server would be preferable, because it is complete and identical to production server. The trick is in how to fully automate test setup. Forcing every developer to manually setup Wikibase container and then configure tests to use it by placing config file in well-known location is rather unappealing. |
PS: Wikibase API would also have to be reviewed to make sure it gives full control of the server. Tests need to create users, manipulate their permissions, and bulk-delete everything between tests. |
It seems like really a ton of work to me, and difficult to maintain. If we migrate to such a system, then it would also create the expectation that if someone implements support for a new action in WDTK, they should also implement it in this bare-bones server, and probably test that implementation there as well… it feels pretty daunting and overkill to me. |
@wetneb I have done co-development of client+server+messages in my professional work. Improved testability of the full stack is totally worth the extra 10-20% of code per feature. Client has to be tested somehow. Thorough testing with mockwebserver is likely more expensive and less reliable. Dockerized Wikibase could be even better option though. I am reviewing that approach now. |
@robertvazan let me know if you need help. or hop into the Telegram channel for Wikibase https://t.me/joinchat/HGjGexZ9NE7BwpXzMsoDLA |
I propose adding simple built-in Wikibase server to WDTK, mostly intended for use in unit tests. This issue is for discussion of the idea.
Built-in server would have some limitations, at least initially:
Such server would have a number of applications:
It looks like a lot of work, but given the above simplifications, I think it can be done in under 1K lines as long as the server systematically taps into existing functionality in XDocument and XUpdate classes. The investment will pay back during both WDTK and app development.
The text was updated successfully, but these errors were encountered: