Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Apr 15, 2024
  2. Apr 10, 2024
  3. Apr 09, 2024
  4. Apr 08, 2024
  5. Mar 28, 2024
    • Tim Macdonald's avatar
      ParseSQL: select * (#40637) · df1366e1
      Tim Macdonald authored
      * Parse wildcards in native queries
      
      Add query_field.direct_reference
      
      * Do away with old Model refs in Card model test
      
      * Do not show stale cards with a select *
      df1366e1
  6. Mar 25, 2024
    • Tim Macdonald's avatar
      Bump next.jdbc (#40452) · d52d4fe1
      Tim Macdonald authored
      d52d4fe1
    • Tim Macdonald's avatar
      Backend dep bump for 50 (#40372) · 760d1196
      Tim Macdonald authored
      * Remove unused marginalia aliases
      
      * Upgrade deps.edn
      
      From `neil deps upgrade`
      
      * Un-bump jetty-server
      
      * Downgrade H2 due to many problems
      
      * Dep bumping for Athena
      
      * Dep bumps for BigQuery
      
      * Dep bumps for Presto
      
      * Dep bumps for Redshift
      
      * Dep bumps for Snowflake
      
      * Dep bumps for SQLite
      
      * Upgrade to Mongo 5
      
      * Bump next.jdbc
      760d1196
  7. Mar 21, 2024
    • Cam Saul's avatar
      Rename `metabase.mbql` to `metabase.legacy-mbql` (#40158) · 0a15637f
      Cam Saul authored
      * Wow
      
      * Test fix :wrench:
      
      * Fixes
      
      * Actions should use strings for column names (fix :update-row and :create-row normalization)
      
      * MLv2 schema should check against keys for the other query type
      
      * Ok, have I fixed things?
      
      * More fixes :wrench:
      
      * Fix indentation
      
      * Another round of test fixes. :wrench:
      
      * Hopefully the last few test fixes :wrench:
      
      * We need to test normalization for queries that have keyword keys as well.
      
      * Fix Cljs i18n namespaces
      
      * Sort namespaces
      
      * Only test against H2
      
      * Rename `metabase.mbql` to `metabase.legacy-mbql`
      
      * Fix Kondo warnings
      
      * Test fixes :wrench:
      
      * Register MBQL clause schemas and test fixes :wrench:
      
      * Test fixes and PR feedback
      
      * Test fix
      
      * Remove the normalization tests
      
      * Test fixes :wrench:
      
      * Fix kondo
      
      * Fix import
      
      * Another fix :wrench:
      
      * Merge
      
      * FIXES
      
      * Add another missing REQUIRE
      0a15637f
  8. Mar 20, 2024
  9. Mar 14, 2024
    • Tim Macdonald's avatar
      SQL Lineage: Track field usage, expose stale queries (#39707) · 3093f7c3
      Tim Macdonald authored
      * SQL Lineage: Create the QueryField model
      
      This links Cards (with native queries) to Fields, showing us which
      queries use which Fields.
      
      QueryFields are automatically maintained as part of the Card lifecycle
      
      Cards with stale queries (powered by QueryField info) are exposed via the `card?f=stale` API
      3093f7c3
  10. Mar 08, 2024
  11. Mar 05, 2024
  12. Mar 04, 2024
    • Cam Saul's avatar
      No more Schema, only Malli (finish the migration) (#39235) · 90d2b800
      Cam Saul authored
      * No more Schema, only Malli
      
      * Remove the rest of Schema
      
      * Fix Kondo warnings
      
      * Port some decoding code
      
      * More porting
      
      * Almost all done?
      
      * Parsing fixes :wrench:
      
      * More fixes
      
      * Fix Kondo errors
      
      * Test & lint fixes :wrench:
      
      * Test fix :wrench:
      
      * PR feedback
      90d2b800
  13. Feb 29, 2024
  14. Feb 23, 2024
    • Mark Bastian's avatar
      LLMs for Question and Dashboard Titles and Descriptions (#38298) · f90e4db2
      Mark Bastian authored
      
      * Endpoint stubs
      
      * It's alive!!!
      
      The summarization endpoint is live, calling OpenAI, and connected to the `POST "metabot/card/summarize"`. `POST card/` also taps the results.
      
      * Updating prompt
      
      * Updated response shape
      
      * [WIP] working front-end suggest button
      
      * Incorporating viz settings
      
      * add suggest description to save question modal
      
      * Updating prompt
      
      * merge title and description suggestion into one button
      
      * Updating prompt
      
      * Removing dead code
      
      * Removing unused param and fn cleanup
      
      * Fix string comment
      
      * Adding dashboard summary endpoint stubs
      
      * auto-request title and description
      
      * dashboard summary wip
      
      * dashboard summary wip
      
      * dashboard summary wip
      
      * better prompt
      
      * remove dead component
      
      * add suggest description button in dashboard sidebar
      
      * fix dashboard description suggestion request
      
      * better prompt
      
      * swap out button when generating dashboard suggestion
      
      * adding keywords
      
      * adding keywords
      
      * adding keywords
      
      * adding keywords
      
      * polish loading question name and description suggestions
      
      * polish UI for dashboard description suggestion
      
      * Stubbed in usage middleware
      
      * Beginning EE Push
      
      Moved metabot/summarize endpoints to autodescribe/summarize in the ee codebase to push this towards being an ee feature and distinguish it from metabot features.
      
      Added snowplow tracking.
      
      * Isolating EE LLM Code
      
      This change completely separates metabot code from ee llm code.
      
      It also introduces a composable client mechanism for creating LLM clients for different tasks.
      
      * Task-Oriented LLM Refactoring
      
      LLM code is now organized clearly into a directory of tasks. Each ns in the tasks package provides a certain LLM task to be used in the API.
      
      * Adding unit test
      
      * Adding admin UI elements for EE OpenAI key
      
      * prettier on frontend/src/metabase/services.js
      
      * Cleaning up description text
      
      * Updating api calls
      
      * FE stuff -- hiding things when feature not enabled.
      
      * Figuring out linting for snowplow file
      
      * Figuring out linting for snowplow file
      
      * Fixing unit test
      
      * add token feature llm-autodscription
      
      * change added from 0.50 to 0.49
      
      * extract logic from SaveQuestionModal into ee plugin
      
      * extract logic from DashboardInfoSidebar to ee plugin
      
      * Fixing unit test
      
      * tests
      
      * cleaning up code for SaveQuestionModal
      
      * gate llm question name behind openAI key setting
      
      * remove styles from SaveQuestionModal.css
      
      * clean up code for dashboard
      
      * lint
      
      * Enabling triggering based on `:llm-autodescription` feature flag
      
      * Starting to look at using a badge for LLM results (#38797)
      
      * Starting to look at using a badge for LLM results
      
      * WIP - Using an Indicator to show AI "stuff"
      
      * Prototype of LLM with badge/indicator
      
      * Removing dashboard description AI
      
      * Ensuring LLM icon only shows when key is present. Updating icon to newer design. TODO: Put the icon in the right place.
      
      * Cleanup -- still need to figure out how to position the indicator and not collapse the radio when selected.
      
      * Updating save question form with LLM values does not reset form
      
      * Cleanup
      
      * Correct icon placement
      
      * Adding MB branding to star
      
      * add ai icon, tweak display
      
      * Fix z-index, tweak padding
      
      * cleanup
      
      * remove inactive code
      
      * Cleaning llm description task cobwebs out
      
      * fix collection creation
      
      * Cleaning lint and merge errors
      
      * Adding "save-question-modal" test id back in
      
      * Fixing jest test
      
      * Touching a file to unstick CI
      
      * Untouching a file to unstick CI
      
      * Fixing some includes from the rebase.
      
      * eslint fixes
      
      * eslint fixes
      
      * Fixing types
      
      * Using `PLUGIN_IS_EE_BUILD.isEEBuild()` instead of `isEnterprise()`
      
      * Removing dead styling
      
      * Adding test ids and fixing cypress tests
      
      * Fixing e2e tests
      
      * Incorporating feedback
      
      * Update frontend/src/metabase-types/api/settings.ts
      
      Co-authored-by: default avatarJesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
      
      * Update frontend/src/metabase/core/components/EditableText/EditableText.tsx
      
      Co-authored-by: default avatarJesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
      
      * Update frontend/src/metabase/core/components/Input/Input.tsx
      
      Co-authored-by: default avatarJesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
      
      * Update frontend/src/metabase/core/components/TextArea/TextArea.styled.tsx
      
      Co-authored-by: default avatarJesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
      
      * Update frontend/src/metabase/core/components/TextArea/TextArea.styled.tsx
      
      Co-authored-by: default avatarJesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
      
      * Update frontend/src/metabase/dashboard/components/DashboardInfoSidebar/DashboardInfoSidebar.tsx
      
      Co-authored-by: default avatarJesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
      
      * Fixing import
      
      * Rebasing on master to fix conflicts
      
      * Fixing types
      
      * Revert "Update frontend/src/metabase/core/components/EditableText/EditableText.tsx"
      
      This reverts commit fe11817086bff50f90336f30d33a1431cae662c5.
      
      * Revert "Update frontend/src/metabase/core/components/Input/Input.tsx"
      
      This reverts commit eef21407ee32e636a8b4e2594d502d5bbaa36870.
      
      * Revert "Update frontend/src/metabase/core/components/TextArea/TextArea.styled.tsx"
      
      This reverts commit dd1c22b993a6576d92547749d2eb93cb68411585.
      
      * Revert "Update frontend/src/metabase/core/components/TextArea/TextArea.styled.tsx"
      
      This reverts commit b169d05364e92c032ae5b6c972888a86079921e2.
      
      * Fixing e2e tests
      
      * address feedback
      
      * Fixing e2e tests
      
      * Fixing modal for models
      
      ---------
      
      Co-authored-by: default avatarJesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
      Co-authored-by: default avatarEmmad Usmani <emmadusmani@berkeley.edu>
      Co-authored-by: default avatarKyle Doherty <5248953+kdoh@users.noreply.github.com>
      Co-authored-by: default avatarAnton Kulyk <kuliks.anton@gmail.com>
      Co-authored-by: default avatarRyan Laurie <iethree@gmail.com>
      f90e4db2
  15. Feb 16, 2024
    • Braden Shepherdson's avatar
      Enable source maps for CLJS in release builds (#38819) · c062ab7f
      Braden Shepherdson authored
      We do this for our JS and TS code. This change configures shadow-cljs to
      emit the source maps in release mode, and bumps the versions of
      shadow-cljs and the transitive dependency `source-maps-js` to enable
      webpack to consume these source maps correctly.
      
      (The output source maps have some quirks, and broke some consumers.
      Mainly that inlining of CLJS functions can result in empty namespaces,
      and while the file contents were correctly inlined,
      `sourceContents: ""` looks falsy in JS. Webpack would try to read the
      nonexistent source files and fail to build.)
      c062ab7f
  16. Feb 09, 2024
  17. Feb 08, 2024
  18. Jan 29, 2024
  19. Jan 25, 2024
  20. Jan 18, 2024
  21. Jan 17, 2024
  22. Jan 12, 2024
  23. Dec 20, 2023
    • Noah Moss's avatar
      7305c326
    • adam-james's avatar
      Add dev fn to render dashboards with static-viz renderers (#36451) · e2e6f138
      adam-james authored
      * Add dev fn to render dashboards with static-viz renderers
      
      Run `(dev.render-png/render-dashboard-to-html 1)` to render the dashboard with id 1 to a handy html file.
      
      This file will render each dashcard in the dashboard 3 ways:
       - as a png, like you would see in Slack or in an email body (if it's a chart)
       - as html/svg, like you'd see in the email body (for tables).. might also be helpful to inspect the svg output from
       the graaljs interpreter
       - 10 row table representing what the .csv attachment for the dashcard would look like
      
      Note: to get this branch working properly, there are a couple lines commented out to pass the linter... it's a work in
      progress and will be cleaned up for better use.
      
      Todo:
       - [ ] avoid with-redefs to pass the linter
       - [ ] add a preview endpoint that can be used so that you don't need to run a Clojure repl to get the same result.
      
      * Eliminate with-redefs to allow csv 'render'
      
      * Make a 'preview' ns to power `api/pulse/preview_dashboard/:id`
      
      * Make dev.render-png dashboard preview fns the same as the preview ns
      
      * Dashboard Subscription preview ns now also uses csv attachment code
      
      This change now uses the csv attachment code to include an html table representing what we expect to see from csv exports.
      
      * Add dev fn to render dashboards with static-viz renderers
      
      Run `(dev.render-png/render-dashboard-to-html 1)` to render the dashboard with id 1 to a handy html file.
      
      This file will render each dashcard in the dashboard 3 ways:
       - as a png, like you would see in Slack or in an email body (if it's a chart)
       - as html/svg, like you'd see in the email body (for tables).. might also be helpful to inspect the svg output from
       the graaljs interpreter
       - 10 row table representing what the .csv attachment for the dashcard would look like
      
      Note: to get this branch working properly, there are a couple lines commented out to pass the linter... it's a work in
      progress and will be cleaned up for better use.
      
      Todo:
       - [ ] avoid with-redefs to pass the linter
       - [ ] add a preview endpoint that can be used so that you don't need to run a Clojure repl to get the same result.
      
      * Eliminate with-redefs to allow csv 'render'
      
      * Make a 'preview' ns to power `api/pulse/preview_dashboard/:id`
      
      * Make dev.render-png dashboard preview fns the same as the preview ns
      
      * Dashboard Subscription preview ns now also uses csv attachment code
      
      This change now uses the csv attachment code to include an html table representing what we expect to see from csv exports.
      
      * Collect all element styles into a single style tag to use with the server's nonce
      
      This allows the dashboard_preview endpoint to render properly by gathering all of the element styles into a single
      style tag, which can then be given the server's nonce value so that CSP doesn't strip the style out.
      
      This is useful for the preview endpoint so that we get an accurate picture of what our tables will look like in
      emails, plus it makes the presentation look just a bit more readable.
      
      * dev render_png fns match output used on the endpoint now too.
      
      * Hickory dependency out of dev into regular deps
      e2e6f138
  24. Dec 15, 2023
  25. Dec 13, 2023
  26. Dec 05, 2023
  27. Dec 01, 2023
    • Mark Bastian's avatar
      Document and test adding `results_metadata` to qp middleware for static viz (#36245) · 06848968
      Mark Bastian authored
      * Adding results_metadata to qp middleware
      
      This adds two middlewares to `metabase.query-processor.middleware.results-metadata`:
      - `inject-result-metadata`: Adds `result_metadata` from the context, if present, into the query map during preprocessing.
      - `merge-existing-metadata`: A post-processing middleware that merges `results_metadata` (if present) from the query data into the metadata.
      
      This has the effect of preserving existing metadata, which is particularly important for user-curated metadata, such as semantic type overrides.
      
      This may also facilitate addressing the following TODO in the same ns:
      
      ```
      ;; 1. Is there some way we could avoid doing this every single time a Card is ran? Perhaps by passing the current Card
      ;;    metadata as part of the query context so we can compare for changes
      ```
      
      * Preserving result_metadata in query processor
      
      This PR uses `qp.util/combine-metadata` to simplify the combination of provided `:result_metadata` with computed metadata. It also updates pulse rendering code to use this new code path and adds and updates tests to vet this logic.
      
      * fmt
      
      * Modifying PR to document and use existing fns
      
      The current qp pipeline will correctly propagate custom metadata if a question is derived from a model or if the model is processed like so:
      
      ```clojure
      (qp/process-query
        (assoc-in dataset_query [:info :metadata/dataset-metadata] result_metadata))
      ```
      
      This PR fixes rendering unit tests to clarify this and provides a much better working example in the `dev.render-png` ns.
      
      * Updating test
      
      * Adding Pulse w/Metadata Tests
      
      This pr adds a unit test that constructs a dashboard and simulates a pulse email, then checks the resulting HTML for correctness.
      
      A dependency on the [hickory](https://github.com/clj-commons/hickory) library was added to dev. This allows us to easily parse HTML into data and navigate the parse tree.
      
      Note that it does NOT check the attachments for formatting correctness.
      
      Spelling and import consistency changes were also made.
      06848968
  28. Nov 24, 2023
  29. Nov 20, 2023
Loading