Skip to content

Specific interface for provider enhancement (3/3) #1023

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 9 commits into from
Jan 27, 2022

Conversation

colerogers
Copy link
Contributor

@colerogers colerogers commented Jan 19, 2022

Change for the the specific crashlytics interface. Exposes onNewFatalIssuePublished, onNewNonfatalIssuePublished, onRegressionAlertPublished, onStabilityDigestPublished, onVelocityAlertPublished, and onNewAnrIssuePublished from the v2/alerts/crashlytics namespace

Ex ~

import {
  onNewFatalIssuePublished,
  onNewNonfatalIssuePublished,
  onRegressionAlertPublished,
  onStabilityDigestPublished,
  onVelocityAlertPublished,
  onNewAnrIssuePublished
} from "firebase-functions/v2/alerts/crashlytics";

// newFatalIssuePublished interface
export const func = onNewFatalIssuePublished((event) => { … });
export const func1 = onNewFatalIssuePublished("123456789", (event) => { … });
export const func2 = onNewFatalIssuePublished({ appId: "123456789" }, (event) => { … });
// newNonfatalIssuePublished interface
export const func3 = onNewNonfatalIssuePublished((event) => { … });
export const func4 = onNewNonfatalIssuePublished("123456789", (event) => { … });
export const func5 = onNewNonfatalIssuePublished({ appId: "123456789" }, (event) => { … });
// regressionAlertPublished interface
export const func6 = onRegressionAlertPublished((event) => { … });
export const func7 = onRegressionAlertPublished("123456789", (event) => { … });
export const func8 = onRegressionAlertPublished({ appId: "123456789" }, (event) => { … });
// stabilityDigestPublished interface
export const func9 = onStabilityDigestPublished((event) => { … });
export const func10 = onStabilityDigestPublished("123456789", (event) => { … });
export const func11 = onStabilityDigestPublished({ appId: "123456789" }, (event) => { … });
// velocityAlertPublished interface
export const func12 = onVelocityAlertPublished((event) => { … });
export const func13 = onVelocityAlertPublished("123456789", (event) => { … });
export const func14 = onVelocityAlertPublished({ appId: "123456789" }, (event) => { … });
// newAnrIssuePublished interface
export const func15 = onNewAnrIssuePublished((event) => { … });
export const func16 = onNewAnrIssuePublished("123456789", (event) => { … });
export const func17 = onNewAnrIssuePublished({ appId: "123456789" }, (event) => { … });

@colerogers colerogers requested review from taeold and inlined January 19, 2022 23:08
Copy link
Member

@inlined inlined left a comment

Choose a reason for hiding this comment

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

Holy moly 🥵

That's a thorough API and test suite with a heck of a terse/efficient implementation. Excellent job!

['@type']: 'com.google.firebase.firebasealerts.CrashlyticsRegressionAlertPayload';
type: string;
issue: Issue;
resolveTime: string;
Copy link
Member

Choose a reason for hiding this comment

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

FYI: I don't recall all the details, but we have an outstanding bug for the auth namespace that the proto-JSON format isn't the SDK format for date strings. Let's not make the same mistake again.

Copy link
Member

Choose a reason for hiding this comment

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

#1012 for details. Let's bring this up with API council and see if there needs to be an AIP on the standard way going forwards.

);

const func = (raw: CloudEvent<unknown>) => {
return handler(raw as CrashlyticsEvent<T>);
Copy link
Member

Choose a reason for hiding this comment

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

Here's where you might need to recognize some date fields and change their format (if API council decides that ISO 8601 isn't the right format). I know you've already gone through review, but it just might be worth bringing up to a few people (e.g. @mbleigh) that we have inconsistencies and need an AIP.

@colerogers colerogers merged commit 4598383 into colerogers.alerts Jan 27, 2022
@colerogers colerogers deleted the colerogers.crashlytics branch January 27, 2022 23:43
colerogers added a commit that referenced this pull request Jan 28, 2022
* breaking out general interface

* cleaning up exports

* removing comments & references to specific interfaces

* format

* jsdoc comments

* address pr comments

* added param comment

* addressing comments

* Specific interface for provider enhancement (1/3) (#1021)

* adding in app distro changes

* removing comments & addings package refs

* jsdoc comments

* fix comments

* adding periods to doc strings

* fix wording

* adding import/export statement

* Specific interface for provider enhancement (2/3) (#1022)

* adding in billing changes

* removing comments & adding package refs

* jsdoc comments

* addressing pr comments

* change handler doc string

* changing to BillingEventHandler type

* remove BillingEventHandler type

* Specific interface for provider enhancement (3/3) (#1023)

* adding in crashlytics changes

* comments & adding package refs

* address comments and make doc strings better

* add opts.retry to event trigger
colerogers added a commit that referenced this pull request Jan 31, 2022
* breaking out general interface

* cleaning up exports

* removing comments & references to specific interfaces

* format

* jsdoc comments

* address pr comments

* added param comment

* addressing comments

* Specific interface for provider enhancement (1/3) (#1021)

* adding in app distro changes

* removing comments & addings package refs

* jsdoc comments

* fix comments

* adding periods to doc strings

* fix wording

* adding import/export statement

* Specific interface for provider enhancement (2/3) (#1022)

* adding in billing changes

* removing comments & adding package refs

* jsdoc comments

* addressing pr comments

* change handler doc string

* changing to BillingEventHandler type

* remove BillingEventHandler type

* Specific interface for provider enhancement (3/3) (#1023)

* adding in crashlytics changes

* comments & adding package refs

* address comments and make doc strings better

* add opts.retry to event trigger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants