Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add falcon version 1.4.1 support to opentelemetry-instrumentation-falcon #1000
Add falcon version 1.4.1 support to opentelemetry-instrumentation-falcon #1000
Changes from all commits
bed6abd
fe95bca
956f707
746f30f
8f10e84
990c990
d18abc9
74c14b4
02b9616
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Curious, if
remote_addr="127.0.0.1"
was removed from the call tosimulate_request
then why should it appear here? Is this a default value? If so, it would be good to test also a non-default value.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.
@ocelotl,
In falcon 1.4.1 (the new version added in this PR), the remote_addr param doesn't exist. This to me wasn't a huge deal as in the tests, it was being tested with the default value anyways, '127.0.0.1'. So I removed the remote_addr param from the tests.
However in falcon 3.x, there was an update to the code that was made which doesn't set the remote_addr if the default value is used. (See my comment above) or
https://github.com/falconry/falcon/blob/2.0.0/falcon/testing/helpers.py#L176
vs
https://github.com/falconry/falcon/blob/3.0.1/falcon/testing/helpers.py#L1168-L1172
This is different to how it was done in falcon 2.x where the remote_addr was always set, just with the default value.
The if statement in the test here was a compromise to show that there is something strange going on between the different versions.
If you have any thoughts on this, please let me know. I am open to suggestions.
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.
Ok, that's fine, can you please add this explanation to the test as a comment? ✌️
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.
Added. Thank you