Commit Graph

41 Commits

Author SHA1 Message Date
Beto Dealmeida
e303537e0c fix: adhoc column quoting (#36215) 2025-11-21 16:32:39 -05:00
Antonio Rivero
a1d4dff99d feat(logs): Add is_cached as part of ChartDataRestApi.data actions (#36001) 2025-11-05 15:49:56 +01:00
Akshat Sinha
bae2c90bae docs: correct spelling typos in project codebase (#35935) 2025-11-03 12:09:58 -05:00
Daniel Vaz Gaspar
c029b532d4 fix: LocalProxy is not mapped warning (#33025) 2025-04-28 23:01:26 -06:00
JUST.in DO IT
449f51aed5 fix(log): Update recent_activity by event name (#32681) 2025-03-17 09:18:47 -07:00
John Bodley
8fb8199a55 chore(dao/command): Add transaction decorator to try to enforce "unit of work" (#24969) 2024-06-28 12:33:56 -07:00
Eyal Ezer
07b2449bd7 refactor: Unify all json.(loads|dumps) usage to utils.json (#28702)
Co-authored-by: Eyal Ezer <eyal.ezer@ge.com>
2024-05-28 14:17:41 -07:00
Maxime Beauchemin
35284589cb feat: unpack payload into log function (#28521) 2024-05-23 10:40:15 -07:00
Maxime Beauchemin
2d63722150 chore: set up ruff as a new linter/formatter (#28158) 2024-04-24 17:19:53 -07:00
Maxime Beauchemin
68c77d6e9f chore: clean up console upon firing up the CLI (#28134) 2024-04-23 11:43:39 -07:00
Maxime Beauchemin
cfc440c56c feat: improve event logging for queries + refactor (#27943)
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2024-04-22 16:30:50 -07:00
John Bodley
df79522160 refactor: Ensure Flask framework leverages the Flask-SQLAlchemy session (#26200) 2024-01-18 08:27:29 +13:00
John Bodley
a4d5d7c6b9 chore(pre-commit): Add pyupgrade and pycln hooks (#24197) 2023-06-01 12:01:10 -07:00
Daniel Vaz Gaspar
d00ba15c78 chore: add statsd support to base API and refactor (#22887) 2023-01-27 17:52:08 +00:00
Elizabeth Thompson
ce145c676c refactor: use exception status for logging (#21971) 2022-11-14 14:14:24 -08:00
John Bodley
3483446c28 refactor: Cleanup user get_id/get_user_id (#20492)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2022-06-24 17:57:04 -07:00
Ville Brofeldt
a619cb4ea9 chore: upgrade black (#19410) 2022-03-29 20:03:09 +03:00
John Bodley
7e4c940314 chore(pylint): Enable useless-suppression check (#16388)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-24 03:58:41 +12:00
John Bodley
0df15bf207 chore(pylint): Reenable import-outside-toplevel check (#16263)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-17 05:20:13 +12:00
ofekisr
15796ea4ac refactor: type hints should not be load in runtime (#15540) 2021-07-05 16:48:53 +03:00
Hugh A. Miles II
4b23d0ecca fix: logs table - user_id is NULL (#14057)
* add user back to session

* add test for logging None on exceptions

* fix this updated test

* reformat

* reformat

* Update log.py
2021-04-13 10:08:34 -04:00
Beto Dealmeida
db57f90a34 feat: better error message when adding DBs (#13601)
* WIP

* Adding tests

* Add unit tests

* Show error message

* Fix lint

* Fix after rebase
2021-03-17 20:29:26 -07:00
Hugh A. Miles II
c91c45574b feat: add event_logger to test_connection and create_database commands (#13468)
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-03-09 08:17:13 -05:00
Hugh A. Miles II
b17e7aa5c9 feat: refactor on DBEventLogger to allow for context management (#13441)
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-03-05 15:12:42 -05:00
Jesse Yang
76f9f185fb refactor: optimize backend log payload (#11927) 2020-12-15 17:22:23 -08:00
Erik Ritter
77d362d306 fix: Remove expensive logs table migration (#11920) 2020-12-04 07:59:28 -08:00
Maxime Beauchemin
0504cf1a00 chore: improve analytics (#11714)
* chore: improve analytics

* lint

* log more events, add note in UPDATING.md

* handling base class

* more events\!

* get ref through

* right before @expose

* fix context

* touchups
2020-11-25 08:45:02 -08:00
Jesse Yang
634676d467 refactor: use contextmanager for event_logger decorators (#11222) 2020-10-14 10:44:06 -07:00
Bogdan
4572ebb600 chore: log cache keys to the logs (#10678)
* Log cache keys to the logs

* Add tests

* Use separate table for the cache keys

* Add migration for the cache lookup table

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-09-01 09:41:25 -07:00
Daniel Vaz Gaspar
0aad9c6f48 fix(log): log endpoint authentication (#10435)
* fix(log): log crashes if expired or not authenticated

* add auth to log endpoint
2020-07-29 09:32:10 +01:00
Maxime Beauchemin
2314aad450 feat: add database dropdown to dashboard import (#10118)
* feat: add database dropdown to dashboard import

Currently, when importing a database from a JSON file, the process
looks at the database name from the source (the info is in the file)
and matches the datasources to that name. If no database by that name
exists, it simply fails.

With this PR, we add a database dropdown that allows the user to specify
which databases the datasources should target as the get upserted.

I want to stress that the code in this area is not in a great shape,
and that the challenge of serializing/deser the nested objects is
challenging, but that there should be a much better way to do this.
One of the improvement (out of scope for this PR) that would allow to
simplify those import/export would be to use UUIDs for
importable/exportable objects.

Another identified issue is the indirections between
`utils/import_expor_{model}.py` on top of `{Model}.import_object`. Not
addressing that here.

Next topic is the MVC stuff. Decided to stick with it for now as this is
more of a [obious missing feat:] than a rewrite.

* isort \!? 0%^$%Y$&?%$^?%0^?

* fix tests

* pre-committing to py3.6

* address dpgaspar's comments

* revert isort
2020-07-05 15:08:37 -07:00
John Bodley
b181e48f5c [log] Updating form-data logic (#10197)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-07-04 12:51:43 -07:00
Will Barrett
8e23d4f369 chore: Upgrade pylint to 2.5.3 and fix most new rules (#10101)
* Bump pylint version to 2.5.3

* Add a global disable for the most common new pylint error

* Fix a bunch of files containing very few errors

* More pylint tweakage, low-hanging fruit

* More easy stuff...

* Fix more erroring files

* Fix the last couple of errors, clean pylint!

* Black

* Fix mypy issue in connectors/druid/models.py
2020-06-18 14:03:42 -07:00
John Bodley
91517a56a3 style(mypy): Spit-and-polish pass (#10001)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-06-07 08:53:46 -07:00
John Bodley
b296a0f250 [mypy] Enforcing typing for superset.utils (#9905)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-27 22:57:30 -07:00
Ville Brofeldt
980dd2fd41 pylint: accept specific 2 character names by default (#9460)
* lint: accept 2 letter names by default

* Address review comments

* Remove e and d from good-names
2020-04-08 20:32:26 +03:00
Will Barrett
ed3944ebef Re-enable pylint for superset/utils folder (#8766)
* re-enable pylint for superset/utils/import_datasource.py

* re-enable pylint for superset/utils/cache.py

* re-enable pylint for superset/utils/log.py
2019-12-06 14:34:58 -08:00
Will Barrett
e4ca44e95f Use config[] not config.get() (#8454)
* Typo fix in CONTRIBUTING.md

* Alter references to config.get('FOO') to use preferred config['FOO']

* Set missing configuration constants in superset/config.py

* Misc. CI fixes

* Add type annotation for FEATURE_FLATGS
2019-10-30 16:19:16 -07:00
John Bodley
9fc37ea9f1 [ci] Deprecate flake8 (#8409)
* [ci] Deprecate flake8

* Addressing @villebro's comments
2019-10-18 14:44:27 -07:00
Dave Smith
9233a63a16 Event logger config takes instance instead of class (#7997)
* allow preconfigured event logger instance; deprecate specifying class

* add func docs and simplify conditions

* modify docs to reflect EVENT_LOGGER cfg change

* commit black formatting fixes and license header

* add type checking, fix other pre-commit failues

* remove superfluous/wordy condition

* fix flake8 failure

* fix new black failure

* dedent warning msg; use f-strings
2019-08-08 13:47:18 -07:00
Daniel Vaz Gaspar
1ab04190cd [log] New, make action log configurable and generic (#7705)
* [log] New, make action log configurable and generic

* [log] Fix, missing apache license

* [log] Fix, user_id is a required parameter on event logs

* [log] Fix, Rename Action to Event

* [log] Fix, flake8

* [logger] Change all log_this decorators to new abstract one

* [logger] [docs] Simple docs to show how to override the event log

* [style] Fix, single quote to double quote

* [style] Fix, single quote to double quote
2019-07-08 09:38:12 -07:00