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

[8.7] [kbn-failed-test-reporter-cli] truncate report message to fix github api call failure (#155141) #155286

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.7:

Questions ?

Please refer to the Backport tool documentation

…api call failure (elastic#155141)

## Summary

We recently had a
[failure](https://buildkite.com/elastic/kibana-on-merge/builds/29020#018792bc-498a-46d1-9343-fb791823d92e)
while calling Github API to open new issue:

```
2023-04-18 07:56:26 CEST	ERROR Error: [post https://api.github.com/repos/elastic/kibana/issues] 422 Unprocessable Entity Error: {"message":"Validation Failed","errors":[{"resource":"Issue","code":"custom","field":"body","message":"body is too long"},{"resource":"Issue","code":"custom","field":"body","message":"body is too long (maximum is 65536 characters)"}],"documentation_url":"https://docs.github.com/rest/reference/issues#create-an-issue"}
2023-04-18 07:56:26 CEST	          at GithubApi.request (github_api.ts:177:17)
2023-04-18 07:56:26 CEST	          at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-04-18 07:56:26 CEST	          at GithubApi.createIssue (github_api.ts:106:18)
2023-04-18 07:56:26 CEST	          at createFailureIssue (report_failure.ts:39:10)
2023-04-18 07:56:26 CEST	          at description (failed_tests_reporter_cli.ts:153:28)
2023-04-18 07:56:26 CEST	          at run.ts:70:7
2023-04-18 07:56:26 CEST	          at withProcRunner (with_proc_runner.ts:29:5)
2023-04-18 07:56:26 CEST	          at run (run.ts:69:5)
```

It seems like some test might have a very long failure message that
reaches Github body length limit and causes a failure.

Since mocha truncates failure message to 8192 chars, I thought it might
be a good option for Github issues as well (Having too long message is
not very useful anyway)

(cherry picked from commit 271d9aa)
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @dmlemeshko

rylnd added a commit that referenced this pull request Apr 21, 2023
* 8.7: (93 commits)
  [8.7] [Controls] Use EUI Selectable for Field search (#151231) (#155454)
  [8.7] [Synthetics] Fix  performance breakdown link from error details page (#155393) (#155427)
  [8.7] [DOCS] Remove or move book-scoped attributes (#155210) (#155426)
  [8.7] [Synthetics] add default email recovery message (#154862) (#155418)
  [8.7] [Uptime] Add both both ip filters for view host in uptime location for host and monitor (#155382) (#155399)
  [8.7] Setup Node.js environment before instrumenting Kibana with APM. (#155063) (#155300)
  [8.7] [Discover] Address react warnings for legacy table (#154579) (#155345)
  [8.7] [Fleet] Fix logs useless rerender (#155305) (#155310)
  [8.7] [kbn-failed-test-reporter-cli] truncate report message to fix github api call failure (#155141) (#155286)
  [8.7][APM] Fleet migration support for bundled APM package (#153159)  (#155281)
  [8.7] [Enterprise Search] Fix Connector scheduling show week information correctly (#155191) (#155227)
  [8.7] [Synthetics] Fix pending count in case of location filtering (#155200) (#155225)
  [8.7] [Controls] Add Expensive Queries Fallback (#155082) (#155189)
  [8.7] [data view field editor] Runtime field code editor - move state out of controller (#155107) (#155150)
  [8.7] [FullStory] Update snippet (#153570) (#155138)
  [8.7] [Security Solution][Exceptions] - Fix exception operator logic when mapping conflict (#155071) (#155094)
  [DOCS] Adds 8.7.1 release notes (#154844)
  [8.7] Sync bundled packages with Package Storage (#155042)
  [APM] plugin description (#154811)
  Update api.asciidoc (#155021)
  ...
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.

3 participants