-
Notifications
You must be signed in to change notification settings - Fork 1
feat: added permission check for onboarding #42
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Reviewed everything up to 5f3c9cd in 21 seconds
More details
- Looked at
68lines of code in3files - Skipped
0files when reviewing. - Skipped posting
1drafted comments based on config settings.
1. src/datapilot/core/platforms/dbt/cli/cli.py:111
- Draft comment:
Thevalidate_credentialsfunction returns aResponseobject, not a boolean. You should check the response status code or content to determine if the credentials are valid. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_qqCzNZxavW7huIRF
Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
| click.echo("Error: Invalid credentials.") | ||
| return | ||
|
|
||
| if not validate_permissions(token, backend_url, instance_name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The validate_permissions function returns a Response object, not a boolean. You should check the response status code or content to determine if the permissions are valid.
| endpoint = "/dbt/v3/validate-credentials" | ||
| return self.get(endpoint) | ||
|
|
||
| def validate_permissions(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validate_upload_to_integration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 25649dc in 16 seconds
More details
- Looked at
27lines of code in2files - Skipped
0files when reviewing. - Skipped posting
1drafted comments based on config settings.
1. src/datapilot/clients/altimate/utils.py:55
- Draft comment:
The functionvalidate_permissionsshould callvalidate_upload_to_integrationinstead ofvalidate_permissions. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment accurately describes the change made in the diff, as the function now callsvalidate_upload_to_integration. This suggests that the comment is correct and relevant to the change. There is strong evidence that the comment is about a change made in the diff and is not speculative or asking for confirmation.
The comment might be seen as stating the obvious since the change is already made in the diff. However, it does confirm that the change aligns with the intended function behavior.
Even if the comment seems obvious, it confirms the correctness of the change, which is valuable in a code review context.
The comment is correct and relevant to the change made in the diff. It should be kept as it confirms the intended behavior of the function.
Workflow ID: wflow_fmZ8gcDFJ06iL4ox
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
Important
Adds permission check to onboarding in
cli.pyand changes HTTP error logging level inclient.py.validate_permissions()inclient.pyandutils.pyto check user permissions.onboard()incli.pyto include permission check usingvalidate_permissions().errortodebugfor HTTP errors inget()inclient.py.This description was created by
for 25649dc. It will automatically update as commits are pushed.