Skip to content

Handle API disabled errors in firebase-appdistribution #3917

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 3 commits into from
Jul 19, 2022

Conversation

lfkellogg
Copy link
Contributor

@lfkellogg lfkellogg commented Jul 19, 2022

See go/fad-sdk-auth-errors for more information.

@lfkellogg lfkellogg requested review from kaibolay and jladieu July 19, 2022 13:54
@lfkellogg lfkellogg force-pushed the lk/auth-error-handling branch from 191c41b to 7ffdc60 Compare July 19, 2022 13:56
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 19, 2022

Coverage Report 1

Affected Products

  • firebase-appdistribution

    Overall coverage changed from 77.17% (e2e41f5) to 76.79% (581e94e) by -0.38%.

    FilenameBase (e2e41f5)Merge (581e94e)Diff
    AutoValue_TesterApiDisabledErrorDetails.java?29.41%?
    AutoValue_TesterApiDisabledErrorDetails_HelpLink.java?54.17%?
    TesterApiDisabledErrorDetails.java?93.75%?
    TesterApiHttpClient.java88.35%89.19%+0.84%
  • firebase-appdistribution-api

    Overall coverage changed from 62.26% (e2e41f5) to 62.62% (581e94e) by +0.35%.

    FilenameBase (e2e41f5)Merge (581e94e)Diff
    FirebaseAppDistributionException.java76.00%76.92%+0.92%

Test Logs

Notes

  • Commit (581e94e) is created by Prow via merging PR base commit (e2e41f5) and head commit (0d9ab00).
  • Run gradle <product>:checkCoverage to produce HTML coverage reports locally. After gradle commands finished, report files can be found under <product-build-dir>/reports/jacoco/.

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/CJISTjBM8r.html

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-appdistribution-api:
error: Added enum constant com.google.firebase.appdistribution.FirebaseAppDistributionException.Status.API_DISABLED [AddedField]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 19, 2022

Unit Test Results

150 tests  +11   150 ✔️ +11   50s ⏱️ +17s
  17 suites +  2       0 💤 ±  0 
  17 files   +  2       0 ±  0 

Results for commit 0d9ab00. ± Comparison against base commit e2e41f5.

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-appdistribution-api:
error: Added enum constant com.google.firebase.appdistribution.FirebaseAppDistributionException.Status.API_DISABLED [AddedField]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 19, 2022

Size Report 1

Affected Products

  • firebase-appdistribution

    TypeBase (e2e41f5)Merge (581e94e)Diff
    aar152 kB157 kB+4.78 kB (+3.2%)
    apk (aggressive)879 kB880 kB+1.11 kB (+0.1%)
    apk (release)2.01 MB2.01 MB+1.75 kB (+0.1%)
  • firebase-appdistribution-api

    TypeBase (e2e41f5)Merge (581e94e)Diff
    aar14.5 kB14.5 kB+40 B (+0.3%)
    apk (release)697 kB697 kB+116 B (+0.0%)

Test Logs

Notes

  • Commit (581e94e) is created by Prow via merging PR base commit (e2e41f5) and head commit (0d9ab00).

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/iJwgHO2cpf.html

"%s\n\n%s", ErrorMessages.API_DISABLED, apiDisabledErrorDetails.formatLinks());
return getException(tag, messageWithHelpLinks, Status.API_DISABLED);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be worth logging the responseBody in this case (for example, so the developer could print the logs in --verbose or --debug somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

}

static List<HelpLink> parseHelpLinks(JSONArray details) {
List<HelpLink> helpLinks = new ArrayList<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is ImmutableList.Builder an option here instead of the mutable variety?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately we'd have to pull in guava. I think it's pretty large which is why the SDKs have avoided pulling in that dependency.

import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;

@RunWith(RobolectricTestRunner.class)
Copy link
Contributor

Choose a reason for hiding this comment

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

Great coverage!

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-appdistribution-api:
error: Added enum constant com.google.firebase.appdistribution.FirebaseAppDistributionException.Status.API_DISABLED [AddedField]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

@lfkellogg lfkellogg force-pushed the lk/auth-error-handling branch 3 times, most recently from b0c4d04 to 7098f59 Compare July 19, 2022 21:14
@lfkellogg lfkellogg force-pushed the lk/auth-error-handling branch from 7098f59 to 0d9ab00 Compare July 19, 2022 21:14
@lfkellogg lfkellogg merged commit ef964ec into master Jul 19, 2022
@lfkellogg lfkellogg deleted the lk/auth-error-handling branch July 19, 2022 21:35
@firebase firebase locked and limited conversation to collaborators Aug 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants