-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(apps): plugin source in its own model, part 1 #9853
Conversation
@macobo here's the first split. This keeps the changes minimal in the plugin server, and even keeps the old Is this safe enough to get in? Praying to the jest gods now 🤞 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks sane to me! 🚢
* master: refactor(ingestion): Make `KAFKA_ENABLED` true by default and set `KAFKA_HOSTS` default (#9844) feat(apps): transpile frontend.tsx (#9828) feat: show api call status when adding insights to dashboards (#9817) feat: track metrics on zapier hook firings (#9866) fix(onboarding): instrumentation (#9845) feat(whitelabel-shared-dashboard): Hide branding on shared dashboards paid (#9849) fix(apps): plugin source quickfix (#9862) refactor(plugin-server): Remove `ts-jest`, use `jest.mocked` (#9861) refactor(plugin-server): Trigger public jobs with graphile insted of celery queue (#9811) chore: upgrade pip tools (#9859) feat(apps): plugin source in its own model, part 2 (#9854) chore: Update sprint_planning_retro.md (#9791) feat(apps): plugin source in its own model, part 1 (#9853) feat(matrix): Add option to save `simulate_matrix` like `setup_dev` (#9836) fix(cohort): add mapping from event to person (#9841) feat(person-on-events): Enable CI to run using both old and new queries (#9814)
* create plugin source model * edit source via plugin_source model * deprecate "source" * test plugin source updates * add support for index.ts and index.js * refactor plugin loading, support plugin sources from db * fix source code in tests * remove transpilation code * reload plugin after saving * store defaults in the db instead of persisting in form * remove fields that don't exist * remove unused fields * commit suggestion * rename to PluginSourceFile * fix code feedback * add comments * make it safer to call * convert to upsert * convert to upsert * comment on the null * revert plugin server changes * get source from new model behind the scenes * simplify * revert accidental changes * revert accidental changes * remove defaults * sync the old source field * safer null check that doesn't override `{}` in the db with `null`
Problem
PR #9825 is going to be be split in two for safety.
Changes
This PR includes the changes to the models, the django API, and the frontend. The plugin server gets a JOIN that reads in data from the new location instead of the old
source
field.How did you test this code?
pluginsourcefile
table change, and the oldsource
field was synced.