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

Ensure that API keys are rendered before performing bulk delete in functional tests. #148013

Merged
merged 1 commit into from
Dec 22, 2022

Conversation

azasypkin
Copy link
Member

@azasypkin azasypkin commented Dec 22, 2022

Summary

Based on the logs and screenshot from failed test runs, the test was able to perform all required actions, but didn't manage to bulk delete all the keys. The last created key (api key 2) was still in the API keys grid after bulk delete.

My assumption is that it took quite some time for the last added key to appear in the grid so that the bulk delete action didn't affect it. In this PR I'm making sure that both created keys are rendered before the test tries to delete them in bulk.

Flaky Test Runner: ✔️ 1673 (x50)
Fixes: #141868

@azasypkin azasypkin added test Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! Feature:Users/Roles/API Keys release_note:skip Skip the PR/issue when compiling release notes backport:all-open Backport to all branches that could still receive a release ci:no-auto-commit Disable auto-committing changes on CI labels Dec 22, 2022
@azasypkin azasypkin marked this pull request as ready for review December 22, 2022 17:06
@azasypkin azasypkin requested a review from a team as a code owner December 22, 2022 17:06
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #9 / apis Synthetics CRUD routes DeleteMonitorRoute handles private location errors and does not delete the monitor if integration policy is unable to be deleted

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
security 553.1KB 553.1KB +2.0B
Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 61 67 +6
osquery 109 115 +6
securitySolution 436 442 +6
total +20

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 70 76 +6
osquery 110 117 +7
securitySolution 512 518 +6
total +21

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

Copy link
Contributor

@jeramysoucy jeramysoucy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@azasypkin azasypkin merged commit 3a5f562 into elastic:main Dec 22, 2022
@azasypkin azasypkin deleted the issue-141868-api-keys-tests branch December 22, 2022 18:44
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
7.17 Backport failed because of merge conflicts
8.5 Backport failed because of merge conflicts
8.6 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 148013

Questions ?

Please refer to the Backport tool documentation

azasypkin added a commit to azasypkin/kibana that referenced this pull request Dec 23, 2022
…nctional tests. (elastic#148013)

(cherry picked from commit 3a5f562)

# Conflicts:
#	x-pack/plugins/security/public/management/api_keys/api_keys_grid/api_keys_grid_page.test.tsx
#	x-pack/plugins/security/public/management/api_keys/api_keys_grid/api_keys_grid_page.tsx
#	x-pack/test/functional/apps/api_keys/home_page.ts
#	x-pack/test/functional/page_objects/api_keys_page.ts
azasypkin added a commit to azasypkin/kibana that referenced this pull request Dec 23, 2022
…nctional tests. (elastic#148013)

(cherry picked from commit 3a5f562)

# Conflicts:
#	x-pack/plugins/security/public/management/api_keys/api_keys_grid/api_keys_grid_page.test.tsx
#	x-pack/plugins/security/public/management/api_keys/api_keys_grid/api_keys_grid_page.tsx
#	x-pack/test/functional/apps/api_keys/home_page.ts
#	x-pack/test/functional/page_objects/api_keys_page.ts
@azasypkin
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
8.6
8.5
7.17

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

azasypkin added a commit that referenced this pull request Dec 23, 2022
… in functional tests. (#148013) (#148044)

# Backport

This will backport the following commits from `main` to `8.6`:
- [Ensure that API keys are rendered before performing bulk delete in
functional tests.
(#148013)](#148013)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Aleh
Zasypkin","email":"[email protected]"},"sourceCommit":{"committedDate":"2022-12-22T18:44:11Z","message":"Ensure
that API keys are rendered before performing bulk delete in functional
tests.
(#148013)","sha":"3a5f5626b2c3631eb2646782937171d2f87ce525","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","Team:Security","Feature:Users/Roles/API
Keys","release_note:skip","ci:no-auto-commit","backport:all-open","v8.7.0"],"number":148013,"url":"https://github.com/elastic/kibana/pull/148013","mergeCommit":{"message":"Ensure
that API keys are rendered before performing bulk delete in functional
tests.
(#148013)","sha":"3a5f5626b2c3631eb2646782937171d2f87ce525"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/148013","number":148013,"mergeCommit":{"message":"Ensure
that API keys are rendered before performing bulk delete in functional
tests. (#148013)","sha":"3a5f5626b2c3631eb2646782937171d2f87ce525"}}]}]
BACKPORT-->
azasypkin added a commit that referenced this pull request Dec 23, 2022
… in functional tests. (#148013) (#148045)

# Backport

This will backport the following commits from `main` to `8.5`:
- [Ensure that API keys are rendered before performing bulk delete in
functional tests.
(#148013)](#148013)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Aleh
Zasypkin","email":"[email protected]"},"sourceCommit":{"committedDate":"2022-12-22T18:44:11Z","message":"Ensure
that API keys are rendered before performing bulk delete in functional
tests.
(#148013)","sha":"3a5f5626b2c3631eb2646782937171d2f87ce525","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","Team:Security","Feature:Users/Roles/API
Keys","release_note:skip","ci:no-auto-commit","backport:all-open","v8.7.0"],"number":148013,"url":"https://github.com/elastic/kibana/pull/148013","mergeCommit":{"message":"Ensure
that API keys are rendered before performing bulk delete in functional
tests.
(#148013)","sha":"3a5f5626b2c3631eb2646782937171d2f87ce525"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/148013","number":148013,"mergeCommit":{"message":"Ensure
that API keys are rendered before performing bulk delete in functional
tests. (#148013)","sha":"3a5f5626b2c3631eb2646782937171d2f87ce525"}}]}]
BACKPORT-->
azasypkin added a commit that referenced this pull request Dec 23, 2022
…e in functional tests. (#148013) (#148047)

# Backport

This will backport the following commits from `main` to `7.17`:
- [Ensure that API keys are rendered before performing bulk delete in
functional tests.
(#148013)](#148013)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Aleh
Zasypkin","email":"[email protected]"},"sourceCommit":{"committedDate":"2022-12-22T18:44:11Z","message":"Ensure
that API keys are rendered before performing bulk delete in functional
tests.
(#148013)","sha":"3a5f5626b2c3631eb2646782937171d2f87ce525","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","Team:Security","Feature:Users/Roles/API
Keys","release_note:skip","ci:no-auto-commit","backport:all-open","v8.7.0"],"number":148013,"url":"https://github.com/elastic/kibana/pull/148013","mergeCommit":{"message":"Ensure
that API keys are rendered before performing bulk delete in functional
tests.
(#148013)","sha":"3a5f5626b2c3631eb2646782937171d2f87ce525"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/148013","number":148013,"mergeCommit":{"message":"Ensure
that API keys are rendered before performing bulk delete in functional
tests. (#148013)","sha":"3a5f5626b2c3631eb2646782937171d2f87ce525"}}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:all-open Backport to all branches that could still receive a release ci:no-auto-commit Disable auto-committing changes on CI Feature:Users/Roles/API Keys release_note:skip Skip the PR/issue when compiling release notes Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! test v7.17.9 v8.5.4 v8.6.0 v8.7.0
Projects
None yet
5 participants