Skip to content
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

[datesets] feat: add statsd to datasets api #9577

Merged
merged 3 commits into from Apr 24, 2020

Conversation

lilykuang
Copy link
Member

@lilykuang lilykuang commented Apr 18, 2020

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

Adding statds metrics to datesets API endpoints (POST, PUT, DELETE, bulk_delete, data). This is an extension from #9519

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

  • Deploy this PR to sandbox instance
  • Hit different points by creating a new chart, updating chart owners and deleting charts, etc
  • Go to https://app.datadoghq.com/metric/explorer
  • Check on graphs for superset.DatasetRestApi.[endpoints] over environment:sandbox

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

REVIEWERS

@dpgaspar dpgaspar changed the title feature/add statsd to datasets api [datesets] feat: add statsd to datasets api Apr 18, 2020
Copy link
Member

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a comment

@@ -344,6 +352,7 @@ def export(self, **kwargs: Any) -> Response:

@expose("/<pk>/refresh", methods=["PUT"])
@protect()
@statsd_metrics
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the position, after the safe decorator

@codecov-io
Copy link

codecov-io commented Apr 18, 2020

Codecov Report

Merging #9577 into master will increase coverage by 4.85%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9577      +/-   ##
==========================================
+ Coverage   65.62%   70.47%   +4.85%     
==========================================
  Files         574      574              
  Lines       30060    30081      +21     
  Branches     3054     3054              
==========================================
+ Hits        19726    21199    +1473     
+ Misses      10150     8771    -1379     
+ Partials      184      111      -73     
Flag Coverage Δ
#cypress 53.71% <ø> (?)
#javascript 58.75% <ø> (ø)
#python 70.45% <100.00%> (+<0.01%) ⬆️
Impacted Files Coverage Δ
superset/datasets/api.py 92.56% <100.00%> (+0.32%) ⬆️
superset/db_engine_specs/sqlite.py 63.33% <0.00%> (-10.01%) ⬇️
superset/result_set.py 96.63% <0.00%> (-1.69%) ⬇️
superset/charts/schemas.py 100.00% <0.00%> (ø)
superset/common/query_object.py 94.56% <0.00%> (+0.66%) ⬆️
...rontend/src/SqlLab/components/AceEditorWrapper.tsx 56.98% <0.00%> (+1.07%) ⬆️
superset-frontend/src/components/EditableTitle.jsx 81.69% <0.00%> (+1.40%) ⬆️
...perset-frontend/src/components/CopyToClipboard.jsx 36.36% <0.00%> (+1.51%) ⬆️
...hboard/components/resizable/ResizableContainer.jsx 71.87% <0.00%> (+1.56%) ⬆️
...ashboard/components/gridComponents/ChartHolder.jsx 81.35% <0.00%> (+1.69%) ⬆️
... and 138 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea27e68...99cc2bb. Read the comment docs.

@lilykuang lilykuang requested a review from dpgaspar April 20, 2020 16:03
@dpgaspar
Copy link
Member

Can you please fill the "Summary" to add a bit of context to this PR?

Copy link
Member

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just missing 2 metric assertions

@@ -662,7 +662,7 @@ def test_dataset_item_refresh(self):

def test_dataset_item_refresh_not_found(self):
"""
Dataset API: Test item refresh not found dataset
Dataset API: Test item refresh not found dataset
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add the metric assert here?

@@ -673,7 +673,7 @@ def test_dataset_item_refresh_not_found(self):

def test_dataset_item_refresh_not_owned(self):
"""
Dataset API: Test item refresh not owned dataset
Dataset API: Test item refresh not owned dataset
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add the metric assert here?

@lilykuang lilykuang force-pushed the lily/feature/statsd-table-api branch from 454b4f8 to 095e76c Compare April 21, 2020 19:05
@lilykuang lilykuang requested a review from dpgaspar April 21, 2020 19:17
Copy link
Member

@etr2460 etr2460 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test plan to the PR as well? Thanks!

@lilykuang lilykuang requested a review from etr2460 April 22, 2020 15:35
Copy link
Member

@etr2460 etr2460 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, makes sense to me. thanks for the test plan!

Copy link
Member

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@dpgaspar dpgaspar merged commit b272007 into apache:master Apr 24, 2020
@lilykuang lilykuang deleted the lily/feature/statsd-table-api branch August 30, 2022 16:27
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.37.0 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 0.37.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants