Skip to content

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

Description

@LeaveMyYard

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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions