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

[Backport] Fix for ApiKeyIntegTests related to Expired API keys remover (#43477) #47628

Merged
merged 1 commit into from
Oct 6, 2019

Conversation

bizybot
Copy link
Contributor

@bizybot bizybot commented Oct 6, 2019

When API key is invalidated we do two things first it tries to trigger ExpiredApiKeysRemover task
and second, we do index the invalidation for the API key. The index invalidation may happen
before the ExpiredApiKeysRemover task is run and in that case, the API key
invalidated will also get deleted. If the ExpiredApiKeysRemover runs before the
API key invalidation is indexed then the API key is not deleted and will be
deleted in the future run.
This behavior was not captured in the tests related to ExpiredApiKeysRemover
causing intermittent failures.
This commit fixes those tests by checking if the API key invalidated is reported
back when we get API keys after invalidation and perform the checks based on that.

Closes #41747

…#43477) (elastic#47547)

When API key is invalidated we do two things first it tries to trigger `ExpiredApiKeysRemover` task
and second, we do index the invalidation for the API key. The index invalidation may happen
before the `ExpiredApiKeysRemover` task is run and in that case, the API key
invalidated will also get deleted. If the `ExpiredApiKeysRemover` runs before the
API key invalidation is indexed then the API key is not deleted and will be
deleted in the future run.
This behavior was not captured in the tests related to `ExpiredApiKeysRemover`
causing intermittent failures.
This commit fixes those tests by checking if the API key invalidated is reported
back when we get API keys after invalidation and perform the checks based on that.

Closes elastic#41747
@bizybot bizybot merged commit e0c5fa3 into elastic:6.8 Oct 6, 2019
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.

1 participant