Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soft delete collections #35496

Merged
merged 16 commits into from
Sep 25, 2024
Merged

Commits on Sep 20, 2024

  1. Configuration menu
    Copy the full SHA
    21393f1 View commit details
    Browse the repository at this point in the history
  2. refactor: use collection usage_key as search document id

    This change standardises the search document "id" to be a meilisearch ID
    generated from the usage key, for all types of indexed objects.
    
    This is important for collections so we can locate the collection
    document in the search index solely from the data provided by the
    LIBRARY_COLLECTION_DELETED event (library_key + collection_key), even if
    the collection has been deleted from the database.
    pomegranited committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    f760c2b View commit details
    Browse the repository at this point in the history
  3. refactor: avoid fetching more data than we have to.

    * get_library_collection_usage_key and
      searchable_doc_tags_for_collection do not need a Collection object;
      the usage key can be created from the library_key and collection_key.
    
    * updated searchable_doc_for_collection to require the parts of the
      collection usage key + an optional collection. This allows us to
      identify the collection's search document from its usage key without
      requiring an existing Collection object (in case it's been deleted).
      Also removes the edge case for indexing Collections not associated
      with a ContentLibrary -- this won't ever really happen.
    pomegranited committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    0534550 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9602c49 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8210d0e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f15df7d View commit details
    Browse the repository at this point in the history
  7. refactor: send CONTENT_OBJECT_ASSOCIATON_CHANGED on django model signals

    so that added/removed collections are removed/re-added to component documents.
    
    Special case: When a collection is soft-deleted/restored, we detect this
    in the search index and update the collection's component documents
    directly, without a CONTENT_OBJECT_ASSOCIATON_CHANGED signal.
    pomegranited committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    494d1a7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    5a71333 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1a9f655 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. Configuration menu
    Copy the full SHA
    a6b0ff0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c1438c1 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. fix: fix _get_document_from_index

    typos in code and comments
    pomegranited committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    e92f405 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a54096e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ea9493d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e30c4bd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    01f8298 View commit details
    Browse the repository at this point in the history