superset icon indicating copy to clipboard operation
superset copied to clipboard

feat(ssh_tunnel): APIs for SSH Tunnels

Open Antonio-RiveroMartnez opened this issue 2 years ago • 3 comments

SUMMARY

Add our CREATE, UPDATE and DELETE APIs for SSH Tunnels.

  • [X] CREATE API
  • [X] API endpoint calling the command
  • [X] Tests
  • [X] UPDATE API
  • [X] API endpoint calling the command
  • [X] Tests
  • [X] DELETE API
  • [X] API endpoint calling the command
  • [X] Tests
  • [x] API + Schemas + Tests
    • [x] CREATE POST /api/v1/database
    • [x] UPDATE UPDATE /api/v1/database/
    • [x] DELETE DELETE /api/v1/database/{db_id}/ssh_tunnel

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

Antonio-RiveroMartnez avatar Nov 22 '22 18:11 Antonio-RiveroMartnez

Codecov Report

Merging #22199 (0cae2a2) into create-sshtunnelconfig-tbl (7cc7bc8) will decrease coverage by 11.19%. The diff coverage is 47.67%.

:exclamation: Current head 0cae2a2 differs from pull request most recent head 052eee1. Consider uploading reports for the commit 052eee1 to get more accurate results

@@                       Coverage Diff                       @@
##           create-sshtunnelconfig-tbl   #22199       +/-   ##
===============================================================
- Coverage                       66.97%   55.78%   -11.20%     
===============================================================
  Files                            1858     1859        +1     
  Lines                           70928    71006       +78     
  Branches                         7764     7764               
===============================================================
- Hits                            47506    39610     -7896     
- Misses                          21400    29374     +7974     
  Partials                         2022     2022               
Flag Coverage Δ
hive 52.46% <30.23%> (-0.06%) :arrow_down:
mysql ?
postgres ?
presto ?
python 57.88% <47.67%> (-23.43%) :arrow_down:
sqlite ?
unit 51.42% <47.67%> (-0.01%) :arrow_down:

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

Impacted Files Coverage Δ
superset/constants.py 100.00% <ø> (ø)
superset/databases/commands/create.py 60.60% <18.18%> (-25.61%) :arrow_down:
superset/databases/commands/update.py 24.13% <20.00%> (-55.87%) :arrow_down:
superset/utils/ssh_tunnel.py 30.00% <30.00%> (ø)
superset/databases/api.py 53.63% <66.66%> (-39.91%) :arrow_down:
superset/databases/ssh_tunnel/models.py 95.65% <75.00%> (-4.35%) :arrow_down:
superset/databases/ssh_tunnel/commands/create.py 87.75% <85.71%> (-0.89%) :arrow_down:
superset/databases/schemas.py 85.38% <100.00%> (-12.96%) :arrow_down:
superset/utils/dashboard_import_export.py 0.00% <0.00%> (-100.00%) :arrow_down:
superset/tags/core.py 4.54% <0.00%> (-95.46%) :arrow_down:
... and 291 more

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

codecov[bot] avatar Nov 22 '22 19:11 codecov[bot]

/testenv up

hughhhh avatar Nov 30 '22 15:11 hughhhh

@hughhhh Ephemeral environment spinning up at http://35.90.30.149:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

github-actions[bot] avatar Nov 30 '22 15:11 github-actions[bot]

Ephemeral environment shutdown and build artifacts deleted.

github-actions[bot] avatar Dec 01 '22 17:12 github-actions[bot]