Skip to content

feat(gitpod-cli): report errors to ide-metrics-api #13752

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

Merged
merged 1 commit into from
Oct 13, 2022

Conversation

andreafalzetti
Copy link
Contributor

@andreafalzetti andreafalzetti commented Oct 11, 2022

Description

Introduce error reporting from gp cli (startin from gp ports list) to ide-metrics-api. Errors will be available in GCP.

Related Issue(s)

Fixes #13707

Follow up actions after merging

  1. Add util.logError in all known errors
  2. Provide the userId
  3. Find a way to capture unhandled exceptions at root level, e.g: [1]

How to test

We tested using a test commit throwing an error all the time and observing the logs of ide-metrics-api.

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-afalz-gitpod-cli-error-reporting-3.2 because the annotations in the pull request description changed
(with .werft/ from main)

@andreafalzetti
Copy link
Contributor Author

andreafalzetti commented Oct 11, 2022

/werft run

👍 started the job as gitpod-build-afalz-gitpod-cli-error-reporting-3.3
(with .werft/ from main)

@iQQBot
Copy link
Contributor

iQQBot commented Oct 12, 2022

/werft run

👍 started the job as gitpod-build-afalz-gitpod-cli-error-reporting-3.4
(with .werft/ from main)

Copy link
Contributor

@felladrin felladrin left a comment

Choose a reason for hiding this comment

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

Are these two testing steps up to date?

  • in the prev env workspace, break supervisor-api by replacing the following env var: export SUPERVISOR_ADDR=localhost:22999x
  • in the prev env workspace, run gp ports list and make sure it does not throw any error

On the preview environment it throws error when SUPERVISOR_ADDR=localhost:22999x.
image


conn, err := supervisor_helper.Dial(ctx)
if err != nil {
log.Fatal(err)
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should use Fatal in this method

@felladrin felladrin force-pushed the afalz/gitpod-cli-error-reporting-3 branch 2 times, most recently from 517066c to 23a1b8d Compare October 13, 2022 14:14
@felladrin
Copy link
Contributor

felladrin commented Oct 13, 2022

/werft run with-clean-slate-deployment=true

👍 started the job as gitpod-build-afalz-gitpod-cli-error-reporting-3.8
(with .werft/ from main)

@felladrin felladrin force-pushed the afalz/gitpod-cli-error-reporting-3 branch 3 times, most recently from ae5a5fc to 29d5cef Compare October 13, 2022 15:48
@felladrin felladrin force-pushed the afalz/gitpod-cli-error-reporting-3 branch from 29d5cef to 4344ff0 Compare October 13, 2022 16:08
@andreafalzetti andreafalzetti marked this pull request as ready for review October 13, 2022 16:15
@andreafalzetti andreafalzetti requested a review from a team October 13, 2022 16:15
@andreafalzetti
Copy link
Contributor Author

/hold

doing some tests

Copy link
Contributor

@felladrin felladrin left a comment

Choose a reason for hiding this comment

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

Reviewed/tested these changes with Andrea during a pair programming session and it's working as described! ✅

image

@andreafalzetti
Copy link
Contributor Author

/unhold

@roboquat roboquat merged commit 3c07280 into main Oct 13, 2022
@roboquat roboquat deleted the afalz/gitpod-cli-error-reporting-3 branch October 13, 2022 16:21
@roboquat roboquat added deployed: IDE IDE change is running in production deployed Change is completely running in production labels Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed Change is completely running in production release-note-none size/L team: IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate gp cli with ide-metrics-api for at least one command
5 participants