Skip to content

Remove some synchronized blocks from FirebaseAppDistributionImpl #4353

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 4 commits into from
Nov 23, 2022

Conversation

lfkellogg
Copy link
Contributor

Uses a new TaskCache instead of relying on locks.

@google-oss-bot
Copy link
Contributor

1 Warning
⚠️ Did you forget to add a changelog entry? (Add the 'no-changelog' label to the PR to silence this warning.)

Generated by 🚫 Danger

@lfkellogg lfkellogg force-pushed the lk/remove-some-synchronized-blocks branch from 480af03 to bc86a6f Compare November 22, 2022 21:26
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Nov 22, 2022

Coverage Report 1

Affected Products

  • firebase-appdistribution

    Overall coverage changed from ? (abdd518) to 79.20% (9a4bf00) by ?.

    35 individual files with coverage change

    FilenameBase (abdd518)Merge (9a4bf00)Diff
    AabUpdater.java?98.67%?
    ApkInstaller.java?96.88%?
    ApkUpdater.java?93.70%?
    AppDistributionReleaseImpl.java?100.00%?
    AppDistributionReleaseInternal.java?100.00%?
    AppIconSource.java?85.71%?
    AutoValue_AppDistributionReleaseImpl.java?65.45%?
    AutoValue_AppDistributionReleaseInternal.java?66.67%?
    AutoValue_TesterApiDisabledErrorDetails.java?29.41%?
    AutoValue_TesterApiDisabledErrorDetails_HelpLink.java?54.17%?
    AutoValue_UpdateProgressImpl.java?65.96%?
    ErrorMessages.java?0.00%?
    FirebaseAppDistributionExceptions.java?80.00%?
    FirebaseAppDistributionFileProvider.java?0.00%?
    FirebaseAppDistributionImpl.java?96.20%?
    FirebaseAppDistributionLifecycleNotifier.java?75.00%?
    FirebaseAppDistributionNotificationsManager.java?80.00%?
    FirebaseAppDistributionRegistrar.java?90.32%?
    FirebaseAppDistributionTesterApiClient.java?87.63%?
    HttpsUrlConnectionFactory.java?50.00%?
    InstallActivity.java?2.53%?
    LogWrapper.java?50.00%?
    NewReleaseFetcher.java?77.55%?
    PackageInfoUtils.java?42.86%?
    ReleaseIdentifier.java?88.00%?
    ReleaseUtils.java?83.33%?
    SignInResultActivity.java?0.00%?
    SignInStorage.java?42.86%?
    TaskCache.java?100.00%?
    TaskUtils.java?96.30%?
    TesterApiDisabledErrorDetails.java?93.75%?
    TesterApiHttpClient.java?89.19%?
    TesterSignInManager.java?93.62%?
    UpdateProgressImpl.java?100.00%?
    UpdateTaskImpl.java?75.71%?

Test Logs

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

class TaskCache<T extends Task> {

/** A functional interface for a producer of a new Task. */
interface TaskProducer<T extends Task> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you just use the generic java.util.function.Supplier here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Functional interfaces were only added in API level 24, so we'd have to up our minSdkVersion from 16.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Nov 22, 2022

Size Report 1

Affected Products

  • firebase-appdistribution

    TypeBase (abdd518)Merge (9a4bf00)Diff
    aar141 kB142 kB+997 B (+0.7%)
    apk (release)2.01 MB2.01 MB+392 B (+0.0%)

Test Logs

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

@lfkellogg lfkellogg force-pushed the lk/remove-some-synchronized-blocks branch from 2d90265 to 4cf7d38 Compare November 22, 2022 22:27
@lfkellogg lfkellogg changed the base branch from fad/in-app-feedback to fad/next November 22, 2022 22:31
@lfkellogg lfkellogg force-pushed the lk/remove-some-synchronized-blocks branch from 4cf7d38 to 9693214 Compare November 22, 2022 22:33
@lfkellogg lfkellogg merged commit 1ae9488 into fad/next Nov 23, 2022
@lfkellogg lfkellogg deleted the lk/remove-some-synchronized-blocks branch November 23, 2022 14:20
lfkellogg added a commit that referenced this pull request Dec 9, 2022
* Remove some synchronized blocks from FirebaseAppDistributionImpl

* Rename UpdateTaskCache.java to TaskCache.java

* Add @FunctionalInterface annotation

* Reformat a comment
@firebase firebase locked and limited conversation to collaborators Dec 24, 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.

3 participants