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

[WIP] [AMORO-2068] Adjust api path and controller #2162

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

GOODBOY008
Copy link
Member

Adjust api path and controller

@github-actions github-actions bot added the module:ams-dashboard Ams dashboard module label Oct 21, 2023
@GOODBOY008
Copy link
Member Author

GOODBOY008 commented Oct 21, 2023

@zhoujinsong @shidayang About controller adjustment can you give me some suggestions?

@codecov
Copy link

codecov bot commented Oct 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5a0dabe) 51.44% compared to head (cac0af6) 51.20%.
Report is 83 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2162      +/-   ##
============================================
- Coverage     51.44%   51.20%   -0.24%     
+ Complexity     4061      593    -3468     
============================================
  Files           499       46     -453     
  Lines         27288     4763   -22525     
  Branches       2764      520    -2244     
============================================
- Hits          14037     2439   -11598     
+ Misses        12042     2092    -9950     
+ Partials       1209      232     -977     
Flag Coverage Δ
core ?
trino 51.20% <ø> (-0.05%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@GOODBOY008 GOODBOY008 changed the title [AMORO-2068] Adjust api path and controller [WIP] [AMORO-2068] Adjust api path and controller Oct 21, 2023
@zhoujinsong
Copy link
Contributor

zhoujinsong commented Oct 23, 2023

@GOODBOY008 Thanks a lot for driving this.

At present, the routing rules of the API do appear somewhat messy. We should organize them better for easier long-term management. However, before we formally begin, we may need to clarify some issues like :

  • Identify APIs that have expired, such as /docs/latest and /hive-tables/upgrade, which do not appear to be relied upon by the frontend anymore.
  • Clarify the differences between the ams/v1 and ams/v1/api APIs, discuss whether both APIs still need to be maintained simultaneously, and better manage them in the code.

@Aireed Do you have any suggestions about the issues below?

@zhoujinsong
Copy link
Contributor

BTW, I strongly recommend that you follow the project template in your PR description so that other developers can better understand the content of your PR, such as related issues, brief change logs, test methods, etc.

@zhoujinsong
Copy link
Contributor

After an offline discussion with @Aireed @hameizi, here are some updates regarding this issue:

  • /docs/latest is no longer needed, but /hive-tables/upgrade is still needed.
  • APIs starting with /ams/v1 are used by the dashboard frontend and APIs starting with /api/ams/v1 are used by other ecosystems. At this stage, they basically support the same interfaces and implementations, but there are differences in authentication methods.

Based on this, we can also make the following improvements:

  • Remove APIs no longer needed.
  • Uniform routing rules for the same interface parts of /ams/v1 and /api/ams/v1.

@GOODBOY008 HDYT?

@GOODBOY008
Copy link
Member Author

After an offline discussion with @Aireed @hameizi, here are some updates regarding this issue:

  • /docs/latest is no longer needed, but /hive-tables/upgrade is still needed.
  • APIs starting with /ams/v1 are used by the dashboard frontend and APIs starting with /api/ams/v1 are used by other ecosystems. At this stage, they basically support the same interfaces and implementations, but there are differences in authentication methods.

Based on this, we can also make the following improvements:

  • Remove APIs no longer needed.
  • Uniform routing rules for the same interface parts of /ams/v1 and /api/ams/v1.

@GOODBOY008 HDYT?

@zhoujinsong Yes, I will discuss detail with @shidayang and append conclusion in this pr.

@GOODBOY008
Copy link
Member Author

GOODBOY008 commented Oct 24, 2023

@zhoujinsong @shidayang I remove exist api both /ams/v1 and /api/ams/v1 the diff as below. I think combine them as one will be better. I wonder tableController::getTableDetailTabToken is useless because we already have apikey and signature check.
企业微信截图_16981484882836

@shidayang
Copy link
Contributor

@zhoujinsong @shidayang I remove exist api both /ams/v1 and /api/ams/v1 the diff as below. I think combine them as one will be better. I wonder tableController::getTableDetailTabToken is useless because we already have apikey and signature check. 企业微信截图_16981484882836

Except for /login and /login/current, all others can be merged. getTableDetailTabToken should not be necessary.

@CLAassistant
Copy link

CLAassistant commented Nov 22, 2023

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:ams-dashboard Ams dashboard module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants