Details

    • Type: Bug
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: PMM Manage
    • Labels:

      Description

      One example:

      --- FAIL: TestPrometheusReadDefaults (0.18s)
              Error Trace:    prometheus_test.go:275
              Error:          Received unexpected error rpc error: code = FailedPrecondition desc = scrape config with job name "test_config" is built-in
                      
              Error Trace:    prometheus_test.go:287
              Error:          Not equal: []prometheus.ScrapeConfig{prometheus.ScrapeConfig{JobName:"test_config", ScrapeInterval:"30s", ScrapeTimeout:"15s", MetricsPath:"/metrics", HonorLabels:false, Scheme:"http", BasicAuth:(*prometheus.BasicAuth)(nil), TLSConfig:prometheus.TLSConfig{InsecureSkipVerify:false}, StaticConfigs:[]prometheus.StaticConfig(nil), RelabelConfigs:[]prometheus.RelabelConfig(nil)}} (expected)
                                      != []prometheus.ScrapeConfig{} (actual)
                              
                              Diff:
                              --- Expected
                              +++ Actual
                              @@ -1,16 +1,2 @@
                              -([]prometheus.ScrapeConfig) (len=1 cap=1) {
                              - (prometheus.ScrapeConfig) {
                              -  JobName: (string) (len=11) "test_config",
                              -  ScrapeInterval: (string) (len=3) "30s",
                              -  ScrapeTimeout: (string) (len=3) "15s",
                              -  MetricsPath: (string) (len=8) "/metrics",
                              -  HonorLabels: (bool) false,
                              -  Scheme: (string) (len=4) "http",
                              -  BasicAuth: (*prometheus.BasicAuth)(<nil>),
                              -  TLSConfig: (prometheus.TLSConfig) {
                              -   InsecureSkipVerify: (bool) false
                              -  },
                              -  StaticConfigs: ([]prometheus.StaticConfig) <nil>,
                              -  RelabelConfigs: ([]prometheus.RelabelConfig) <nil>
                              - }
                              +([]prometheus.ScrapeConfig) {
                               }
                      
              Error Trace:    prometheus_test.go:290
              Error:          Received unexpected error rpc error: code = NotFound desc = scrape config with job name "test_config" not found
                      
              Error Trace:    prometheus_test.go:291
              Error:          Not equal: &prometheus.ScrapeConfig{JobName:"test_config", ScrapeInterval:"30s", ScrapeTimeout:"15s", MetricsPath:"/metrics", HonorLabels:false, Scheme:"http", BasicAuth:(*prometheus.BasicAuth)(nil), TLSConfig:prometheus.TLSConfig{InsecureSkipVerify:false}, StaticConfigs:[]prometheus.StaticConfig(nil), RelabelConfigs:[]prometheus.RelabelConfig(nil)} (expected)
                                      != (*prometheus.ScrapeConfig)(nil) (actual)
                              
                              Diff:
                              --- Expected
                              +++ Actual
                              @@ -1,15 +1,2 @@
                              -(*prometheus.ScrapeConfig)(0xc420ba8960)({
                              - JobName: (string) (len=11) "test_config",
                              - ScrapeInterval: (string) (len=3) "30s",
                              - ScrapeTimeout: (string) (len=3) "15s",
                              - MetricsPath: (string) (len=8) "/metrics",
                              - HonorLabels: (bool) false,
                              - Scheme: (string) (len=4) "http",
                              - BasicAuth: (*prometheus.BasicAuth)(<nil>),
                              - TLSConfig: (prometheus.TLSConfig) {
                              -  InsecureSkipVerify: (bool) false
                              - },
                              - StaticConfigs: ([]prometheus.StaticConfig) <nil>,
                              - RelabelConfigs: ([]prometheus.RelabelConfig) <nil>
                              -})
                              +(*prometheus.ScrapeConfig)(<nil>)
                               
                      
      FAIL
      exit status 1
      FAIL    github.com/percona/pmm-managed/services/prometheus      1.056s
      

      The code here tries to restore configuration file after each test. Looks like it fails to do it sometimes.

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                alexey.palazhchenko Alexey Palazhchenko
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: