fix(rpc): Correct config key for rpc endpoints
The config key should be based on the protobuf classes instead of the endpoint.
:x: 1 Tests Failed:
| Tests completed | Failed | Passed | Skipped |
|---|---|---|---|
| 690 | 1 | 689 | 1 |
View the top 1 failed tests by shortest run time
tests.clickhouse.optimize.test_optimize_scheduler test_get_next_schedule_raises_exceptionStack Traces | 0.001s run time
Traceback (most recent call last): File ".../clickhouse/optimize/test_optimize_scheduler.py", line 242, in test_get_next_schedule_raises_exception with pytest.raises(OptimizedSchedulerTimeout): File ".../local/lib/python3.11.../site-packages/_pytest/python_api.py", line 970, in __exit__ fail(self.message) File ".../local/lib/python3.11.../site-packages/_pytest/outcomes.py", line 196, in fail raise Failed(msg=reason, pytrace=pytrace) Failed: DID NOT RAISE <class 'snuba.clickhouse.optimize.optimize_scheduler.OptimizedSchedulerTimeout'>
To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard
@Zylphrex
How strongly do you feel that this should be the case? I'm not super attached to it but also don't necessarily feel like updating all the tests. The current naming convention follows the endpoint_* file naming conventions stated here
@Zylphrex
How strongly do you feel that this should be the case? I'm not super attached to it but also don't necessarily feel like updating all the tests. The current naming convention follows the
endpoint_*file naming conventions stated here
I'm not attached to it but the names of the classes are now public interface as it determines the endpoint. So if we were to use the class names in snuba to decide the endpoint paths, we now have to
- ensure they do not change
- we now need to hard code a mapping from the rpc name to the snuba class name within the sentry code base for every rpc call as we can not rely on the rpc class to tell us which endpoint it needs to call
we now need to hard code a mapping from the rpc name to the snuba class name within the sentry code base for every rpc call as we can not rely on the rpc class to tell us which endpoint it needs to call
@Zylphrex I see what you're saying. Here is what I will say. In gRPC, the definition of the RPC and request/response payload are separate (example) because they are separate things. When we switch to gRPC you'd have to do this anyways. What you are proposing would make that transition more difficult
Closing this in favour of helper functions in sentry that maps to each rpc endpoint