Skip to content

Flaky tests due to changes in the geoip database #13073

Closed
@lahsivjar

Description

@lahsivjar

APM Server version (apm-server version): all

Description of the problem including expected versus actual behavior: There are frequent test failures due to changes to the geoip database. This leads to unnecessary time in fixing these and then eventually reverting the fixes.

Get to the bottom of why these changes happen and how we can minimize impact for us. If these changes are to be expected then update the test to only assert that geoip db is indeed working by checking for the existence of a single client.geo.* field.

Provide logs (if relevant):

https://github.com/elastic/apm-server/actions/runs/8921322845/job/24501200877?pr=13066

=== FAIL: systemtest TestOTLPGRPCLogsClientIP (1.57s)
    otlp_test.go:521:   []any{
          	map[string]any{
          		"@timestamp":                  []any{string("1970-01-01T00:00:01.000Z")},
          		"agent.name":                  []any{string("android/java")},
          		"agent.version":               []any{string("unknown")},
        - 		"client.geo.city_name":        []any{string("dynamic")},
          		"client.geo.continent_name":   []any{string("Europe")},
          		"client.geo.country_iso_code": []any{string("DE")},
          		"client.geo.country_name":     []any{string("Germany")},
          		"client.geo.location":         []any{string("dynamic")},
        - 		"client.geo.region_iso_code":  []any{string("dynamic")},
        - 		"client.geo.region_name":      []any{string("dynamic")},
          		"client.ip":                   []any{string("178.162.206.244")},
          		"data_stream.dataset":         []any{string("apm.app.unknown")},
          		... // 16 identical entries
          	},
          }
        
        Test failed. Run `make check-approvals` to verify the diff.
        
    server.go:133: log file: /home/runner/work/apm-server/apm-server/systemtest/logs/TestOTLPGRPCLogsClientIP/apm-server

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions