Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Adapt Telemetry Plug-in API to a single-host mode #945

Merged
merged 2 commits into from
Dec 14, 2020
Merged

Conversation

azatsarynnyy
Copy link
Member

@azatsarynnyy azatsarynnyy commented Dec 4, 2020

Signed-off-by: Artem Zatsarynnyi azatsary@redhat.com

What does this PR do?

  1. Fixes /client-ip service URL for a single-host mode.
  2. When sending the telemetry events about an editor usage, filters out the messages that come from the output channels, like hosted-instance-log. As such messages are recognized as vscode.TextDocumentChangeEvents.
    See the details in Logging to the console from a plug-in may cause the cyclic messaging che#18598

Screenshot/screencast of this PR

What issues does this PR fix or reference?

closes eclipse-che/che#18503
closes eclipse-che/che#18489

How to test this PR?

To test that the PR fixes eclipse-che/che#18503:

  1. Deploy Che in single host mode
    chectl server:deploy --platform=minikube --installer=operator --che-operator-cr-patch-yaml=patch.yaml
    where patch.yaml content is
apiVersion: org.eclipse.che/v1
kind: CheCluster
metadata:
  name: eclipse-che
spec:
  server:
    serverExposureStrategy: 'single-host'
  k8s:
    singleHostExposureType: 'native'
  1. Start a Workspace with the custom Che-Theia editor (with this patch included)
components:
- type: cheEditor
  reference: https://raw.githubusercontent.com/chepullreq4/pr-check-files/master/che-theia/pr-945/simple/che-theia-editor.yaml
  1. Open Chrome/FireFox DevTools and make any edit in a file.

  2. Make sure that there's a request to /client-ip service and it returns the data.
    image

  3. Make sure the correct telemetry events are sent to Che-Theia backend, e.g.:
    image

To test that the PR fixes eclipse-che/che#18489:

  1. Start a Workspace.
  2. Make any edit in a file.
  3. Make sure that there's only one request to /client-ip service.

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

Happy Path Channel

HAPPY_PATH_CHANNEL=stable

@che-bot

This comment has been minimized.

@azatsarynnyy

This comment has been minimized.

@che-bot

This comment has been minimized.

@azatsarynnyy

This comment has been minimized.

@che-bot

This comment has been minimized.

@azatsarynnyy

This comment has been minimized.

@che-bot

This comment has been minimized.

@azatsarynnyy

This comment has been minimized.

@che-bot

This comment has been minimized.

@che-bot

This comment has been minimized.

@che-bot

This comment has been minimized.

@azatsarynnyy

This comment has been minimized.

@che-bot

This comment has been minimized.

@che-bot

This comment has been minimized.

Signed-off-by: Artem Zatsarynnyi <azatsary@redhat.com>
Signed-off-by: Artem Zatsarynnyi <azatsary@redhat.com>
@che-bot

This comment has been minimized.

@azatsarynnyy

This comment has been minimized.

@che-bot

This comment has been minimized.

@azatsarynnyy

This comment has been minimized.

3 similar comments
@azatsarynnyy

This comment has been minimized.

@azatsarynnyy

This comment has been minimized.

@dmytro-ndp
Copy link
Contributor

[crw-ci-test --rebuild]

@che-bot
Copy link
Contributor

che-bot commented Dec 11, 2020

✅ E2E Happy path tests succeed 🎉

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia docker.io/maxura/che-theia:945
che-theia-endpoint-runtime-binary docker.io/maxura/che-theia-endpoint-runtime-binary:945

Tested with Eclipse Che Single User on K8S (minikube v1.1.1)

  • Use comment "[crw-ci-test]" to rerun happy path E2E test.
  • Use comment "[crw-ci-test --rebuild]" to re-build the images and rerun happy path E2E test.

@azatsarynnyy azatsarynnyy changed the title [WIP] Adapt Telemetry Plug-in API to a single-host mode Adapt Telemetry Plug-in API to a single-host mode Dec 11, 2020
@azatsarynnyy azatsarynnyy marked this pull request as ready for review December 11, 2020 11:02
Copy link
Member

@RomanNikitenko RomanNikitenko left a comment

Choose a reason for hiding this comment

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

Tested using How to test section:
I see only one request to /client-ip service when a workspace is started

client-ip

Telemetry events are sent to Che-Theia backend:

telemetryEvent

@azatsarynnyy
Copy link
Member Author

@RomanNikitenko thank you for testing it! 👍

@azatsarynnyy azatsarynnyy merged commit d30da31 into master Dec 14, 2020
@azatsarynnyy azatsarynnyy deleted the telemetry-fix branch December 14, 2020 11:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants