Data Views for Launch Control
Launch control's reporting framework is hard to use as it required server-side code deployments and python knowledge to extend. We want to provide users with an ability to express new views on the test result data (dataviews) by defining simple SQL statements with parameterization exposed through an XML RPC API
Blueprint information
- Status:
- Complete
- Approver:
- Alexander Sack
- Priority:
- Undefined
- Drafter:
- Zygmunt Krynicki
- Direction:
- Approved
- Assignee:
- Zygmunt Krynicki
- Definition:
- Review
- Series goal:
- Accepted for 0.4
- Implementation:
- Implemented
- Milestone target:
- 0.4b
- Started by
- Zygmunt Krynicki
- Completed by
- Zygmunt Krynicki
Whiteboard
Status: Needs some more testing for few xml-rpc methods. Sandboxing cannot be deployed with data migrations alone due to needing to create a new database user. We can resolve this in the next cycle with special post-install hook.
[zyga]: For SQLite we'll have a problem. There is no way to limit the user to access arbitrary tables. SQLite can open databases in read only mode but AFAIR this is not exposed directly in sqlite3 python binding. We could patch that (seems straightforward). For production or public hosting we'll most likely require PostgreSQL.
[asac, Apr 7, 2011]: give dataviews a namespace to later allow easy navigation; to start i guess the naming would be authorname/
[zyga, 2011-04-28]: We don't need AJAX as I found a simple way of calling XML-RPC API from JavaScript. I moved some work items into report blueprint. South support is okay but we need (extra) maintainer script to give us permission to add new users to the database. This is strictly a packaging issue.
Work Items
Work items:
Create skeleton data structure for holding data views at runtime (django model or runtime class): DONE
Write a data view that can query example data used for development: DONE
Write a loader function that loads the view description from the XML: DONE
Write a function implements the invocation logic: DONE
Write DashboardAPI.
Write DashboardAPI.
Write DashboardAPI.
Document new XML-RPC calls: DONE
Write new Django view implementing the AJAX endpoint corresponding to query_data_view: POSTPONED
Extend the loader to validate argument usage and argument types: DONE
Write tests for new XML-RPC methods: POSTPONED
Write tests for new AJAX endpoint: POSTPONED
Investigate Django settings to make the query read-only when using sqlite: DONE
Document what kind of settings need to be applied in PostgreSQL to get a read-only connection: DONE
Add south support to django-debian: DONE
Add south support to django-hello to validate the maintainer scripts: DONE
Use south to perform required database user permission changes when using PostgreSQL: POSTPONED
Implement DEBUG-aware reloading option similar to django templates (reload each time in development mode, cache in memory in production) to simplify development: DONE
Dependency tree
* Blueprints in grey have been implemented.