Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Sep 15, 2022
  2. Sep 14, 2022
  3. Aug 31, 2022
    • Braden Shepherdson's avatar
      Add `serdes-descendants` for "containment" to serialize a subtree (#25017) · 9c61561d
      Braden Shepherdson authored
      * Add `serdes-descendants` for "containment" to serialize a subtree
      
      This allows naming eg. a Collection and will recursively serialize: all
      dashboards, cards and dashcards it contains directly, plus all child
      collections and everything they contain.
      
      Currently this words on Collection, Dashboard, DashboardCard, and Card.
      
      * lint
      
      * Switch to plural `extract-subtrees` with a list of `targets`
      9c61561d
  4. Aug 22, 2022
  5. Aug 04, 2022
  6. Aug 03, 2022
    • Braden Shepherdson's avatar
      Serdes v2: Handle other embedded MBQL fragments (#24537) · cb9e9aed
      Braden Shepherdson authored
      This PR handles the other JSON-encoded MBQL snippets I was able to find.
      
      These snippets contain `Table` and `Field` IDs, and so are not portable. These
      fields are expanded during serialization and the IDs replaced with portable
      references, then converted back in deserialization.
      
      Note that the referenced field must already be loaded before it has a valid ID.
      `serdes-dependencies` defines this order, therefore each entity depends on those
      tables and fields referenced in its MBQL fragments.
      
      The complete set of fields I found to convert:
      
      - `Metric.definition`
      - `Segment.definition`
      - `DashboardCard.parameter_mappings`
      - `Card.parameter_mappings`
      cb9e9aed
  7. Aug 02, 2022
  8. Jul 22, 2022
  9. Jul 21, 2022
  10. Jul 20, 2022
  11. Jul 18, 2022
  12. Jul 14, 2022
  13. Jul 13, 2022
  14. Jul 11, 2022
  15. Jul 08, 2022
    • Braden Shepherdson's avatar
      Add serialization hierarchy, serialize Database, Table and Field (#23622) · c952c87c
      Braden Shepherdson authored
      Serialization of Databases, Tables, Fields
      
      This brought a few core changes:
      - Add `serdes-entity-id` to abstract the field used for the ID
      - Pass the options to `extract-one` so it can eg. do encryption things.
      - Handle dates in YAML storage and ingestion
      - `:serdes/meta` now holds the entire hierarchy, not just the leaf model+ID pair.
      
      There's an open problem here about the right way to handle secrets like
      a database's password. Do we assume both sides have the same
      `MB_ENCRYPTION_SECRET_KEY`? Provide a serdes-specific password the user
      just made up, and every secret gets decrypted with the source key, encrypted with
      the serdes key, stored, decrypted with the serdes key, and encrypted with
      the destination key?
      c952c87c
  16. Jul 07, 2022
  17. Jun 23, 2022
    • Braden Shepherdson's avatar
      Foundation for v2 serialization and deserialization (#23204) · 2eb89b4d
      Braden Shepherdson authored
      This supports serialization of only Collections and Settings so far, but
      it demonstrates the design of the new serialization system.
      
      `metabase.models.serialization.base` defines the multimethods, which
      are to be implemented by all the exported models eventually.
      The actual serialization code that drives the larger process is in
      `metabase_enterprise.serialization.v2.extract` and `.merge`, since
      serialization is an enterprise feature.
      
      The design calls for two matching phases on each side:
      - Serialization is extract + store;
      - Deserialization is ingest + load.
      
      Extract and load deal with vanilla Clojure maps with a `serdes/meta` key
      giving common details; they deliberately know nothing about files.
      
      Store and ingest deal with the storage medium and the process of
      listing and reading a stored export.
      
      Laziness is retained: the `load` process ingests full details on demand,
      so only the metadata of the importing database needs to fit in memory.
      2eb89b4d
Loading