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

TelemetryCollectionManager: Use X-Pack strategy as an OSS overwrite #84477

Merged

Conversation

afharo
Copy link
Member

@afharo afharo commented Nov 30, 2020

Summary

This PR changes the telemetryCollectionManager behaviour:

Current: It loops through the collection strategies, from higher to lower priority. If no data is obtained with one, it tries with the next one.

New behaviour: The higher priority strategy overwrites the lower priority one. This allows X-Pack to register as a replacement for OSS (Resolves #83622).

Additionally, because the new behaviour ensures OSS won't run if X-Pack is enabled, we can move the license fetcher back to X-Pack (the license endpoint does not exist in the OSS version). Resolves #82963

Finally, it simplifies the API. After the removal of the Monitoring strategy, we no longer need the CustomContext addition, neither the strategies to provide their own ES and SO clients.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@afharo afharo added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.11.0 labels Nov 30, 2020
@@ -213,7 +212,6 @@ export class FetcherTask {
private async fetchTelemetry() {
return await this.telemetryCollectionManager!.getStats({
unencrypted: false,
timestamp: moment().valueOf(),
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know how it slipped in the previous PR (#83791) 😱

TS builds should have complained at least! 🤔

@afharo afharo force-pushed the telemetryCollectionManager/xpack-extends-oss branch from 399f180 to 1b97de1 Compare November 30, 2020 10:53
@afharo afharo marked this pull request as ready for review November 30, 2020 15:25
@afharo afharo requested a review from a team as a code owner November 30, 2020 15:25
@afharo afharo requested a review from a team November 30, 2020 15:25
Copy link
Contributor

@chrisronline chrisronline left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@Bamieh Bamieh left a comment

Choose a reason for hiding this comment

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

LGTM

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Distributable file count

id before after diff
default 43183 43182 -1
oss 22579 22578 -1

History

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

@afharo afharo merged commit 717a66f into elastic:master Dec 2, 2020
@afharo afharo deleted the telemetryCollectionManager/xpack-extends-oss branch December 2, 2020 08:26
gmmorris added a commit to gmmorris/kibana that referenced this pull request Dec 2, 2020
* master:
  [Lens] Show color in flyout instead of auto (elastic#84532)
  [Lens] Use index pattern through service instead of reading saved object (elastic#84432)
  Make it possible to use Kibana anonymous authentication provider with ES anonymous access. (elastic#84074)
  TelemetryCollectionManager: Use X-Pack strategy as an OSS overwrite (elastic#84477)
  migrate away from rest_total_hits_as_int (elastic#84508)
  [Input Control] Custom renderer (elastic#84423)
  Attempt to more granularly separate App Search vs Workplace Search vs shared GitHub notifications (elastic#84713)
  [Security Solutino][Case] Case connector alert UI (elastic#82405)
  [Maps] Support runtime fields in tooltips (elastic#84377)
  [CCR] Fix row actions in follower index and auto-follow pattern tables (elastic#84433)
  [Enterprise Search] Migrate shared Indexing Status component (elastic#84571)
  [maps] remove fields from index-pattern test artifacts (elastic#84379)
  Add routes for use in Sources Schema (elastic#84579)
  Changes UI links for drilldowns (elastic#83971)
  endpoint telemetry cloned endpoint tests (elastic#81498)
  [Fleet] Handler api key creation errors when Fleet Admin is invalid (elastic#84576)
gmmorris added a commit to gmmorris/kibana that referenced this pull request Dec 2, 2020
* master: (72 commits)
  Make alert status fetching more resilient (elastic#84676)
  [APM] Refactor hooks and context (elastic#84615)
  Added word break styles to the texts in the item details card. (elastic#84654)
  [Search] Disable "send to background" when auto-refresh is enabled (elastic#84106)
  Add readme for new palette service (elastic#84512)
  Make all providers to preserve original URL when session expires. (elastic#84229)
  [Lens] Show color in flyout instead of auto (elastic#84532)
  [Lens] Use index pattern through service instead of reading saved object (elastic#84432)
  Make it possible to use Kibana anonymous authentication provider with ES anonymous access. (elastic#84074)
  TelemetryCollectionManager: Use X-Pack strategy as an OSS overwrite (elastic#84477)
  migrate away from rest_total_hits_as_int (elastic#84508)
  [Input Control] Custom renderer (elastic#84423)
  Attempt to more granularly separate App Search vs Workplace Search vs shared GitHub notifications (elastic#84713)
  [Security Solutino][Case] Case connector alert UI (elastic#82405)
  [Maps] Support runtime fields in tooltips (elastic#84377)
  [CCR] Fix row actions in follower index and auto-follow pattern tables (elastic#84433)
  [Enterprise Search] Migrate shared Indexing Status component (elastic#84571)
  [maps] remove fields from index-pattern test artifacts (elastic#84379)
  Add routes for use in Sources Schema (elastic#84579)
  Changes UI links for drilldowns (elastic#83971)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes v7.11.0 v8.0.0
Projects
None yet
4 participants