nettoyage des applications obsolètes/squash des migrations (#40685) #219

Open
bdauvergne wants to merge 19 commits from wip/40685-squash-des-migrations into main
Owner
No description provided.
bdauvergne force-pushed wip/40685-squash-des-migrations from 5f1bab0bed to 034459c742 2023-12-13 21:19:31 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from 034459c742 to f6eda53950 2023-12-13 22:01:57 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from f6eda53950 to 7f771dc7b2 2023-12-13 22:37:27 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from da320ab82d to 5de66faffa 2023-12-13 23:30:15 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from 5de66faffa to 85f627a62f 2023-12-13 23:52:06 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from 85f627a62f to ee8ea1b873 2023-12-14 00:15:06 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from ee8ea1b873 to 94dac83c56 2023-12-14 00:32:21 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from 94dac83c56 to eb59d10ff9 2023-12-14 01:00:09 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from eb59d10ff9 to a9887bcd2f 2023-12-14 01:36:44 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from a9887bcd2f to 4d1fed770b 2023-12-14 01:45:16 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from 78c9137f90 to 0d41162ae8 2023-12-15 01:54:26 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from 0d41162ae8 to d974c5f5ed 2023-12-15 03:10:19 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from 5d581605bd to 73e0a60380 2023-12-16 21:40:30 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from 73e0a60380 to d24c1c0fd2 2023-12-16 21:58:41 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from d24c1c0fd2 to 48f8e6f7ea 2023-12-18 08:30:57 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from 48f8e6f7ea to 1fd44e5147 2023-12-18 08:40:01 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from 1fd44e5147 to 5c8d1bcb4e 2023-12-18 08:42:39 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from 5c8d1bcb4e to 2dafe5bdcf 2023-12-18 08:43:30 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from 2dafe5bdcf to 3fc3f6350f 2023-12-18 09:10:36 +01:00 Compare
bdauvergne changed title from WIP: nettoyage des applications obsolètes/squash des migrations (#40685) to nettoyage des applications obsolètes/squash des migrations (#40685) 2023-12-18 18:43:30 +01:00
bdauvergne force-pushed wip/40685-squash-des-migrations from 3fc3f6350f to f729fe42b3 2023-12-18 18:50:57 +01:00 Compare
Author
Owner

J'ai trié les noms des anciennes migrations dans les attributs 'replaces' dans la dernière version de la branche pour que ce soit plus lisible.

J'ai trié les noms des anciennes migrations dans les attributs 'replaces' dans la dernière version de la branche pour que ce soit plus lisible.
bdauvergne force-pushed wip/40685-squash-des-migrations from f729fe42b3 to 9120b6b6af 2023-12-19 12:18:55 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from 9120b6b6af to b95539a5f8 2023-12-19 12:27:12 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from b95539a5f8 to d1f01df23a 2023-12-19 12:35:16 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from d1f01df23a to 98e174aa5e 2024-02-27 17:43:55 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from 98e174aa5e to d9a51b122c 2024-02-27 17:49:09 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from d9a51b122c to e7f0e9fe1e 2024-02-27 18:08:40 +01:00 Compare
bdauvergne force-pushed wip/40685-squash-des-migrations from e7f0e9fe1e to 75150709a9 2024-02-27 18:13:51 +01:00 Compare
bdauvergne requested review from pmarillonnet 2024-02-27 18:18:18 +01:00
bdauvergne force-pushed wip/40685-squash-des-migrations from 75150709a9 to e9c2ae027b 2024-02-27 18:19:59 +01:00 Compare
Author
Owner

C'est rebasé sur les dernières migrations, de plus j'ai mis dans #262 une partie des commits jusqu'au squash lui même pour pouvoir passer le tout en deux fois, le pas critique puis le critique.

C'est rebasé sur les dernières migrations, de plus j'ai mis dans https://git.entrouvert.org/entrouvert/authentic/pulls/262 une partie des commits jusqu'au squash lui même pour pouvoir passer le tout en deux fois, le pas critique puis le critique.
bdauvergne force-pushed wip/40685-squash-des-migrations from e9c2ae027b to 6f6714a4bb 2024-02-27 18:32:01 +01:00 Compare
Author
Owner

J'ai développé un peu d'outillage pour tester facilement les migrations (ça supprime la base locale nommée authentic2, vérifier d'abord qu'on y a rien d'important) :

 ssh  db3.prod.saas.entrouvert.org /home/bdauvergne/dump-schema-and-migrations.sh /tmp/dump.sql connexion.eservices.toulouse-metropole.fr && scp db3.prod.saas.entrouvert.org:/tmp/dump.sql /tmp/dump.sql && dropdb --if-exists authentic2 && createdb authentic2 && psql authentic2 </tmp/dump.sql && tox -e manage -- migrate

Modifier connexion.eservices.toulouse-metropole.fr par le tenant visé, pour GLC par contre c'est une base différente, ce sera moncompte.grandlyon.com glc_authentic.

....
ALTER TABLE
COPY 306
 setval 
--------
    366
(1 ligne)

ALTER TABLE
.pkg: _optional_hooks> python /usr/lib/python3/dist-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_editable> python /usr/lib/python3/dist-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_editable> python /usr/lib/python3/dist-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
manage: install_package> python -I -m pip install --force-reinstall --no-deps /home/bdauvergne/.tmp/tox-bdauvergne/authentic/.tmp/package/643/authentic2-5.30.post21+g6f6714a4b.dirty-0.editable-py3-none-any.whl
manage: commands[0]> ./getlasso3.sh
manage: commands[1]> ./manage.py migrate
Operations to perform:
  Apply all migrations: a2_rbac, admin, auth, authentic2, authentic2_auth_fc, authentic2_auth_oidc, authentic2_auth_saml, authentic2_idp_cas, authentic2_idp_oidc, authenticators, contenttypes, custom_user, journal, mellon, nonce, saml, sessions
Running migrations:
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying auth.0012_alter_user_first_name_max_length... OK
  Applying nonce.0002_delete_nonce... OK
.pkg: _exit> python /usr/lib/python3/dist-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
  manage: OK (3.05=setup[1.13]+cmd[0.03,1.89] seconds)
  congratulations :) (3.22 seconds)

J'ai développé un peu d'outillage pour tester facilement les migrations (ça supprime la base locale nommée authentic2, vérifier d'abord qu'on y a rien d'important) : ssh db3.prod.saas.entrouvert.org /home/bdauvergne/dump-schema-and-migrations.sh /tmp/dump.sql connexion.eservices.toulouse-metropole.fr && scp db3.prod.saas.entrouvert.org:/tmp/dump.sql /tmp/dump.sql && dropdb --if-exists authentic2 && createdb authentic2 && psql authentic2 </tmp/dump.sql && tox -e manage -- migrate Modifier ```connexion.eservices.toulouse-metropole.fr``` par le tenant visé, pour GLC par contre c'est une base différente, ce sera ```moncompte.grandlyon.com glc_authentic```. ``` .... ALTER TABLE COPY 306 setval -------- 366 (1 ligne) ALTER TABLE .pkg: _optional_hooks> python /usr/lib/python3/dist-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ .pkg: get_requires_for_build_editable> python /usr/lib/python3/dist-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ .pkg: build_editable> python /usr/lib/python3/dist-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ manage: install_package> python -I -m pip install --force-reinstall --no-deps /home/bdauvergne/.tmp/tox-bdauvergne/authentic/.tmp/package/643/authentic2-5.30.post21+g6f6714a4b.dirty-0.editable-py3-none-any.whl manage: commands[0]> ./getlasso3.sh manage: commands[1]> ./manage.py migrate Operations to perform: Apply all migrations: a2_rbac, admin, auth, authentic2, authentic2_auth_fc, authentic2_auth_oidc, authentic2_auth_saml, authentic2_idp_cas, authentic2_idp_oidc, authenticators, contenttypes, custom_user, journal, mellon, nonce, saml, sessions Running migrations: Applying auth.0002_alter_permission_name_max_length... OK Applying auth.0003_alter_user_email_max_length... OK Applying auth.0004_alter_user_username_opts... OK Applying auth.0005_alter_user_last_login_null... OK Applying auth.0006_require_contenttypes_0002... OK Applying auth.0007_alter_validators_add_error_messages... OK Applying auth.0008_alter_user_username_max_length... OK Applying auth.0009_alter_user_last_name_max_length... OK Applying auth.0010_alter_group_name_max_length... OK Applying auth.0011_update_proxy_permissions... OK Applying auth.0012_alter_user_first_name_max_length... OK Applying nonce.0002_delete_nonce... OK .pkg: _exit> python /usr/lib/python3/dist-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ manage: OK (3.05=setup[1.13]+cmd[0.03,1.89] seconds) congratulations :) (3.22 seconds) ```
All checks were successful
gitea/authentic/pipeline/head This commit looks good
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b wip/40685-squash-des-migrations main
git pull origin wip/40685-squash-des-migrations

Step 2:

Merge the changes and update on Gitea.
git checkout main
git merge --no-ff wip/40685-squash-des-migrations
git push origin main
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: entrouvert/authentic#219
No description provided.