Closed Bug 1761485 Opened 3 years ago Closed 3 years ago

Expose ErrorType through it's own entry point

Categories

(Data Platform and Tools :: Glean: SDK, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: brizental, Assigned: tawahpeggy1998, Mentored)

Details

(Keywords: good-first-bug, Whiteboard: [glean-sdk:backlog][glean-js][good-first-bug])

Attachments

(1 file)

It's kind wierd to have to import a platform specific Glean only to extract the ErrorType export which is exactly the same for all platforms.

Component: Glean.js → Glean: SDK
Whiteboard: [telemetry:glean-js:m?] → [glean-sdk:backlog][glean-js]
Whiteboard: [glean-sdk:backlog][glean-js] → [glean-sdk:m?][glean-js]

To help Mozilla out with this bug, here are the steps:

  1. Comment here on the bug that you want to volunteer to help. Someone will assign it to you.
  2. Follow the instructions on Glean.js' Getting Started guide to build the library.
  3. See how the Uploader or testResetGlean APIs are exposed (https://github.com/mozilla/glean.js/blob/main/glean/package.json#L12-L13). The same pattern should be followed for ErrorType. Once that is done, the ErrorType export should be removed from each of the platforms endpoints i.e. https://github.com/mozilla/glean.js/blob/main/glean/src/entry/node.ts#L8, because it won't be necessary anymore.
  4. Update all example on the Glean book the use the deprecated import statement. These are mostly on the metric types reference pages i.e. https://mozilla.github.io/glean/book/reference/metrics/labeled_booleans.html#testgetnumrecordederrors
Keywords: good-first-bug
Whiteboard: [glean-sdk:m?][glean-js] → [glean-sdk:backlog][glean-js][good-first-bug]

Hello Beatriz, I'll like to work on this.

Hi tawahpeggy ! I've assigned the bug to you. Please follow the instructions in comment 1 to fix this :)

Assignee: nobody → tawahpeggy1998

(In reply to Alessio Placitelli [:Dexter] from comment #3)

Hi tawahpeggy ! I've assigned the bug to you. Please follow the instructions in comment 1 to fix this :)

Alessio thank you, currently on it.

  1. Update all example on the Glean book the use the deprecated import statement. These are mostly on the metric types reference pages i.e. https://mozilla.github.io/glean/book/reference/metrics/labeled_booleans.html#testgetnumrecordederrors.

Hello everyone, I completed points 1 through 3 as stated in comment 1. but I haven't been able to find out how to update the examples on the glean book as I haven't been able to find the piece of code.
please how do edit the book's section: https://mozilla.github.io/glean/book/reference/metrics/labeled_booleans.html#testgetnumrecordederrors?.

Flags: needinfo?(brizental)

(In reply to tawahpeggy from comment #5)

  1. Update all example on the Glean book the use the deprecated import statement. These are mostly on the metric types reference pages i.e. https://mozilla.github.io/glean/book/reference/metrics/labeled_booleans.html#testgetnumrecordederrors.

Hello everyone, I completed points 1 through 3 as stated in comment 1. but I haven't been able to find out how to update the examples on the glean book as I haven't been able to find the piece of code.
please how do edit the book's section: https://mozilla.github.io/glean/book/reference/metrics/labeled_booleans.html#testgetnumrecordederrors?.

Good job :) As you found out, docs are in a separate repository: https://github.com/mozilla/glean/blob/main/docs/user/reference/metrics/labeled_booleans.md

Let's have two PRs for this: one for the bits in the Glean.js repository, the other for the docs changes in the Glean SDKs repository.

Mentor: alessio.placitelli
Flags: needinfo?(brizental)

remote: Permission to mozilla/glean.js.git denied to tawahpeggy.
fatal: unable to access 'https://github.com/mozilla/glean.js/': The requested URL returned error: 403

Thanks @Dexter for the heads-up. however,when I try to push, I get this authentication error.

Hello all, after brainstorming on what could possibly be the reason I am getting an access denied when I try to push,
I resolved to the following.
I couldn't access my Bugzilla account due to 2step authentication some months ago because I lost my phone. After trying to resolve the issue to no avail, I created a new Bugzilla account using a different mail. but now I cannot push because the new email is not attributed to any Github account. please how do I regain my previous account? here is the email: tawahpeggy98@gmail.com

Hello @all, i got to solve the issue by having someone in the bugzilla team remove the 2-step authentication from my previous account. so please someone should please unassign me here and assign this user instead:
username:Tawah Peggy
email: tawahpeggy98@gmail.com

(In reply to tawahpeggy from comment #7)

remote: Permission to mozilla/glean.js.git denied to tawahpeggy.
fatal: unable to access 'https://github.com/mozilla/glean.js/': The requested URL returned error: 403

Thanks @Dexter for the heads-up. however,when I try to push, I get this authentication error.

Hey Tawah,

I'm afraid this has nothing to do with Bugzilla and 2FA. You do not have write access to the Glean.js repository, that's normal and ok. You should be sending a PR from a fork, not pushing a new branch to the upstream repository. See these docs for an overview of the contribution process on GitHub.

(In reply to Alessio Placitelli [:Dexter] from comment #10)

(In reply to tawahpeggy from comment #7)

remote: Permission to mozilla/glean.js.git denied to tawahpeggy.
fatal: unable to access 'https://github.com/mozilla/glean.js/': The requested URL returned error: 403

Thanks @Dexter for the heads-up. however,when I try to push, I get this authentication error.

Hey Tawah,

I'm afraid this has nothing to do with Bugzilla and 2FA. You do not have write access to the Glean.js repository, that's normal and ok. You should be sending a PR from a fork, not pushing a new branch to the upstream repository. See these docs for an overview of the contribution process on GitHub.

okay I understand clearly, it did cross my mind that this could be a possibility but I wasn't sure.thank you.

Hello @all, I have created a pull request,@Dexter please help me review it.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

Reopening since, as the assignee made me notice, this is still lacking docs updates :) Good catch!

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: