-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Debugging datastore locally
If you need to debug the data in Google Cloud Datastore Emulator when running the devserver on localhost (e.g. you want to look what models are in the datastore emulator or you want to add or modify them) you cannot use the admin environment provided by the devserver as it cannot access the datastore emulator anymore (since Python 3 introduction). You need to use some custom GUI for the emulator, DSAdmin is probably one of the best ones.
In some cases it is possible that the local datastore data are not deleted when the server is rerun, you can delete the data by running curl -X POST http://localhost:8089/reset
when the devserver is running.
- Download an archive for your platform and processor from the DSAdmin releases GitHub page
- Unpack the archive and put the binary somewhere you can easily access it through the terminal
- Run the devserver
- While the devserver is running run
<path to DSAdmin binary> --project=dev-project-id --datastore-emulator-host=localhost:8089
in a different terminal window or tab (for example if you put the DSAdmin into the parent folder of oppia, you can run it like this../dsadmin --project=dev-project-id --datastore-emulator-host=localhost:8089
- You will see an output saying something like
<date> <time> dsadmin (project 'dev-project-id') listening on <URL>
then you can navigate to the URL and you will see the UI
The UI of the DSAdmin should be fairly self-explanatory, here are some screenshots that can help you get started.
This is a screenshot of accessing the DSAdmin when there are no data in the datastore.
This is a screenshot of DSAdmin with some data in the datastore. You can filter different kinds of models, you can sort the models according to some properties. By clicking the model ID you can edit that model. By clicking the "+" in the top-right corner you can create a new model.
This is a screenshot of the model edit screen, you can edit all properties there.
Some properties are decoded, when you want to see the encoded value, you need to click the "{}" button.
Have an idea for how to improve the wiki? Please help make our documentation better by following our instructions for contributing to the wiki.
Core documentation
Developing Oppia
- FAQs
- How to get help
- Getting started with the project
- How the codebase is organized
- Making your first PR
- Debugging
- Testing
- Codebase policies and processes
- Guidelines for launching new features
- Guidelines for making an urgent fix (hotfix)
- Testing jobs and other features on production
- Guidelines for Developers with Write Access to oppia/oppia
- Release schedule and other information
- Revert and Regression Policy
- Privacy aware programming
- Code review:
- Project organization:
- QA Testing:
- Design docs:
- Team-Specific Guides
- LaCE/CD:
- Developer Workflow:
Developer Reference
- Oppiabot
- Git cheat sheet
- Frontend
- Backend
- Backend Type Annotations
- Writing state migrations
- Calculating statistics
- Storage models
- Coding for speed in GAE
- Adding a new page
- Adding static assets
- Wipeout Implementation
- Notes on NDB Datastore transactions
- How to handle merging of change lists for exploration properties
- Instructions for editing roles or actions
- Protocol buffers
- Webpack
- Third-party libraries
- Extension frameworks
- Oppia-ml Extension
- Mobile development
- Performance testing
- Build process
- Best practices for leading Oppia teams
- Past Events