This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Sep 15, 2022
-
-
Braden Shepherdson authored
Cards can depend on other Cards as their `:source-table`, but the code to extract `serdes-dependencies` from the MBQL query did not capture that case.
-
- Sep 14, 2022
-
-
Braden Shepherdson authored
- Limit the scanning of directories and files to those named after models; don't try to ingest `.git`, `README.md`, etc. - `table_id` and `collection_id` are optional on Cards - Deserialization was not resolving some deeply nested `:field`s inside MBQL queries.
-
- Aug 31, 2022
-
-
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`
-
- Aug 22, 2022
-
-
Braden Shepherdson authored
FieldValues can be rebuilt by the sync process, but they are portable and including them aids in the plans for content moderation via git.
-
- Aug 04, 2022
-
-
Braden Shepherdson authored
These fields hold JSON, which can contain field IDs in a few places. Particularly nasty is the `:column_settings` subfield, which is a map whose *keys* are JSON strings with field IDs.
-
- Aug 03, 2022
-
-
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`
-
- Aug 02, 2022
-
-
Braden Shepherdson authored
These snippets contain raw `Database`, `Table`, and `Field` IDs, and so are not portable. This PR proves out the concept for `Card.dataset_query`, paving the way for the others in a follow-up PR.
-
- Jul 22, 2022
-
-
Braden Shepherdson authored
`PulseChannelRecipients` are a `:recipients` field on `PulseChannels`. This requires some careful handling when inserting or updating a `PulseChannel` to upsert the recipients.
-
- Jul 21, 2022
-
-
Braden Shepherdson authored
-
- Jul 20, 2022
-
-
Braden Shepherdson authored
-
- Jul 18, 2022
-
-
Braden Shepherdson authored
Cam suggested most of these changes in another PR, and I'm tackling them here.
-
- Jul 14, 2022
-
-
Cam Saul authored
* Actions multimethod refactor. * Fix function called with wrong number of args * Test fixes * Bulk create action (second pass) * Appease clj-kondo * Fix bulk insert happy path * Implement/fix everything * Linter and test fixes
* Fix bad metadata (thanks Eastwood!) * Add some comments about why we're doing what we're doing * Serdes v2 for Native Query Snippets (#23961) Also standardizes date/time output to `ZonedDateTime`, rather than whatever the JDBC happens to return. Co-authored-by:Braden Shepherdson <Braden.Shepherdson@gmail.com>
-
Braden Shepherdson authored
Also standardizes date/time output to `ZonedDateTime`, rather than whatever the JDBC happens to return.
-
- Jul 13, 2022
-
-
Braden Shepherdson authored
-
Braden Shepherdson authored
-
- Jul 11, 2022
-
-
Braden Shepherdson authored
-
Braden Shepherdson authored
-
- Jul 08, 2022
-
-
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?
-
- Jul 07, 2022
-
-
Braden Shepherdson authored
Write `storage.yaml` and `ingest.yaml` to serialize all the way to YAML files and back. Lots of generative testing to check it's isomorphic.
-
- Jun 23, 2022
-
-
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.
-