open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.73k stars 2.16k forks source link

[receiver/mongodbatlas] Integration tests failing #32543

Open crobert-1 opened 2 months ago

crobert-1 commented 2 months ago

Component(s)

receiver/mongodbatlas

Describe the issue you're reporting

Failing CI/CD link

Note that this test hasn't been running for some time, as explained in https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32207, so this failure may not be the result of a recent change.

Failure output:

Running target 'mod-integration-test' in module 'receiver/mongodbatlasreceiver' as part of group 'receiver-1'
make --no-print-directory -C receiver/mongodbatlasreceiver mod-integration-test
running go integration test ./... in /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver
/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/.tools/gotestsum --rerun-fails=1 --packages="./..." -- -race -timeout 360s -parallel 4 -tags=integration,""
∅  internal
∅  internal/model
✓  internal/metadata (1.248s)
✖  . (18.677s)

DONE 128 tests, 7 failures in 22.797s

✖  . (18ms)
✖  . (19ms)
✖  . (18ms)
✖  . (19ms)
✖  . (18ms)

=== Failed
=== FAIL: . TestAlertsReceiver/metric-threshold-closed.yaml (0.00s)
    alerts_integration_test.go:81: 
            Error Trace:    /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/alerts_integration_test.go:81
            Error:          Received unexpected error:
                            open testdata/alerts/sample-payloads/metric-threshold-closed.yaml: no such file or directory
            Test:           TestAlertsReceiver/metric-threshold-closed.yaml

=== FAIL: . TestAlertsReceiver/new-primary.yaml (0.00s)
    alerts_integration_test.go:81: 
            Error Trace:    /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/alerts_integration_test.go:81
            Error:          Received unexpected error:
                            open testdata/alerts/sample-payloads/new-primary.yaml: no such file or directory
            Test:           TestAlertsReceiver/new-primary.yaml

=== FAIL: . TestAlertsReceiver (0.00s)

=== FAIL: . TestAlertsReceiverTLS/metric-threshold-closed.yaml (0.00s)
    alerts_integration_test.go:141: 
            Error Trace:    /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/alerts_integration_test.go:141
            Error:          Received unexpected error:
                            unable to create a MongoDB Atlas Alerts Receiver instance: failed to load TLS config: failed to load TLS cert and key: failed to load TLS cert and key PEMs: x509: certificate contains duplicate extensions
            Test:           TestAlertsReceiverTLS/metric-threshold-closed.yaml

=== FAIL: . TestAlertsReceiverTLS/new-primary.yaml (0.00s)
make[2]: *** [../../Makefile.Common:142: mod-integration-test] Error 1
make[1]: *** [Makefile:165: receiver/mongodbatlasreceiver] Error 2
make: *** [Makefile:122: gointegration-test] Error 2
    alerts_integration_test.go:141: 
            Error Trace:    /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/alerts_integration_test.go:141
            Error:          Received unexpected error:
                            unable to create a MongoDB Atlas Alerts Receiver instance: failed to load TLS config: failed to load TLS cert and key: failed to load TLS cert and key PEMs: x509: certificate contains duplicate extensions
            Test:           TestAlertsReceiverTLS/new-primary.yaml

=== FAIL: . TestAlertsReceiverTLS (0.00s)

=== FAIL: . TestAtlasPoll (0.00s)
    alerts_integration_test.go:191: 
            Error Trace:    /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/alerts_integration_test.go:191
            Error:          Received unexpected error:
                            open testdata/alerts/sample-payloads/metric-threshold-closed.yaml: no such file or directory
            Test:           TestAtlasPoll

=== FAIL: . TestAlertsReceiver/metric-threshold-closed.yaml (re-run 1) (0.00s)
    alerts_integration_test.go:81: 
            Error Trace:    /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/alerts_integration_test.go:81
            Error:          Received unexpected error:
                            open testdata/alerts/sample-payloads/metric-threshold-closed.yaml: no such file or directory
            Test:           TestAlertsReceiver/metric-threshold-closed.yaml

=== FAIL: . TestAlertsReceiver (re-run 1) (0.00s)

=== FAIL: . TestAlertsReceiver/new-primary.yaml (re-run 1) (0.00s)
    alerts_integration_test.go:81: 
            Error Trace:    /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/alerts_integration_test.go:81
            Error:          Received unexpected error:
                            open testdata/alerts/sample-payloads/new-primary.yaml: no such file or directory
            Test:           TestAlertsReceiver/new-primary.yaml

=== FAIL: . TestAlertsReceiver (re-run 1) (0.00s)

=== FAIL: . TestAlertsReceiverTLS/metric-threshold-closed.yaml (re-run 1) (0.00s)
    alerts_integration_test.go:141: 
            Error Trace:    /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/alerts_integration_test.go:141
            Error:          Received unexpected error:
                            unable to create a MongoDB Atlas Alerts Receiver instance: failed to load TLS config: failed to load TLS cert and key: failed to load TLS cert and key PEMs: x509: certificate contains duplicate extensions
            Test:           TestAlertsReceiverTLS/metric-threshold-closed.yaml

=== FAIL: . TestAlertsReceiverTLS (re-run 1) (0.00s)

=== FAIL: . TestAlertsReceiverTLS/new-primary.yaml (re-run 1) (0.00s)
    alerts_integration_test.go:141: 
            Error Trace:    /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/alerts_integration_test.go:141
            Error:          Received unexpected error:
                            unable to create a MongoDB Atlas Alerts Receiver instance: failed to load TLS config: failed to load TLS cert and key: failed to load TLS cert and key PEMs: x509: certificate contains duplicate extensions
            Test:           TestAlertsReceiverTLS/new-primary.yaml

=== FAIL: . TestAlertsReceiverTLS (re-run 1) (0.00s)

=== FAIL: . TestAtlasPoll (re-run 1) (0.00s)
    alerts_integration_test.go:191: 
            Error Trace:    /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/alerts_integration_test.go:191
            Error:          Received unexpected error:
                            open testdata/alerts/sample-payloads/metric-threshold-closed.yaml: no such file or directory
            Test:           TestAtlasPoll

DONE 2 runs, 137 tests, 16 failures in 27.840s
make[1]: Leaving directory '/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib'
github-actions[bot] commented 2 months ago

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

crobert-1 commented 2 months ago

I've posted a PR that should mostly resolve this, all that's left should be to regenerate some (or all) of the certificates being used in the TestAlertsReceiverTLS test.

github-actions[bot] commented 1 week ago

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.