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

YDA-5953 uuUserExists with rule_user_exists #15

Merged
merged 5 commits into from
Oct 14, 2024

Conversation

FuHsinyu
Copy link
Member

@FuHsinyu FuHsinyu commented Oct 2, 2024

  1. Tested with rule_interface.call_rule_user_exists(user) for either case of rule_user_exists and uuUserExists. (running make and make install are required to update the rule base)
  2. Suggest to test the rule_user_exists based on the branch (if not merged to development): Example for refactoring (part of) a legacy rule to Python yoda-ruleset#516

@FuHsinyu FuHsinyu requested a review from stsnel October 2, 2024 06:30
Copy link
Member

@stsnel stsnel left a comment

Choose a reason for hiding this comment

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

This looks good to me in general 👍

Can we move the code to retrieve the client_hints and select the right rule name to the constructor of RuleInterface? In that case we have to request client hints only once, rather than invoking this API endpoint for every rule invocation (which would double the number of API calls for checking whether users already exist).

@FuHsinyu
Copy link
Member Author

FuHsinyu commented Oct 7, 2024

@stsnel I have updated the codes based on your suggestions.
It is workes in my env, can you also check if the func works in your env against uuUserExists and rule_user_exists?
Any other comment, pls let me know.
Thank you in advance!

Copy link
Member

@stsnel stsnel left a comment

Choose a reason for hiding this comment

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

Looks good in general 👍, have added a few comments about specific parts...

yclienttools/common_rules.py Outdated Show resolved Hide resolved
yclienttools/common_rules.py Show resolved Hide resolved
Copy link
Member

@stsnel stsnel left a comment

Choose a reason for hiding this comment

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

Great, LGTM 👍

@stsnel stsnel merged commit 3355a65 into master Oct 14, 2024
10 checks passed
@stsnel stsnel deleted the YDA-5953-port-uuUserExists-to-python branch October 14, 2024 07:16
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.

2 participants