Skip to content

fix: invalidating API Keys against ES master#4587

Merged
simitt merged 1 commit intoelastic:masterfrom
simitt:fix-es-query
Dec 24, 2020
Merged

fix: invalidating API Keys against ES master#4587
simitt merged 1 commit intoelastic:masterfrom
simitt:fix-es-query

Conversation

@simitt
Copy link
Copy Markdown
Contributor

@simitt simitt commented Dec 24, 2020

Motivation/summary

The ES InvalidateApiKey API does not support param id anymore. Switch to using ids instead.

Related elastic/elasticsearch#66671

Do NOT backport this to 7.x as ES only introduced the ids parameter in 7.10.
Ideally we would derive the used Elasticsearch version and adapt the parameter accordingly. There exists already an issue to ensure ES client 8.0 can work with 7.x ES, which would be a bigger change and needs more discussion how to tackle this. For now this fixes functionality and system tests in master.

Checklist

- [ ] Update CHANGELOG.asciidoc
- [ ] Documentation has been updated

How to test these changes

  • Run apm-server apikey invalidate --id "123" cmd against an >=7.10 or 8.0 ES -> expected to work
  • Run apm-server apikey invalidate --id "123" cmd against an <7.10 ES -> expected to throw an error

Related issues

The ES InvalidateApiKey API does not support param ID anymore. Switch
to using IDs instead. Related elastic/elasticsearch#66671
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #4587 (3877d45) into master (fd21932) will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4587      +/-   ##
==========================================
+ Coverage   75.96%   75.98%   +0.02%     
==========================================
  Files         161      161              
  Lines        9789     9789              
==========================================
+ Hits         7436     7438       +2     
+ Misses       2353     2351       -2     
Impacted Files Coverage Δ
elasticsearch/security_api.go 44.44% <ø> (ø)
...ack/apm-server/aggregation/txmetrics/aggregator.go 93.36% <0.00%> (ø)
beater/jaeger/common.go 82.14% <0.00%> (+7.14%) ⬆️

@ghost
Copy link
Copy Markdown

ghost commented Dec 24, 2020

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #4587 opened

  • Start Time: 2020-12-24T13:55:54.506+0000

  • Duration: 43 min 54 sec

Test stats 🧪

Test Results
Failed 0
Passed 4613
Skipped 124
Total 4737

Steps errors 3

Expand to view the steps failures

Compress
  • Took 0 min 0 sec . View more details on here
  • Description: tar --exclude=coverage-files.tgz -czf coverage-files.tgz coverage
Compress
  • Took 0 min 0 sec . View more details on here
  • Description: tar --exclude=system-tests-linux-files.tgz -czf system-tests-linux-files.tgz system-tests
Test Sync
  • Took 3 min 55 sec . View more details on here
  • Description: ./.ci/scripts/sync.sh

@simitt
Copy link
Copy Markdown
Contributor Author

simitt commented Dec 24, 2020

Merging this in to fix tests. @elastic/apm-server let me know in case you are not happy with the solution.

@simitt simitt merged commit 3858a27 into elastic:master Dec 24, 2020
@simitt simitt deleted the fix-es-query branch August 20, 2021 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants