Vore Ponos server-side code
Closes #1423 (closed)
I used the following script to merge the repository into this one:
sudo apt install git-filter-repo
git clone --no-tags git@gitlab.com:teklia/arkindex/ponos /tmp/ponos
cd /tmp/ponos
git filter-repo --path=ponos/ --path=tests/server/ --path=tests/fixtures/ --path=requirements-server.txt
mkdir arkindex
mv ponos arkindex/
mv requirements-server.txt arkindex/ponos/
mv tests/server arkindex/ponos/tests
mv tests/fixtures arkindex/ponos/tests/fixtures
rmdir tests
git add -A
git commit -m 'Move Ponos server-side code to Arkindex app'
workon backend
git checkout --branch vore-ponos
git remote add ponos /tmp/ponos
git fetch ponos
git merge --allow-unrelated-histories ponos/master
git remote rm ponos
rm -rf /tmp/ponos
TODO
-
Fix all the unit tests -
Move arkindex.ponos.urls
to aarkindex.project.ponos_v1
(this will later be merged witharkindex.project.api_v1
) -
Merge the custom views, OpenAPI overrides, permissions defined in arkindex.project.views
with the API endpoints inarkindex.ponos.api
-
Check the OpenAPI schema -
Test the unmodified Ponos agent a lot -
Write instructions for developers to remove the Ponos setup from their backend environments
Cleaning up the dev environment
- To remove Ponos entirely from your backend environment:
pip uninstall ponos_server ponos-agent
- To check whether or not you have Ponos properly uninstalled:
pip freeze | grep -i ponos
should return nothing.
Follow-ups
- Some of various simplifications discussed on Redmine will be done in this MR because they make the integration easier, but others might need to be done in other merge requests.
- Resetting the migrations will probably be necessary in order to fully cleanup the code, in another merge request, with instructions on what SQL queries to run manually to reset
django_migrations
properly. - The switch to
/api/v1/ponos
will better be done in a separate merge request, as this will require some work on the agent side (and maybe should be done after we switch to an OpenAPI-based client). - Prevent Ponos agents from accessing any endpoint that isn't related to Ponos, by editing the authorization classes so that the JWT agent authentication is only set on Ponos endpoints (meaning this will also be nicely documented in OpenAPI)
- Found #1426 (closed) while checking the OpenAPI schema!
- Found #1427 (closed) #1428 (closed) #1429 (closed) frontend#1219 (closed) frontend#1220 (closed) while testing the Ponos agent!
Edited by Erwan Rouchet