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

Adding PPL GET Api endpoint #2464

Closed
wants to merge 11 commits into from

Conversation

YANG-DB
Copy link
Member

@YANG-DB YANG-DB commented Jan 2, 2024

Description

Adding support for PPL GET endpoint (to match existing POST endpoint)

Issues Resolved

#2463

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.41%. Comparing base (efb159a) to head (889b5b2).
Report is 197 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2464   +/-   ##
=========================================
  Coverage     95.41%   95.41%           
  Complexity     5000     5000           
=========================================
  Files           479      479           
  Lines         13950    13950           
  Branches        937      937           
=========================================
  Hits          13310    13310           
  Misses          618      618           
  Partials         22       22           
Flag Coverage Δ
sql-engine 95.41% <ø> (ø)

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.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm trying to understand why there are a lot of these mini classes that just change the method. My understanding is it's trying to subtly change the extended test with a new method, but I'm not sure I follow why this is better than adding more tests to the base test class that use different methods.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's just the easiest way in java to separate different aspects of the test into different classes - each class is responsible for one thing - the "single responsibility" principle

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to add GET api test in each IT? E.g. DedupCommandIT is focus on IntegrationTest instead of dedup command test, instead of REST interface.
Add GET API in doc test (endpoint.rst) should be enough?

return buildGETRequest(query, endpoint);
case POST:
default:
return buildPOSTRequest(query, endpoint);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we default to post and not raise an exception that non-post/get isn't supported?

Copy link
Member Author

Choose a reason for hiding this comment

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

The default is the POST ...
There is a default error in netty server that returns the appropriate text if no endpoint is defined for the specific url or http method

@Swiddis
Copy link
Collaborator

Swiddis commented Jan 7, 2025

Closing as stale -- reopen if needed

@Swiddis Swiddis closed this Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants