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

Removes unused get/post/put cache endpoint #4761

Merged
merged 5 commits into from
Oct 1, 2024

Conversation

derek-ho
Copy link
Collaborator

@derek-ho derek-ho commented Sep 30, 2024

Description

Removes Get, Post, Put cache API routes, since only delete is used. This should not be backported to 2.x, and we should add a deprecation notice there as well (although these were never used anyway so the behavior should be consistent)

Issues Resolved

[List any issues this PR will resolve]

Is this a backport? If so, please add backport PR # and/or commits #, and remove backport-failed label from the original PR.

Do these changes introduce new permission(s) to be displayed in the static dropdown on the front-end? If so, please open a draft PR in the security dashboards plugin and link the draft PR here

Testing

[Please provide details of testing done: unit testing, integration testing and manual testing]

Check List

  • New functionality includes testing
  • New functionality has been documented
  • New Roles/Permissions have a corresponding security dashboards plugin PR
  • API changes companion pull request created
  • 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.

Signed-off-by: Derek Ho <dxho@amazon.com>
@derek-ho
Copy link
Collaborator Author

derek-ho commented Sep 30, 2024

@DarshitChanpura how do we mark this as deprecated in the 2.x line? Just add a Java annotation @ Deprecated?

Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
willyborankin
willyborankin previously approved these changes Oct 1, 2024
@cwperks
Copy link
Member

cwperks commented Oct 1, 2024

@derek-ho We can use the DeprecationLogger and add a warning to the API response if someone calls the endpoint with one of the deprecated verbs.

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.60%. Comparing base (df115d8) to head (6498e53).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4761      +/-   ##
==========================================
- Coverage   65.64%   65.60%   -0.04%     
==========================================
  Files         321      321              
  Lines       22539    22538       -1     
  Branches     3611     3611              
==========================================
- Hits        14795    14786       -9     
- Misses       5932     5939       +7     
- Partials     1812     1813       +1     
Files with missing lines Coverage Δ
...ch/security/dlic/rest/api/FlushCacheApiAction.java 64.00% <100.00%> (-1.39%) ⬇️

... and 2 files with indirect coverage changes

@willyborankin
Copy link
Collaborator

willyborankin commented Oct 1, 2024

@derek-ho could you please fix Code Hygiene / Spotless scan (pull_request) Failing ?

RyanL1997
RyanL1997 previously approved these changes Oct 1, 2024
peternied
peternied previously approved these changes Oct 1, 2024
Signed-off-by: Derek Ho <dxho@amazon.com>
@cwperks
Copy link
Member

cwperks commented Oct 1, 2024

@derek-ho Can you also raise a PR against the API specification repo to reflect this change?

ref: https://github.com/opensearch-project/opensearch-api-specification/blob/main/spec/namespaces/security.yaml#L449-L498

@cwperks
Copy link
Member

cwperks commented Oct 1, 2024

Merging this into main. @derek-ho please open a backport with the deprecation messages discussed above.

@cwperks cwperks merged commit 0a9addb into opensearch-project:main Oct 1, 2024
41 of 42 checks passed
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.

5 participants