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

Changed return code for RBAC and provision #1083

Merged
merged 2 commits into from
Mar 16, 2025

Conversation

owaiskazi19
Copy link
Member

@owaiskazi19 owaiskazi19 commented Mar 14, 2025

Description

Changed return code for RBAC

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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 Mar 14, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.30%. Comparing base (005029c) to head (29e1761).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...h/flowframework/rest/RestCreateWorkflowAction.java 0.00% 0 Missing and 1 partial ⚠️

❌ Your patch status has failed because the patch coverage (50.00%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1083      +/-   ##
============================================
- Coverage     76.32%   76.30%   -0.02%     
- Complexity     1075     1076       +1     
============================================
  Files           101      101              
  Lines          5276     5276              
  Branches        503      504       +1     
============================================
- Hits           4027     4026       -1     
  Misses         1001     1001              
- Partials        248      249       +1     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dbwiddis
Copy link
Member

Can we evaluate all the return codes and put them in a single PR?

I think provisioning should return a 202, for example.

Any others?

@owaiskazi19
Copy link
Member Author

Can we evaluate all the return codes and put them in a single PR?

This was the only one I was aware of. Can you point me where should we return 202 I can make the changes in the same PR?

@amitgalitz
Copy link
Member

amitgalitz commented Mar 14, 2025

Can we evaluate all the return codes and put them in a single PR?

This was the only one I was aware of. Can you point me where should we return 202 I can make the changes in the same PR?

Dan might mean here

channel.sendResponse(new BytesRestResponse(RestStatus.OK, builder));

@dbwiddis dbwiddis removed backport 2.x backport PRs to 2.x branch skip-changelog labels Mar 14, 2025
@dbwiddis
Copy link
Member

dbwiddis commented Mar 14, 2025

Dan might mean here

channel.sendResponse(new BytesRestResponse(RestStatus.OK, builder));

Yes, and also here if either provision or reprovision is true:

channel.sendResponse(new BytesRestResponse(RestStatus.CREATED, builder));

@dbwiddis
Copy link
Member

dbwiddis commented Mar 14, 2025

Yes, and also here if either provision or reprovision is true:

Although one might say 201 is still appropriate for provision; but should be 202 for reprovision, not 201.

@ohltyler thoughts?

Signed-off-by: Owais <[email protected]>
Copy link
Member

@dbwiddis dbwiddis left a comment

Choose a reason for hiding this comment

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

LGTM pending fixing tests for the new codes.

@owaiskazi19
Copy link
Member Author

These will probably need updates to the API Spec as well.

opensearch-project/opensearch-api-specification#842

Signed-off-by: Owais <[email protected]>
@owaiskazi19 owaiskazi19 changed the title Changed return code for RBAC Changed return code for RBAC and provision Mar 15, 2025
Copy link
Member

@dbwiddis dbwiddis left a comment

Choose a reason for hiding this comment

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

LGTM

@owaiskazi19 owaiskazi19 merged commit 1f163e1 into opensearch-project:main Mar 16, 2025
22 of 23 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.

3 participants