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

Fix flaky migrations tests #111365

Merged
merged 1 commit into from
Sep 7, 2021
Merged

Conversation

rudolf
Copy link
Contributor

@rudolf rudolf commented Sep 7, 2021

Summary

Closes #110918
Closes #110970

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@rudolf rudolf added release_note:skip Skip the PR/issue when compiling release notes v8.0.0 v7.16.0 labels Sep 7, 2021
@rudolf rudolf marked this pull request as ready for review September 7, 2021 11:35
@rudolf rudolf requested a review from a team as a code owner September 7, 2021 11:35
@rudolf rudolf enabled auto-merge (squash) September 7, 2021 11:35
@rudolf rudolf added the auto-backport Deprecated - use backport:version if exact versions are needed label Sep 7, 2021
@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / X-Pack Alerting API Integration Tests.x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/get_all·ts.alerting api integration security and spaces enabled Actions getAll "after each" hook for "should handle get all request appropriately with proper referenced_by_count"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches

[00:00:00]       │
[00:00:00]         └-: alerting api integration security and spaces enabled
[00:00:00]           └-> "before all" hook in "alerting api integration security and spaces enabled"
[00:00:00]           └-: Actions
[00:00:00]             └-> "before all" hook in "Actions"
[00:00:00]             └-> "before all" hook in "Actions"
[00:00:00]               │ debg creating space
[00:00:00]               │ debg created space
[00:00:00]               │ debg creating space
[00:00:01]               │ debg created space
[00:00:01]               │ debg creating space
[00:00:02]               │ debg created space
[00:00:02]               │ debg creating user no_kibana_privileges
[00:00:02]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [no_kibana_privileges]
[00:00:02]               │ debg created user no_kibana_privileges
[00:00:02]               │ debg creating role no_kibana_privileges
[00:00:02]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [no_kibana_privileges]
[00:00:02]               │ debg creating user superuser
[00:00:02]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [superuser]
[00:00:02]               │ debg created user superuser
[00:00:02]               │ debg creating user global_read
[00:00:03]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [global_read]
[00:00:03]               │ debg created user global_read
[00:00:03]               │ debg creating role global_read_role
[00:00:03]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [global_read_role]
[00:00:03]               │ debg creating user space_1_all
[00:00:03]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [space_1_all]
[00:00:03]               │ debg created user space_1_all
[00:00:03]               │ debg creating role space_1_all_role
[00:00:03]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [space_1_all_role]
[00:00:03]               │ debg creating user space_1_all_with_restricted_fixture
[00:00:03]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [space_1_all_with_restricted_fixture]
[00:00:03]               │ debg created user space_1_all_with_restricted_fixture
[00:00:03]               │ debg creating role space_1_all_with_restricted_fixture_role
[00:00:03]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [space_1_all_with_restricted_fixture_role]
[00:00:03]               │ debg creating user space_1_all_alerts_none_actions
[00:00:03]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [space_1_all_alerts_none_actions]
[00:00:03]               │ debg created user space_1_all_alerts_none_actions
[00:00:03]               │ debg creating role space_1_all_alerts_none_actions_role
[00:00:03]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [space_1_all_alerts_none_actions_role]
[00:02:04]             └-: getAll
[00:02:04]               └-> "before all" hook in "getAll"

Stack Trace

Error: expected 204 "No Content", got 409 "Conflict"
    at Test._assertStatus (/dev/shm/workspace/parallel/21/kibana/node_modules/supertest/lib/test.js:268:12)
    at Test._assertFunction (/dev/shm/workspace/parallel/21/kibana/node_modules/supertest/lib/test.js:283:11)
    at Test.assert (/dev/shm/workspace/parallel/21/kibana/node_modules/supertest/lib/test.js:173:18)
    at assert (/dev/shm/workspace/parallel/21/kibana/node_modules/supertest/lib/test.js:131:12)
    at /dev/shm/workspace/parallel/21/kibana/node_modules/supertest/lib/test.js:128:5
    at Test.Request.callback (/dev/shm/workspace/parallel/21/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:718:3)
    at /dev/shm/workspace/parallel/21/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:906:18
    at IncomingMessage.<anonymous> (/dev/shm/workspace/parallel/21/kibana/node_modules/supertest/node_modules/superagent/lib/node/parsers/json.js:19:7)
    at endReadableNT (internal/streams/readable.js:1317:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

Metrics [docs]

✅ unchanged

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

@rudolf rudolf merged commit cf45c39 into elastic:master Sep 7, 2021
@kibanamachine
Copy link
Contributor

💔 Backport failed

Status Branch Result
7.x Commit could not be cherrypicked due to conflicts

To backport manually run:
node scripts/backport --pr 111365

@rudolf rudolf added the v7.15.0 label Sep 8, 2021
rudolf added a commit to rudolf/kibana that referenced this pull request Sep 8, 2021
# Conflicts:
#	src/core/server/saved_objects/migrationsv2/integration_tests/batch_size_bytes.test.ts
rudolf added a commit to rudolf/kibana that referenced this pull request Sep 8, 2021
# Conflicts:
#	src/core/server/saved_objects/migrationsv2/integration_tests/batch_size_bytes.test.ts
rudolf added a commit that referenced this pull request Sep 8, 2021
# Conflicts:
#	src/core/server/saved_objects/migrationsv2/integration_tests/batch_size_bytes.test.ts
rudolf added a commit that referenced this pull request Sep 8, 2021
# Conflicts:
#	src/core/server/saved_objects/migrationsv2/integration_tests/batch_size_bytes.test.ts
@rudolf rudolf deleted the fix-flaky-migrations-tests branch September 15, 2021 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes v7.15.0 v7.16.0 v8.0.0
Projects
None yet
3 participants