Skip to content

Enable strict mode for executors. #4303

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
Nov 11, 2022
Merged

Conversation

vkryachko
Copy link
Member

Any violations would kill the app in debug builds of firebase-common, and log a warning in release builds. This is done to fail tests that incorrectly use executors while not affecting 3p apps in release builds.

Additionally correctly set thread priorities in an Android specific way.

Any violations would kill the app in debug builds of firebase-common,
and log a warning in release builds. This is done to fail tests that
incorrectly use executors while not affecting 3p apps in release builds.

Additionally correctly set thread priorities in an Android specific way.
@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

@vkryachko vkryachko requested review from rlazo and daymxn November 10, 2022 19:19
@google-oss-bot
Copy link
Contributor

Coverage Report 1

Affected Products

  • firebase-common

    Overall coverage changed from ? (3cf020a) to 65.52% (30a7ba8) by ?.

    37 individual files with coverage change

    FilenameBase (3cf020a)Merge (30a7ba8)Diff
    AutoValue_HeartBeatResult.java?33.33%?
    AutoValue_LibraryVersion.java?58.33%?
    AutoValue_SdkHeartBeatResult.java?0.00%?
    ComponentDiscoveryService.java?0.00%?
    ComponentMonitor.java?100.00%?
    CustomThreadFactory.java?41.18%?
    DataCollectionConfigStorage.java?88.89%?
    DataCollectionDefaultChange.java?100.00%?
    DefaultHeartBeatController.java?95.59%?
    DefaultUserAgentPublisher.java?95.45%?
    DelegatingScheduledExecutorService.java?22.64%?
    DelegatingScheduledFuture.java?69.23%?
    EmulatedServiceSettings.java?0.00%?
    ExecutorsRegistrar.java?100.00%?
    FirebaseApp.java?56.02%?
    FirebaseAppLifecycleListener.java?0.00%?
    FirebaseCommonRegistrar.java?95.74%?
    FirebaseError.java?0.00%?
    FirebaseInitProvider.java?58.82%?
    FirebaseNetworkException.java?0.00%?
    FirebaseOptions.java?31.94%?
    FirebaseTooManyRequestsException.java?0.00%?
    FirebaseTrace.java?100.00%?
    GlobalLibraryVersionRegistrar.java?75.00%?
    HeartBeatConsumer.java?0.00%?
    HeartBeatConsumerComponent.java?0.00%?
    HeartBeatController.java?0.00%?
    HeartBeatInfo.java?100.00%?
    HeartBeatInfoStorage.java?90.57%?
    HeartBeatResult.java?100.00%?
    KotlinDetector.java?66.67%?
    LibraryVersion.java?100.00%?
    LibraryVersionComponent.java?100.00%?
    PublicApi.java?0.00%?
    SdkHeartBeatResult.java?0.00%?
    UiExecutor.java?60.00%?
    UserAgentPublisher.java?0.00%?

Test Logs

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

@github-actions
Copy link
Contributor

Unit Test Results

   342 files     342 suites   17m 30s ⏱️
4 308 tests 4 286 ✔️ 22 💤 0
4 324 runs  4 302 ✔️ 22 💤 0

Results for commit b662152.

@google-oss-bot
Copy link
Contributor

Size Report 1

Affected Products

  • firebase-common

    TypeBase (3cf020a)Merge (30a7ba8)Diff
    aar58.3 kB59.2 kB+934 B (+1.6%)
    apk (aggressive)94.3 kB94.5 kB+268 B (+0.3%)
    apk (release)696 kB697 kB+476 B (+0.1%)

Test Logs

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

@vkryachko vkryachko merged commit 4173c8c into executors Nov 11, 2022
@vkryachko vkryachko deleted the vk.strict_mode_executors branch November 11, 2022 18:09
vkryachko added a commit that referenced this pull request Nov 15, 2022
* Add qualifier support to firebase components. (#3180)

* Add qualifier support to firebase components.

Details: go/firebase-component-qualifiers

* fix errorprone error.

* change copyright year.

* Register executors as components. (#4288)

* Register executors as components.

The intent for those is to be used by all Firebase SDKs and forbid
creating their own at will.

* Add copyrights.

* add more copyrights

* ktlintformat

* gJF

* ktlint

* Address review comments.

* Adds generally useful executors (#4305)

Namely, SequentialExecutor and directExecutor.

* Enable strict mode for executors. (#4303)

Any violations would kill the app in debug builds of firebase-common,
and log a warning in release builds. This is done to fail tests that
incorrectly use executors while not affecting 3p apps in release builds.

Additionally correctly set thread priorities in an Android specific way.

* Enable thread pool linter check. (#4297)

* Enable thread pool linter check.

All violations are now suppressed, bugs filed to fix each product.

* ktlint

* Remove init

* Fix copyright
davidmotson pushed a commit that referenced this pull request Nov 28, 2022
* Add qualifier support to firebase components. (#3180)

* Add qualifier support to firebase components.

Details: go/firebase-component-qualifiers

* fix errorprone error.

* change copyright year.

* Register executors as components. (#4288)

* Register executors as components.

The intent for those is to be used by all Firebase SDKs and forbid
creating their own at will.

* Add copyrights.

* add more copyrights

* ktlintformat

* gJF

* ktlint

* Address review comments.

* Adds generally useful executors (#4305)

Namely, SequentialExecutor and directExecutor.

* Enable strict mode for executors. (#4303)

Any violations would kill the app in debug builds of firebase-common,
and log a warning in release builds. This is done to fail tests that
incorrectly use executors while not affecting 3p apps in release builds.

Additionally correctly set thread priorities in an Android specific way.

* Enable thread pool linter check. (#4297)

* Enable thread pool linter check.

All violations are now suppressed, bugs filed to fix each product.

* ktlint

* Remove init

* Fix copyright
@firebase firebase locked and limited conversation to collaborators Dec 12, 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