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

[Workspace][Feature] Backport the change of ACL in main #279

Merged
merged 9 commits into from
Mar 11, 2024

Conversation

gaobinlong
Copy link
Collaborator

Description

Backport the PR opensearch-project#5084 in the osd core repo to the workspace branch in this repo.

Issues Resolved

Screenshot

Testing the changes

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

* [Workspace] Add ACL related functions for workspace (opensearch-project#146)

* [Workspace] Add acl related functions for workspace

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Minor change

Signed-off-by: gaobinlong <gbinlong@amazon.com>

---------

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Modify changelog

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Add more unit test cases

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Modify test case

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Some minor change

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Add more test cases

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Optimize some code and the comments of the functions

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Add more comments for some basic functions

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Export more interfaces

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* consume permissions in repository

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: consume permissions in serializer

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* Add unit tests for consuming permissions in repository

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Remove double exclamation

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Rename some variables

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Remove duplicated semicolon

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Add permissions field to the mapping only if the permission control is enabled

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Fix test failure

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Add feature flag config to the yml file

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Make the comment of feature flag more clear

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Make comment more clear

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Remove management permission type

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Fix test failure

Signed-off-by: gaobinlong <gbinlong@amazon.com>

---------

Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.77%. Comparing base (0ee4023) to head (e01214f).

Additional details and impacted files
@@              Coverage Diff              @@
##           workspace     #279      +/-   ##
=============================================
+ Coverage      59.07%   66.77%   +7.69%     
=============================================
  Files           3026     3341     +315     
  Lines          58158    64888    +6730     
  Branches        9118    10475    +1357     
=============================================
+ Hits           34357    43326    +8969     
+ Misses         21878    18990    -2888     
- Partials        1923     2572     +649     
Flag Coverage Δ
Linux_1 31.41% <12.50%> (-0.01%) ⬇️
Linux_2 55.34% <100.00%> (+0.10%) ⬆️
Linux_3 41.72% <12.50%> (?)
Linux_4 34.86% <12.50%> (-0.01%) ⬇️

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.

@wanglam
Copy link
Collaborator

wanglam commented Mar 6, 2024

@gaobinlong Shall we also backport to workspace-pr-integr branch? The integration tests seems failed. Should we fix it in this PR?

Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Copy link
Collaborator

@SuZhou-Joe SuZhou-Joe left a comment

Choose a reason for hiding this comment

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

LGTM, and please backport to workspace-pr-intepr branch once this PR get merged

@gaobinlong
Copy link
Collaborator Author

LGTM, and please backport to workspace-pr-intepr branch once this PR get merged

Thanks, but there are serval failed functional tests which confuse me too much, not sure whether they're related to the change in this PR. And I've opened another PR to introduce these changes to the workspace-pr-intepr branch, all tests have passed, so it has been merged yet.

@SuZhou-Joe SuZhou-Joe merged commit 9c0dcd2 into ruanyl:workspace Mar 11, 2024
30 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants