We updated PublishLogRecord to capture user intent (the direct field). Over time, we'll probably add more things, like distinguishing pure renames. There will be times like this when we can't backfill this information. For instance, there are situations where clicking "publish" at any of three different levels would yield identical looking PublishLogRecords. In this case, we have the code handle both cases.
Right now, code in openedx/openedx-platform#38178 is generating "old" data to test against by manually importing PublishLogRecord and using it to set direct=None. But this breaks abstraction barriers. It would be useful for our APIs to allow the creation of old data. This could be with an optional flag to publish, e.g. set_direct=True, or some test utilities that can strip that data off after the fact.
We updated PublishLogRecord to capture user intent (the
directfield). Over time, we'll probably add more things, like distinguishing pure renames. There will be times like this when we can't backfill this information. For instance, there are situations where clicking "publish" at any of three different levels would yield identical looking PublishLogRecords. In this case, we have the code handle both cases.Right now, code in openedx/openedx-platform#38178 is generating "old" data to test against by manually importing
PublishLogRecordand using it to setdirect=None. But this breaks abstraction barriers. It would be useful for our APIs to allow the creation of old data. This could be with an optional flag to publish, e.g.set_direct=True, or some test utilities that can strip that data off after the fact.