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

prometheus-api-client==0.5.5 is not working #14

Open
LeaveMyYard opened this issue Mar 4, 2024 · 0 comments
Open

prometheus-api-client==0.5.5 is not working #14

LeaveMyYard opened this issue Mar 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@LeaveMyYard
Copy link

prometheus-api-client==0.5.5 removed PrometheusConnect.ssl_verification resulting in such error when trying to use it:

Traceback (most recent call last):                                                                                                                                                                                    
  File "/home/leavemyyard/Documents/Robusta/krr/robusta_krr/core/runner.py", line 298, in run                                                                                                                         
    result = await self._collect_result()                                                                                                                                                                             
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                             
  File "/home/leavemyyard/Documents/Robusta/krr/robusta_krr/core/runner.py", line 246, in _collect_result                                                                                                             
    await asyncio.gather(*[self._check_data_availability(cluster) for cluster in clusters])                                                                                                                           
  File "/home/leavemyyard/Documents/Robusta/krr/robusta_krr/core/runner.py", line 180, in _check_data_availability                                                                                                    
    prometheus_loader = self._get_prometheus_loader(cluster)                                                                                                                                                          
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                          
  File "/home/leavemyyard/Documents/Robusta/krr/robusta_krr/core/runner.py", line 63, in _get_prometheus_loader                                                                                                       
    raise result                                                                                                                                                                                                      
  File "/home/leavemyyard/Documents/Robusta/krr/robusta_krr/core/runner.py", line 52, in _get_prometheus_loader                                                                                                       
    self._metrics_service_loaders[cluster] = PrometheusMetricsLoader(cluster=cluster)                                                                                                                                 
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                 
  File "/home/leavemyyard/Documents/Robusta/krr/robusta_krr/core/integrations/prometheus/loader.py", line 47, in __init__                                                                                             
    loader = self.get_metrics_service(api_client=self.api_client, cluster=cluster)                                                                                                                                    
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                    
  File "/home/leavemyyard/Documents/Robusta/krr/robusta_krr/core/integrations/prometheus/loader.py", line 63, in get_metrics_service                                                                                  
    loader.check_connection()                                                                                                                                                                                         
  File "/home/leavemyyard/Documents/Robusta/krr/robusta_krr/core/integrations/prometheus/metrics_service/prometheus_metrics_service.py", line 107, in check_connection                                                
    self.prometheus.check_prometheus_connection()                                                                                                                                                                     
  File "/home/leavemyyard/.cache/pypoetry/virtualenvs/robusta-krr-BN7_AjVL-py3.11/lib/python3.11/site-packages/prometrix/connect/custom_connect.py", line 99, in check_prometheus_connection                          
    response = self._custom_query(query="example", params=params)                                                                                                                                                     
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                     
  File "/home/leavemyyard/.cache/pypoetry/virtualenvs/robusta-krr-BN7_AjVL-py3.11/lib/python3.11/site-packages/prometrix/connect/custom_connect.py", line 74, in _custom_query                                        
    verify=self.ssl_verification,                                                                                                                                                                                     
           ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                      
AttributeError: 'CustomPrometheusConnect' object has no attribute 'ssl_verification'
@LeaveMyYard LeaveMyYard added the bug Something isn't working label Mar 4, 2024
fabaff added a commit to fabaff/nixpkgs that referenced this issue May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant