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

describe the user #3300

Merged
merged 23 commits into from
Nov 25, 2021
Merged

describe the user #3300

merged 23 commits into from
Nov 25, 2021

Conversation

heroicNeZha
Copy link
Contributor

@heroicNeZha heroicNeZha commented Nov 10, 2021

What type of PR is this?

  • bug
  • feature
  • enhancement

What does this PR do?

$ desc user endy
+---------+------------------------------------+
| Account | Roles in spaces |
+---------+------------------------------------+
| "endy" | " USER in nba, USER in my_space_1" |
+---------+------------------------------------+
Got 1 rows (time spent 1319/6278 us)

Which issue(s)/PR(s) this PR relates to?

how to describe the user? #2574
#2574

Special notes for your reviewer, ex. impact of this fix, etc:

Additional context:

Checklist:

  • Documentation affected (Please add the label if documentation needs to be modified.)
  • Incompatible (If it is incompatible, please describe it and add corresponding label.)
  • Need to cherry-pick (If need to cherry-pick to some branches, please label the destination version(s).)
  • Performance impacted: Consumes more CPU/Memory

Release notes:

Please confirm whether to reflect in release notes and how to describe:

                                                            `

@CLAassistant
Copy link

CLAassistant commented Nov 10, 2021

CLA assistant check
All committers have signed the CLA.

@Sophie-Xie Sophie-Xie added the ready-for-testing PR: ready for the CI test label Nov 10, 2021
@Sophie-Xie Sophie-Xie requested review from yixinglu, Shylock-Hg and CPWstatic and removed request for yixinglu November 10, 2021 10:11
src/parser/scanner.lex Outdated Show resolved Hide resolved
src/graph/validator/ACLValidator.cpp Show resolved Hide resolved
@yixinglu yixinglu changed the title how to describe the user? #2574 how to describe the user? Nov 10, 2021
@yixinglu yixinglu changed the title how to describe the user? describe the user Nov 10, 2021
Copy link
Contributor

@yixinglu yixinglu left a comment

Choose a reason for hiding this comment

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

Could you add some TCK test cases for DESCRIBE USER ?

  • root describe guest and root
  • admin describe other admin
  • guest describe root or admin

src/graph/service/PermissionManager.cpp Outdated Show resolved Hide resolved
CPWstatic
CPWstatic previously approved these changes Nov 15, 2021
@heroicNeZha
Copy link
Contributor Author

Could you add some TCK test cases for DESCRIBE USER ?

  • root describe guest and root
  • admin describe other admin
  • guest describe root or admin

done

tests/tck/features/user/User.feature Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
yixinglu
yixinglu previously approved these changes Nov 16, 2021
yixinglu
yixinglu previously approved these changes Nov 18, 2021
@heroicNeZha heroicNeZha linked an issue Nov 24, 2021 that may be closed by this pull request
@@ -2714,6 +2723,7 @@ traverse_sentence
| delete_edge_sentence { $$ = $1; }
| show_queries_sentence { $$ = $1; }
| kill_query_sentence { $$ = $1; }
| describe_user_sentence { $$ = $1; }
Copy link
Contributor

@Shylock-Hg Shylock-Hg Nov 24, 2021

Choose a reason for hiding this comment

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

The traverse_sentence means supporting input/output. Don't put it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The desc_user_sentcence supports output pipe.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why need this? Normally, admin sentence don't support it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To Support desc user user1 | YIELD $-.role where $-.space == "space3"

Copy link
Contributor

Choose a reason for hiding this comment

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

Does this pass in discussion meeting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yixinglu From Yee‘s conversation

@Shylock-Hg Shylock-Hg added the doc affected PR: improvements or additions to documentation label Nov 24, 2021
@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2021

Codecov Report

Merging #3300 (5bf95f4) into master (6541438) will decrease coverage by 0.04%.
The diff coverage is 84.31%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3300      +/-   ##
==========================================
- Coverage   85.31%   85.26%   -0.05%     
==========================================
  Files        1289     1279      -10     
  Lines      120073   118989    -1084     
==========================================
- Hits       102442   101459     -983     
+ Misses      17631    17530     -101     
Impacted Files Coverage Δ
src/clients/meta/MetaClient.cpp 75.99% <ø> (-0.53%) ⬇️
src/clients/meta/MetaClient.h 95.65% <ø> (ø)
src/graph/optimizer/rule/TopNRule.cpp 95.83% <ø> (ø)
src/graph/planner/plan/Admin.cpp 56.14% <0.00%> (-2.05%) ⬇️
src/graph/planner/plan/PlanNode.h 81.25% <ø> (ø)
src/graph/util/ExpressionUtils.h 100.00% <ø> (ø)
src/graph/validator/MaintainValidator.cpp 84.21% <ø> (+1.55%) ⬆️
src/graph/validator/MaintainValidator.h 80.30% <ø> (+4.72%) ⬆️
src/kvstore/raftex/RaftPart.h 98.30% <ø> (ø)
src/meta/MetaServiceHandler.cpp 87.50% <ø> (-0.88%) ⬇️
... and 75 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c6d1046...5bf95f4. Read the comment docs.

Copy link
Contributor

@Shylock-Hg Shylock-Hg left a comment

Choose a reason for hiding this comment

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

LGMT except allowing input/output. How do you think about it? @CPWstatic

| "ADMIN" | "user_tmp_space_4" |
When executing query:
"""
DESC USER user1 | YIELD $-.space as sp
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe more tests about: SHOW USERS | DESC USER $-.Account

@yixinglu yixinglu merged commit a14d7b4 into vesoft-inc:master Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc affected PR: improvements or additions to documentation ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

how to describe the user?
7 participants