Skip to content
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

Refactor bom generation #6675

Merged
merged 11 commits into from
Feb 5, 2025
Merged

Refactor bom generation #6675

merged 11 commits into from
Feb 5, 2025

Conversation

daymxn
Copy link
Member

@daymxn daymxn commented Feb 5, 2025

Per b/394616465,

This refactors our bom generation and all of the bom related tasks to solve the following issues:

  1. Testability.
  2. Gradle cache and config avoidance compliance.
  3. Generation of bom, bom release notes, and tutorial bundle in isolation of each other.
  4. Documentation.
  5. Usage of classes that were only used for bom generation (of which, suitable replacements were used elsewhere in our plugin logic).

Effectively, this PR splits bom generation into 3 tasks: GenerateBomTask, GenerateBomReleaseNotesTask, and GenerateTutorialBundleTask. These 3 tasks get ran together during the release, but them being separated now makes it easier to not only run them in isolation of each other- but test them in isolation. As such, this PR also includes tests for all of the bom related tasks, and documentation for everything. These tasks also take advantage of the new GMavenService- to support proper parallel execution and caching. And finally, the configuration of these tasks has been moved to the use-site instead of the declaration site, to more cleanly match other tasks and the configuration style that the Gradle team pushes.

This PR also fixes the following:

  • b/394614707 -> Move tutorial bundle generation to its own task
  • b/394614708 -> Move bom release note generation to its own task
  • b/394614709 -> Create a new task for bom generation
  • b/394615027 -> Add tests for bom related tasks

Copy link
Contributor

github-actions bot commented Feb 5, 2025

📝 PRs merging into main branch

Our main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released.

1 similar comment
Copy link
Contributor

github-actions bot commented Feb 5, 2025

📝 PRs merging into main branch

Our main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released.

Copy link
Contributor

github-actions bot commented Feb 5, 2025

Vertex AI Mock Responses Check ⚠️

A newer major version of the mock responses for Vertex AI unit tests is available. update_responses.sh should be updated to clone the latest version of the responses: v6.1

Copy link
Contributor

github-actions bot commented Feb 5, 2025

plugins test results

66 tests   66 ✅  1m 15s ⏱️
12 suites   0 💤
12 files     0 ❌

Results for commit b45fc48.

Copy link
Contributor

github-actions bot commented Feb 5, 2025

Test Results

 1 034 files  ±0   1 034 suites  ±0   34m 24s ⏱️ -17s
 5 888 tests ±0   5 866 ✅ +1  22 💤 ±0  0 ❌  - 1 
11 839 runs  ±0  11 795 ✅ +1  44 💤 ±0  0 ❌  - 1 

Results for commit b45fc48. ± Comparison against base commit 92f448f.

@google-oss-bot
Copy link
Contributor

@daymxn daymxn merged commit b8803fc into main Feb 5, 2025
268 checks passed
@daymxn daymxn deleted the daymon-refactor-bom-generation branch February 5, 2025 20:05
@google-oss-bot
Copy link
Contributor

Coverage Report 1

Affected Products

  • firebase-database

    Overall coverage changed from 50.16% (92f448f) to 50.21% (fd10f74) by +0.04%.

    FilenameBase (92f448f)Merge (fd10f74)Diff
    ChildChangeAccumulator.java83.33%96.67%+13.33%
  • firebase-inappmessaging

    Overall coverage changed from ? (92f448f) to 39.03% (fd10f74) by ?.

    148 individual files with coverage change

    FilenameBase (92f448f)Merge (fd10f74)Diff
    AbtIntegrationHelper.java?60.87%?
    AbtIntegrationHelper_Factory.java?0.00%?
    Action.java?76.47%?
    Analytics.java?0.00%?
    AnalyticsConstants.java?0.00%?
    AnalyticsEventsManager.java?85.19%?
    AnalyticsEventsModule.java?0.00%?
    AnalyticsEventsModule_ProvidesAnalyticsConnectorEventsFactory.java?0.00%?
    AnalyticsEventsModule_ProvidesAnalyticsEventsManagerFactory.java?0.00%?
    AnalyticsListener.java?0.00%?
    ApiClient.java?100.00%?
    ApiClientModule.java?0.00%?
    ApiClientModule_ProvidesApiClientFactory.java?0.00%?
    ApiClientModule_ProvidesDataCollectionHelperFactory.java?0.00%?
    ApiClientModule_ProvidesFirebaseAppFactory.java?0.00%?
    ApiClientModule_ProvidesFirebaseInstallationsFactory.java?0.00%?
    ApiClientModule_ProvidesSharedPreferencesUtilsFactory.java?0.00%?
    ApiClientModule_ProvidesTestDeviceHelperFactory.java?0.00%?
    AppComponent.java?0.00%?
    AppForeground.java?0.00%?
    ApplicationModule.java?0.00%?
    ApplicationModule_DeveloperListenerManagerFactory.java?0.00%?
    ApplicationModule_ProvidesApplicationFactory.java?0.00%?
    AppMeasurementModule.java?0.00%?
    AppMeasurementModule_ProvidesAnalyticsConnectorFactory.java?0.00%?
    AppMeasurementModule_ProvidesSubsriberFactory.java?0.00%?
    AutoValue_InstallationIdResult.java?33.33%?
    AutoValue_RateLimit.java?44.68%?
    BannerMessage.java?75.00%?
    Button.java?61.76%?
    CampaignAnalytics.java?33.22%?
    CampaignAnalyticsOrBuilder.java?0.00%?
    CampaignCache.java?0.00%?
    CampaignCacheClient.java?88.00%?
    CampaignCacheClient_Factory.java?0.00%?
    CampaignImpression.java?38.96%?
    CampaignImpressionList.java?39.25%?
    CampaignImpressionListOrBuilder.java?0.00%?
    CampaignImpressionOrBuilder.java?0.00%?
    CampaignMetadata.java?100.00%?
    CampaignProto.java?27.23%?
    CardMessage.java?78.48%?
    ClientAppInfo.java?35.79%?
    ClientAppInfoOrBuilder.java?0.00%?
    Clock.java?0.00%?
    CommonTypesProto.java?9.87%?
    DaggerAppComponent.java?0.00%?
    DaggerUniversalComponent.java?0.00%?
    DataCollectionHelper.java?87.50%?
    DataCollectionHelper_Factory.java?0.00%?
    DeveloperListenerManager.java?100.00%?
    DismissType.java?82.61%?
    DisplayCallbacksFactory.java?100.00%?
    DisplayCallbacksFactory_Factory.java?0.00%?
    DisplayCallbacksImpl.java?93.46%?
    EventType.java?76.19%?
    ExecutorsModule.java?0.00%?
    ExecutorsModule_ProvidesBackgroundExecutorFactory.java?0.00%?
    ExecutorsModule_ProvidesBlockingExecutorFactory.java?0.00%?
    ExecutorsModule_ProvidesLightWeightExecutorFactory.java?0.00%?
    ExperimentPayloadProto.java?6.05%?
    FetchEligibleCampaignsRequest.java?32.98%?
    FetchEligibleCampaignsRequestOrBuilder.java?0.00%?
    FetchEligibleCampaignsResponse.java?42.86%?
    FetchEligibleCampaignsResponseOrBuilder.java?0.00%?
    FetchErrorReason.java?52.17%?
    FiamAnalyticsConnectorListener.java?100.00%?
    FiamFetchService.java?0.00%?
    FirebaseAppScope.java?0.00%?
    FirebaseInAppMessaging.java?80.60%?
    FirebaseInAppMessagingCampaignAnalyticsProto.java?0.00%?
    FirebaseInAppMessagingClickListener.java?0.00%?
    FirebaseInAppMessagingContextualTrigger.java?0.00%?
    FirebaseInAppMessagingDismissListener.java?0.00%?
    FirebaseInAppMessagingDisplay.java?0.00%?
    FirebaseInAppMessagingDisplayCallbacks.java?100.00%?
    FirebaseInAppMessagingDisplayErrorListener.java?0.00%?
    FirebaseInAppMessagingImpressionListener.java?0.00%?
    FirebaseInAppMessagingRegistrar.java?0.00%?
    FirebaseInAppMessaging_Factory.java?0.00%?
    ForegroundFlowableModule.java?0.00%?
    ForegroundFlowableModule_ProvidesAppForegroundEventStreamFactory.java?0.00%?
    ForegroundNotifier.java?76.00%?
    GrpcChannelModule.java?0.00%?
    GrpcChannelModule_ProvidesGrpcChannelFactory.java?0.00%?
    GrpcChannelModule_ProvidesServiceHostFactory.java?0.00%?
    GrpcClient.java?100.00%?
    GrpcClientModule.java?0.00%?
    GrpcClientModule_ProvidesApiKeyHeadersFactory.java?0.00%?
    GrpcClientModule_ProvidesInAppMessagingSdkServingStubFactory.java?0.00%?
    GrpcClient_Factory.java?0.00%?
    ImageData.java?71.43%?
    ImageOnlyMessage.java?75.86%?
    ImpressionStorageClient.java?100.00%?
    ImpressionStorageClient_Factory.java?0.00%?
    ImpressionStore.java?0.00%?
    InAppMessage.java?24.24%?
    InAppMessageStreamManager.java?91.40%?
    InAppMessageStreamManager_Factory.java?0.00%?
    InAppMessaging.kt?0.00%?
    InAppMessagingSdkServingGrpc.java?45.95%?
    InstallationIdResult.java?100.00%?
    Logging.java?0.00%?
    MessagesProto.java?36.03%?
    MessageType.java?100.00%?
    MetricsLoggerClient.java?94.29%?
    ModalMessage.java?74.07%?
    ProgramaticContextualTriggers.java?0.00%?
    ProgrammaticContextualTriggerFlowableModule.java?0.00%?
    ProgrammaticContextualTriggerFlowableModule_ProvidesProgramaticContextualTriggersFactory.java?0.00%?
    ProgrammaticContextualTriggerFlowableModule_ProvidesProgramaticContextualTriggerStreamFactory.java?0.00%?
    ProgrammaticTrigger.java?0.00%?
    ProtoMarshallerClient.java?91.40%?
    ProtoMarshallerClient_Factory.java?0.00%?
    ProtoStorageClient.java?100.00%?
    ProtoStorageClientModule.java?0.00%?
    ProtoStorageClientModule_ProvidesProtoStorageClientForCampaignFactory.java?0.00%?
    ProtoStorageClientModule_ProvidesProtoStorageClientForImpressionStoreFactory.java?0.00%?
    ProtoStorageClientModule_ProvidesProtoStorageClientForLimiterStoreFactory.java?0.00%?
    ProviderInstaller.java?37.50%?
    ProviderInstaller_Factory.java?0.00%?
    ProxyAnalyticsConnector.java?67.95%?
    RateLimit.java?0.00%?
    RateLimiterClient.java?100.00%?
    RateLimiterClient_Factory.java?0.00%?
    RateLimitModule.java?0.00%?
    RateLimitModule_ProvidesAppForegroundRateLimitFactory.java?0.00%?
    RateLimitProto.java?52.69%?
    RenderErrorReason.java?82.61%?
    SchedulerModule.java?0.00%?
    SchedulerModule_ProvidesComputeSchedulerFactory.java?0.00%?
    SchedulerModule_ProvidesIOSchedulerFactory.java?0.00%?
    SchedulerModule_ProvidesMainThreadSchedulerFactory.java?0.00%?
    Schedulers.java?87.50%?
    Schedulers_Factory.java?0.00%?
    SharedPreferencesUtils.java?40.35%?
    SharedPreferencesUtils_Factory.java?0.00%?
    SystemClock.java?100.00%?
    SystemClockModule.java?0.00%?
    SystemClockModule_ProvidesSystemClockModuleFactory.java?0.00%?
    SystemClock_Factory.java?0.00%?
    TestDeviceHelper.java?100.00%?
    TestDeviceHelper_Factory.java?0.00%?
    Text.java?67.74%?
    TransportClientModule.java?0.00%?
    TransportClientModule_ProvidesMetricsLoggerClientFactory.java?0.00%?
    TriggeredInAppMessage.java?100.00%?
    UniversalComponent.java?0.00%?

  • firebase-messaging

    Overall coverage changed from 84.04% (92f448f) to 84.15% (fd10f74) by +0.11%.

    FilenameBase (92f448f)Merge (fd10f74)Diff
    Metadata.java36.51%41.27%+4.76%
  • firebase-storage

    Overall coverage changed from 83.96% (92f448f) to 84.29% (fd10f74) by +0.33%.

    FilenameBase (92f448f)Merge (fd10f74)Diff
    StorageException.java65.45%69.09%+3.64%
    StorageTask.java83.38%83.99%+0.60%
    StreamDownloadTask.java88.89%88.41%-0.48%
    UploadTask.java81.52%83.17%+1.65%

Test Logs

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

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.

3 participants