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

chore: remove annotation layer FAB CRUD model view #22178

Conversation

dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented Nov 21, 2022

SUMMARY

Remove FAB CRUD model view annotation layer, these endpoints are deprecated on FAB.

Renames routes from /annotationlayermodelview/* to /annotationlayer/*

Previous non REST API routes:

 <Rule '/annotationlayermodelview/api/read' (OPTIONS, HEAD, GET) -> AnnotationLayerModelView.api_read>,
 <Rule '/annotationlayermodelview/action_post' (OPTIONS, POST) -> AnnotationLayerModelView.action_post>,
 <Rule '/annotationlayermodelview/list/' (OPTIONS, HEAD, GET) -> AnnotationLayerModelView.list>,
 <Rule '/annotationlayermodelview/add' (OPTIONS, HEAD, POST, GET) -> AnnotationLayerModelView.add>,
 <Rule '/annotationmodelview/action_post' (OPTIONS, POST) -> AnnotationModelView.action_post>,
 <Rule '/annotationmodelview/list/' (OPTIONS, HEAD, GET) -> AnnotationModelView.list>,
 <Rule '/annotationmodelview/add' (OPTIONS, HEAD, POST, GET) -> AnnotationModelView.add>,
 <Rule '/annotationlayermodelview/delete/<pk>' (OPTIONS, HEAD, POST, GET) -> AnnotationLayerModelView.delete>,
 <Rule '/annotationlayermodelview/edit/<pk>' (OPTIONS, HEAD, POST, GET) -> AnnotationLayerModelView.edit>,
 <Rule '/annotationlayermodelview/show/<pk>' (OPTIONS, HEAD, GET) -> AnnotationLayerModelView.show>,
 <Rule '/annotationmodelview/delete/<pk>' (OPTIONS, HEAD, POST, GET) -> AnnotationModelView.delete>,
 <Rule '/annotationmodelview/edit/<pk>' (OPTIONS, HEAD, POST, GET) -> AnnotationModelView.edit>,
 <Rule '/annotationmodelview/show/<pk>' (OPTIONS, HEAD, GET) -> AnnotationModelView.show>,
 <Rule '/annotationmodelview/<pk>/annotation/' (OPTIONS, HEAD, GET) -> AnnotationModelView.annotation>,

Current non REST API routes:

<Rule '/annotationlayer/list/' (HEAD, OPTIONS, GET) -> AnnotationLayerView.list>
<Rule '/annotationlayer/<pk>/annotation' (HEAD, OPTIONS, GET) -> AnnotationLayerView.get>

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Nov 21, 2022

Codecov Report

Merging #22178 (d9f695c) into master (cc38400) will decrease coverage by 0.05%.
The diff coverage is 79.41%.

❗ Current head d9f695c differs from pull request most recent head eb3d59a. Consider uploading reports for the commit eb3d59a to get more accurate results

@@            Coverage Diff             @@
##           master   #22178      +/-   ##
==========================================
- Coverage   67.00%   66.94%   -0.06%     
==========================================
  Files        1835     1835              
  Lines       69970    69927      -43     
  Branches     7590     7590              
==========================================
- Hits        46880    46812      -68     
- Misses      21124    21149      +25     
  Partials     1966     1966              
Flag Coverage Δ
hive 52.57% <78.78%> (-0.04%) ⬇️
mysql ?
postgres 78.15% <78.78%> (-0.07%) ⬇️
presto 52.47% <78.78%> (-0.04%) ⬇️
python 81.29% <78.78%> (-0.10%) ⬇️
sqlite 76.60% <78.78%> (-0.07%) ⬇️
unit 50.86% <78.78%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ontrols/AnnotationLayerControl/AnnotationLayer.jsx 74.85% <ø> (ø)
...ntend/src/views/CRUD/annotation/AnnotationList.tsx 69.35% <ø> (ø)
superset-frontend/src/views/routes.tsx 55.26% <ø> (ø)
...t/annotation_layers/annotations/commands/create.py 86.04% <0.00%> (ø)
superset/models/core.py 89.81% <0.00%> (-0.70%) ⬇️
superset/views/__init__.py 100.00% <ø> (ø)
superset/views/database/views.py 31.36% <0.00%> (ø)
...ews/CRUD/annotationlayers/AnnotationLayersList.tsx 68.05% <100.00%> (ø)
superset/charts/schemas.py 99.35% <100.00%> (+<0.01%) ⬆️
superset/initialization/__init__.py 90.96% <100.00%> (-0.04%) ⬇️
... and 8 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

🔥 Code looks good and tested by creating a new set of annotations via the CRUD view and adding it to a chart via Explore (both event and interval). One bycatch nit that could be nice to get fixed while we're at it, other than that LGTM.

superset/views/annotations.py Show resolved Hide resolved
Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

LGTM

@dpgaspar dpgaspar merged commit a77b2d6 into apache:master Nov 22, 2022
@dpgaspar dpgaspar deleted the danielgaspar/sc-5243/remove-old-annotation-layers-crud-system branch November 22, 2022 16:20
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 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 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants