-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use Pycurl for Xray #640
Use Pycurl for Xray #640
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 b3f3a41 in 1 minute and 26 seconds
More details
- Looked at
17
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. fennel/client/client.py:870
- Draft comment:
Consider using a constant (e.g., requests.codes.OK) instead of the magic number 200 for consistency. Also, ensure that using response["body"] provides a clear error message. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50%
The code was intentionally changed from using response.status_code to response["status_code"] and from response.json() to response["body"], suggesting a deliberate move away from the requests library response object to a dict-based response. Using requests.codes.OK would be inconsistent with this change. The comment about error message clarity is speculative.
The code change appears to be deliberately moving away from the requests library interface - am I missing some reason why requests.codes.OK would still be better?
No, the code changes show a clear pattern of moving from requests library interface to a dict-based interface. Using requests.codes.OK would go against this refactoring.
The comment should be deleted since it suggests reverting an intentional change and includes speculative concerns about error messages.
2. fennel/client/client.py:870
- Draft comment:
Prefer using requests.codes.OK over hardcoded 200 for consistency with other parts of the code. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50%
The comment is incorrect because response is a dict, not a requests.Response object. requests.codes.OK would not work here since we're accessing a dict key. The change from requests.codes.OK to 200 was actually necessary since the response format changed. The comment shows a misunderstanding of the code.
Could there be a good reason to use a constant instead of 200 for better maintainability, even if it's not requests.codes.OK specifically?
While using constants can be good practice, 200 is a universally standard HTTP status code that is unlikely to change. The suggestion to use requests.codes.OK specifically is incorrect here.
The comment should be deleted because it suggests using requests.codes.OK which would not work with the dict response format. The change to use 200 directly was correct.
3. fennel/client/client.py:317
- Draft comment:
Typographical errors in the 'erase' function docstring: Replace 'will be purge' with 'will be purged' for proper tense, and in the example, 'erase these key' should be 'erase these keys' for grammatical correctness. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_jtYWcASOlhsnkGNp
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.
raise Exception(response.json()) | ||
return response.json() | ||
if response["status_code"] != 200: | ||
raise Exception(response["body"]) |
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.
Raising an exception with response["body"] might expose internal details; consider wrapping it in a custom error message.
raise Exception(response["body"]) | |
raise Exception("Error occurred: " + response["body"]) |
Update fennel version in pyptoject.toml and changelog |
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 aa1c0ea in 2 minutes and 2 seconds
More details
- Looked at
25
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
8
drafted comments based on config settings.
1. fennel/CHANGELOG.md:3
- Draft comment:
Changelog entry is very brief. Consider adding a bit more context on what 'Use pycurl for xray' entails. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
2. pyproject.toml:3
- Draft comment:
Version bump to 1.5.80 and addition of pycurl dependency look correct. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
3. fennel/CHANGELOG.md:3
- Draft comment:
Changelog for v1.5.80 added. Consider adding more detail about why pycurl is preferred for Xray (e.g., performance/security benefits). - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
4. pyproject.toml:3
- Draft comment:
Version bumped to 1.5.80. Ensure that the pycurl dependency (line 27) is aligned with the new integration for Xray. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
5. fennel/CHANGELOG.md:4
- Draft comment:
In the [1.5.80] changelog entry, consider capitalizing 'Pycurl' and 'Xray' to match the commit title and maintain consistency. For example: '- Use Pycurl for Xray'. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50%
This is a very minor stylistic suggestion about capitalization in a changelog entry. Looking through the file history, there's no clear capitalization standard - both lowercase and capitalized versions are used. The comment doesn't point out any actual issues or bugs. It's purely about style preferences in documentation. The change would not meaningfully improve code quality or functionality.
Perhaps maintaining consistent capitalization across changelog entries would make the documentation more professional looking? But without an established style guide, this seems arbitrary.
While consistency can be good, making one-off style suggestions without an established standard creates more inconsistency. The current capitalization is perfectly readable and functional.
This comment should be deleted as it makes a minor stylistic suggestion without clear justification or established standards. It doesn't identify any actual issues that need fixing.
6. fennel/CHANGELOG.md:490
- Draft comment:
Typographical error: 'Upddated' should be corrected to 'Updated'. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
7. fennel/CHANGELOG.md:404
- Draft comment:
Typographical error: In the entry for '[1.1.3]', 'entitiy' should be corrected to 'entity'. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
8. fennel/CHANGELOG.md:666
- Draft comment:
Typographical error: 'aggegations' should be corrected to 'aggregations'. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_81Du6Ktzvxso2Qu1
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Replace
requests
withpycurl
for HTTP requests inxray()
inclient.py
and update dependencies and documentation accordingly.requests
withpycurl
for HTTP requests inxray()
inclient.py
.xray()
to usepycurl
.pycurl
as a dependency inpyproject.toml
.1.5.80
inpyproject.toml
.CHANGELOG.md
to mention the use ofpycurl
forxray
.This description was created by
for aa1c0ea. It will automatically update as commits are pushed.