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

Failing test: APM API Integration tests (basic).x-pack/test/apm_api_integration/tests/services/agent·spec·ts - APM API tests services/agent.spec.ts basic apm_8.0.0 Agent name when data is loaded returns the agent name #175756

Closed
kibanamachine opened this issue Jan 27, 2024 · 6 comments · Fixed by #196569
Assignees
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:APM All issues that need APM UI Team support

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Jan 27, 2024

A test failed on a tracked branch

ApmApiError: Unhandled ApmApiError.
Status: "500"
Endpoint: "GET /internal/apm/services/{serviceName}/agent"
Body: {"statusCode":500,"error":"Internal Server Error","message":"Cannot read properties of undefined (reading '_source')","attributes":{"data":{},"_inspect":[]}}
    at Proxy.<anonymous> (apm_api_supertest.ts:63:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Context.<anonymous> (agent.spec.ts:42:26)
    at Object.apply (wrap_function.js:73:16) {
  res: <ref *1> Response {
    _events: [Object: null prototype] {},
    _eventsCount: 0,
    _maxListeners: undefined,
    res: { method: null, url: '', complete: true, aborted: false },
    request: Test {
      _events: [Object: null prototype],
      _eventsCount: 1,
      _maxListeners: undefined,
      _enableHttp2: false,
      _agent: false,
      _formData: null,
      method: 'GET',
      url: 'http://viewer:changeme@localhost:5620/internal/apm/services/opbeans-node/agent?start=2021-08-03T06%3A50%3A15.910Z&end=2021-08-03T07%3A20%3A15.910Z',
      _header: [Object],
      header: [Object],
      writable: true,
      _redirects: 0,
      _maxRedirects: 0,
      cookies: '',
      qs: {},
      _query: [],
      qsRaw: [],
      _redirectList: [],
      _streamRequest: false,
      _lookup: undefined,
      _buffer: true,
      app: 'http://viewer:changeme@localhost:5620',
      _asserts: [],
      req: [ClientRequest],
      protocol: 'http:',
      host: 'localhost:5620',
      _endCalled: true,
      _callback: [Function (anonymous)],
      _fullfilledPromise: [Promise],
      res: [Object],
      _resBuffered: true,
      response: [Circular *1],
      called: true,
      [Symbol(kCapture)]: false
    },
    req: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: true,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: true,
      socket: [Socket],
      _header: 'GET /internal/apm/services/opbeans-node/agent?start=2021-08-03T06%3A50%3A15.910Z&end=2021-08-03T07%3A20%3A15.910Z HTTP/1.1\r\n' +
        'Host: localhost:5620\r\n' +
        'Accept-Encoding: gzip, deflate\r\n' +
        'kbn-xsrf: foo\r\n' +
        'x-elastic-internal-origin: foo\r\n' +
        'Authorization: Basic dmlld2VyOmNoYW5nZW1l\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '/internal/apm/services/opbeans-node/agent?start=2021-08-03T06%3A50%3A15.910Z&end=2021-08-03T07%3A20%3A15.910Z',
      _ended: true,
      res: [Object],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'localhost',
      protocol: 'http:',
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 16384,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    text: `{"statusCode":500,"error":"Internal Server Error","message":"Cannot read properties of undefined (reading '_source')","attributes":{"data":{},"_inspect":[]}}`,
    files: undefined,
    buffered: true,
    headers: {
      'x-content-type-options': 'nosniff',
      'referrer-policy': 'no-referrer-when-downgrade',
      'permissions-policy': 'camera=(), display-capture=(), fullscreen=(self), geolocation=(), microphone=(), web-share=()',
      'cross-origin-opener-policy': 'same-origin',
      'content-security-policy': "script-src 'report-sample' 'self'; worker-src 'report-sample' 'self' blob:; style-src 'report-sample' 'self' 'unsafe-inline'",
      'kbn-name': 'kb-n2-4-spot-59aeabed1de730b1',
      'kbn-license-sig': '064982403f1941fe28c53ac8b8c9ee52a61aa022093b248aa9e45772dc3b4b56',
      'content-type': 'application/json; charset=utf-8',
      'cache-control': 'private, no-cache, no-store, must-revalidate',
      'content-length': '157',
      date: 'Sat, 27 Jan 2024 17:56:55 GMT',
      connection: 'close'
    },
    header: {
      'x-content-type-options': 'nosniff',
      'referrer-policy': 'no-referrer-when-downgrade',
      'permissions-policy': 'camera=(), display-capture=(), fullscreen=(self), geolocation=(), microphone=(), web-share=()',
      'cross-origin-opener-policy': 'same-origin',
      'content-security-policy': "script-src 'report-sample' 'self'; worker-src 'report-sample' 'self' blob:; style-src 'report-sample' 'self' 'unsafe-inline'",
      'kbn-name': 'kb-n2-4-spot-59aeabed1de730b1',
      'kbn-license-sig': '064982403f1941fe28c53ac8b8c9ee52a61aa022093b248aa9e45772dc3b4b56',
      'content-type': 'application/json; charset=utf-8',
      'cache-control': 'private, no-cache, no-store, must-revalidate',
      'content-length': '157',
      date: 'Sat, 27 Jan 2024 17:56:55 GMT',
      connection: 'close'
    },
    statusCode: 500,
    status: 500,
    statusType: 5,
    info: false,
    ok: false,
    redirect: false,
    clientError: false,
    serverError: true,
    error: Error: cannot GET /internal/apm/services/opbeans-node/agent?start=2021-08-03T06%3A50%3A15.910Z&end=2021-08-03T07%3A20%3A15.910Z (500)
        at Response.toError (/var/lib/buildkite-agent/builds/kb-n2-4-spot-59aeabed1de730b1/elastic/kibana-on-merge/kibana/node_modules/superagent/src/node/response.js:110:17)
        at Response._setStatusProperties (/var/lib/buildkite-agent/builds/kb-n2-4-spot-59aeabed1de730b1/elastic/kibana-on-merge/kibana/node_modules/superagent/src/response-base.js:107:48)
        at new Response (/var/lib/buildkite-agent/builds/kb-n2-4-spot-59aeabed1de730b1/elastic/kibana-on-merge/kibana/node_modules/superagent/src/node/response.js:41:8)
        at Test._emitResponse (/var/lib/buildkite-agent/builds/kb-n2-4-spot-59aeabed1de730b1/elastic/kibana-on-merge/kibana/node_modules/superagent/src/node/index.js:953:20)
        at fn (/var/lib/buildkite-agent/builds/kb-n2-4-spot-59aeabed1de730b1/elastic/kibana-on-merge/kibana/node_modules/superagent/src/node/index.js:1166:38)
        at IncomingMessage.<anonymous> (/var/lib/buildkite-agent/builds/kb-n2-4-spot-59aeabed1de730b1/elastic/kibana-on-merge/kibana/node_modules/superagent/src/node/parsers/json.js:19:7)
        at IncomingMessage.emit (node:events:526:35)
        at endReadableNT (node:internal/streams/readable:1589:12)
        at processTicksAndRejections (node:internal/process/task_queues:82:21) {
      status: 500,
      text: `{"statusCode":500,"error":"Internal Server Error","message":"Cannot read properties of undefined (reading '_source')","attributes":{"data":{},"_inspect":[]}}`,
      method: 'GET',
      path: '/internal/apm/services/opbeans-node/agent?start=2021-08-03T06%3A50%3A15.910Z&end=2021-08-03T07%3A20%3A15.910Z'
    },
    created: false,
    accepted: false,
    noContent: false,
    badRequest: false,
    unauthorized: false,
    notAcceptable: false,
    forbidden: false,
    notFound: false,
    unprocessableEntity: false,
    type: 'application/json',
    charset: 'utf-8',
    links: {},
    setEncoding: [Function: bound ],
    redirects: [],
    _body: {
      statusCode: 500,
      error: 'Internal Server Error',
      message: "Cannot read properties of undefined (reading '_source')",
      attributes: [Object]
    },
    pipe: [Function (anonymous)],
    [Symbol(kCapture)]: false
  }
}

First failure: CI Build - main

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Jan 27, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Jan 27, 2024
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@mistic mistic added the Team:APM All issues that need APM UI Team support label Jan 29, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:APM)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 29, 2024
mistic added a commit that referenced this issue Jan 29, 2024
@mistic
Copy link
Member

mistic commented Jan 29, 2024

Skipped.

main: 6f8c275

@cauemarcondes cauemarcondes self-assigned this Feb 15, 2024
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this issue Feb 15, 2024
fkanout pushed a commit to fkanout/kibana that referenced this issue Mar 4, 2024
@bhavyarm
Copy link
Contributor

@cauemarcondes is this skipped test handled? If so, can we close this issue? Thanks very much!

@cauemarcondes
Copy link
Contributor

This test is still skipped... I moved it back to our board and I'll look into it when I get the chance.

@crespocarlos
Copy link
Contributor

crespocarlos commented Jul 10, 2024

This is a strange problem. The exception is thrown here and that line can only reached, if total > 0, but if total > 0, it doesn't make sense for the hits array to be empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:APM All issues that need APM UI Team support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants