#5098 (pm prep should remove media files)

by Luc Saffre · in Developers · assigned to Luc Saffre

Kurzbeschreibung

Kinder

Kommentare

  • 3 Jahre, 1 Monat ago von Luc Saffre about #5098 (pm prep should remove media files) : Path.rename() fails [url gitlab.com/lino-framework/book/-/jobs/4998865957 on GitLab] because the tmp directory is on a different device. Solution is to use shutils.move() instead of Path.rename().
  • 3 Jahre, 2 Monate ago von Luc Saffre about #5098 (pm prep should remove media files) : I have yet another failure during pm prep in gerd: AttributeError: Problem installing fixture '/home/luc/work/xl/lino_xl/lib/excerpts/fixtures/demo2.py': type object 'PaymentOrderItem' has no attribute 'get_printable_demo_objects'
  • 3 Jahre, 2 Monate ago von Sharif Mehedi about #5098 (pm prep should remove media files) (3 Antworten) : No such file or directory: '/home/blurry/lino/env/repositories/welfare/lino_welfare/projects/gerd/settings/media/cache/wsdl/be/fgov/kszbcss/types/RetrieveTIGroups/RetrieveTIGroupsV2.xsd'>
    is still coming on welfare even after pulling luc's changes.
  • 3 Jahre, 2 Monate ago von Sharif Mehedi about #5098 (pm prep should remove media files) : Let's have a session together and I'll try to explain.
  • 3 Jahre, 2 Monate ago von Luc Saffre about #5098 (pm prep should remove media files) : I don't yet understand why we need the skip_media option.
  • 3 Jahre, 2 Monate ago von Luc Saffre about #5098 (pm prep should remove media files) : Actually it was only in initdb where the cached copy of site_config was not being cleared.
  • 3 Jahre, 2 Monate ago von Luc Saffre about #5098 (pm prep should remove media files) : The changes look good! Reviewing them made me discover that there is an evident bug: at several places we still say "SITE._site_config = None" instead of "SITE.clear_site_config()".
  • 3 Jahre, 2 Monate ago von Sharif Mehedi about #5098 (pm prep should remove media files) : I just pushed some changes in lino and getlino. @luc , let me know what you think about them.
  • 3 Jahre, 2 Monate ago von Luc Saffre about #5098 (pm prep should remove media files) : nd i think we will need some opyion --remove-media to initdb, and the prep command will be the only one to set this to true.
  • 3 Jahre, 2 Monate ago von Luc Saffre about #5098 (pm prep should remove media files) : One possibility is to say that initdb calls remove_files() only when DEBUG is True.
  • 3 Jahre, 2 Monate ago von Luc Saffre about #5098 (pm prep should remove media files) : I realized that my changes actually *will* delete the media files on a production server (because the restore.py script also runs initdb). But i nevertheless pushed them so that Sharif can work on initdb for the encoding problem on alpha. Let's keep in mind to not make any release until this issue i...
  • 3 Jahre, 2 Monate ago von Luc Saffre about #5098 (pm prep should remove media files) : I am satisfied with my current local solution, but something is still failing in welfare. I am working on it.
  • 3 Jahre, 2 Monate ago von Luc Saffre about #5098 (pm prep should remove media files) : Optimization: don't ask for every file, only ask once for all files below MEDIA_ROOT.
  • 3 Jahre, 2 Monate ago von Luc Saffre about #5098 (pm prep should remove media files) : I implemented it, but do not yet push it because I prefre to sleep a night over it.
  • 3 Jahre, 2 Monate ago von Luc Saffre about #5098 (pm prep should remove media files) : One thing is clear: I'd rather not delete the uploads folder *accidentally* on a production site. When testing a preview site, we use rsync to keep the uploads directory synced.
  • 3 Jahre, 2 Monate ago von Luc Saffre about #5098 (pm prep should remove media files) : Created new Ticket #5098 (pm prep should remove media files).