Skip to content

Rebase main #6709

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 41 commits into from
Feb 20, 2025
Merged

Rebase main #6709

merged 41 commits into from
Feb 20, 2025

Conversation

tom-andersen
Copy link
Contributor

No description provided.

daymxn and others added 30 commits December 18, 2024 16:24
Per [b/384956859](https://b.corp.google.com/issues/384956859),

This migrates all of our root build files to `kts`. It also refactors
our usages to be more inline with modern gradle practices.

Furthermore, this PR also fixes the following:

- [b/384956861](https://b.corp.google.com/issues/384956861) -> Provide
fallback for build script names
Per [b/384990125](https://b.corp.google.com/issues/384990125),

This migrates all of our `buildSrc` logic into a composite plugin called
`plugins`.

This PR makes no attempt to organize the code; that is out-of-scope for
the PR.

This PR also fixes various references to `buildSrc` (including markdown
links), to avoid any breakage.
Adjusted Functions docs as well as vestigial visibility issues.
…amp to explicitly document using the `@get` and/or `@set` use-site targets on Kotlin properties (#6612)
feat(rc): Add support to set custom signals for Remote Config Custom
targeting
We have been using the spotless plugin for a while already.
Per [b/391351857](https://b.corp.google.com/issues/391351857),

This refactors the `VendorPlugin` and `VendorTask` to be more compliant
with the gradle cache and configuration avoidance. It also adds proper
task logging and documentation to both the task and the plugin.

This PR also fixes the following:

- [b/391352175](https://b.corp.google.com/issues/391352175) -> Rename
plugin Util files to Extensions
The SDK was released as GA last year.
Replace the changed tag with deprecated for the last FDL release
Per [b/392134866](https://b.corp.google.com/issues/392134866),

This implements a centralized interface for communicating with GMaven
called `GMavenService`. This service implements the gradle build-service
interface to provide proper parallel access, and keeps local
`ConcurrentHashMap` instances to cache responses.

Cached responses are on a _per-build_ basis, to avoid improper caching
of dynamic data. That is, given any build- **all** tasks that utilize
`GMavenService` will share the responses from GMaven; even within a
parallel environment. But if the tasks are considered out-of-date and
are ran again, then new requests will be made to the GMaven backend.

Tests and documentation are provided for everything added as well.

Note that while this PR _implements_ `GMavenService`- it does _not_
refactor the existing `GMavenHelper` and `RepositoryClient` usages to
use it. That will occur in subsequent PRs, as to avoid polluting this
PR. Furthermore, while there are no tests for `PomElement` directly- in
a future PR that includes tests for bom generation, `PomElement` will be
tested as a by-product.

This PR also fixes the following:

- [b/392135224](https://b.corp.google.com/issues/392135224) -> Implement
centralized pom datamodel
Empty text parts go from a nuance when processed, to an exception when
send to the backend. To prevent this issue, we are dropping them when
parsing the response from the server.
We've updated from version 3.* to 5.*. Test were added were necessary to
match the coverage in the iOS repo.

A few changes (v5.1 and v5.2) don't have tests covering the new files
yet
There are some considerations to how this should be finalized. Current
implementation details that I've decided on which we can change:
* Based on the example doc, all classes `Foo` have been renamed
`InternalFoo`
* All internal serialization classes, where relevant, are moved to inner
classes of their API counterparts
* All classes only used as child fields for serialization classes have
been moved to inner classes of those classes
* All `toPublic` and `toInternal` methods on API and serialization
classes have been moved inside of those classes and `conversions.kt` has
been mostly emptied.
* A few serialization classes do not have API equivalents and are left
in a `Types.kt` file

Possible changes:
* Change all `InternalFoo` classes to have the same name, referenced as
`Foo.Internal` rather than `Foo.InternalFoo`. This will probably make
the codebase feel cleaner, but I'll wait for opinions on it
* Move serialization only classes out of the internal serialization
classes, either to inner classes of the API classes or top level classes
themselves.
* For classes that have serializers, rename serializers from
`InternalFooSerializer` to `Serializer` for example
`Foo.InternalFoo.Serializer` or `Foo.Internal.Serializer` instead of
`Foo.InternalFoo.InternalFooSerializer` or
`Foo.Internal.InternalFooSerializer`
Adds the changelog entry for #6652
Per [b/393388687](https://b.corp.google.com/issues/393388687),

This updates the `core-ktx` version to be `1.12.0` instead of `1.9.0`.
This version was accidentally downgraded in #6584.
Auto-generated PR for cleaning up release m158

NO_RELEASE_CHANGE

---------

Co-authored-by: daymxn <daymxn@users.noreply.github.com>
Co-authored-by: Daymon <daymxn@google.com>
The old version was failing to succeed, this version was tested and
works

---------

Co-authored-by: Daymon <17409137+daymxn@users.noreply.github.com>
This updates the changelog entries that had their contents changed in
the m150 CL.

NO_RELEASE_CHANGE
This includes adding vertex ai api.txt which we were lacking until now
Per [b/394616465](https://b.corp.google.com/issues/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](https://b.corp.google.com/issues/394614707) -> Move
tutorial bundle generation to its own task
- [b/394614708](https://b.corp.google.com/issues/394614708) -> Move bom
release note generation to its own task
- [b/394614709](https://b.corp.google.com/issues/394614709) -> Create a
new task for bom generation
- [b/394615027](https://b.corp.google.com/issues/394615027) -> Add tests
for bom related tasks
Per [b/394908865](https://b.corp.google.com/issues/394908865),

This fixes an issue where `ModuleVersion.bump()` was not properly
resetting the smaller version types. Additionally, this fixes some other
minor issues with bom generation.

Namely, this PR also fixes:

- [b/394908773](https://b.corp.google.com/issues/394908773) -> Fix bom
release note ordering
- [b/394909103](https://b.corp.google.com/issues/394909103) -> Separate
published bom artifacts
Auto-generated PR for cleaning up release m159

NO_RELEASE_CHANGE

---------

Co-authored-by: daymxn <daymxn@users.noreply.github.com>
Co-authored-by: Daymon <daymxn@google.com>
rlazo and others added 11 commits February 8, 2025 03:35
Token measurement is broken down by modaliy, with separate counters for
image, audio, etc.

Tests are in version 6.*, so this change also includes bumping
update_responses.sh
Co-authored-by: David Motsonashvili <davidmotson@google.com>
Co-authored-by: Rodrigo Lazo <rlazo@users.noreply.github.com>
Fix deprecated message in KeyValueBuilder to render properly
Changelog entry should be picked up for the next release
If missing, they'll default to empty.
The current refdocs are somewhat confusing and may lead to assume that
the conversion happens server-side, when it's actually client side.
Added support for querying imagen models to generate images both in gcs
and inline. Documentation incoming in a separate PR for readability

---------

Co-authored-by: David Motsonashvili <davidmotson@google.com>
Co-authored-by: rachelsaunders <52258509+rachelsaunders@users.noreply.github.com>
Co-authored-by: Daymon <17409137+daymxn@users.noreply.github.com>
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Scorecard found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@tom-andersen tom-andersen merged commit bcd602d into feat/pipelines Feb 20, 2025
66 of 77 checks passed
@google-oss-bot
Copy link
Contributor

Size Report 1

Affected Products

  • firebase-config

    TypeBase (3dd8ddf)Merge (fcd4c38)Diff
    aar108 kB112 kB+3.87 kB (+3.6%)
    apk (aggressive)211 kB211 kB+376 B (+0.2%)
    apk (release)4.58 MB4.59 MB+3.00 kB (+0.1%)
  • firebase-config-ktx

    TypeBase (3dd8ddf)Merge (fcd4c38)Diff
    aar3.26 kB3.26 kB-1 B (-0.0%)
    apk (aggressive)211 kB212 kB+376 B (+0.2%)
    apk (release)4.58 MB4.59 MB+3.00 kB (+0.1%)
  • firebase-crashlytics

    TypeBase (3dd8ddf)Merge (fcd4c38)Diff
    apk (aggressive)699 kB699 kB+184 B (+0.0%)
    apk (release)5.85 MB5.85 MB+172 B (+0.0%)
  • firebase-crashlytics-ktx

    TypeBase (3dd8ddf)Merge (fcd4c38)Diff
    aar3.54 kB3.54 kB+6 B (+0.2%)
    apk (aggressive)699 kB699 kB+188 B (+0.0%)
    apk (release)5.85 MB5.85 MB+172 B (+0.0%)
  • firebase-crashlytics-ndk

    TypeBase (3dd8ddf)Merge (fcd4c38)Diff
    aar1.65 MB1.65 MB+1 B (+0.0%)
  • firebase-dataconnect

    TypeBase (3dd8ddf)Merge (fcd4c38)Diff
    aar709 kB709 kB-6 B (-0.0%)
  • firebase-firestore

    TypeBase (3dd8ddf)Merge (fcd4c38)Diff
    aar1.45 MB1.45 MB+128 B (+0.0%)
    apk (release)11.4 MB11.4 MB+64 B (+0.0%)
  • firebase-firestore-ktx

    TypeBase (3dd8ddf)Merge (fcd4c38)Diff
    aar3.23 kB3.24 kB+5 B (+0.2%)
    apk (release)11.4 MB11.4 MB+64 B (+0.0%)
  • firebase-functions

    TypeBase (3dd8ddf)Merge (fcd4c38)Diff
    aar65.7 kB65.9 kB+130 B (+0.2%)
    apk (release)5.44 MB5.44 MB+504 B (+0.0%)
  • firebase-functions-ktx

    TypeBase (3dd8ddf)Merge (fcd4c38)Diff
    apk (release)5.44 MB5.44 MB+504 B (+0.0%)
  • firebase-perf

    TypeBase (3dd8ddf)Merge (fcd4c38)Diff
    aar316 kB316 kB+104 B (+0.0%)
    apk (aggressive)1.63 MB1.63 MB+24 B (+0.0%)
    apk (release)10.1 MB10.1 MB+40 B (+0.0%)
  • firebase-perf-ktx

    TypeBase (3dd8ddf)Merge (fcd4c38)Diff
    aar3.21 kB3.21 kB-1 B (-0.0%)
    apk (aggressive)1.63 MB1.63 MB+24 B (+0.0%)
    apk (release)10.1 MB10.1 MB+32 B (+0.0%)
  • firebase-sessions

    TypeBase (3dd8ddf)Merge (fcd4c38)Diff
    aar168 kB168 kB+142 B (+0.1%)
    apk (aggressive)559 kB560 kB+184 B (+0.0%)
    apk (release)5.52 MB5.52 MB+172 B (+0.0%)
  • firebase-vertexai

    TypeBase (3dd8ddf)Merge (fcd4c38)Diff
    aar477 kB576 kB+98.9 kB (+20.7%)
    apk (aggressive)1.09 MB1.40 MB+304 kB (+27.8%)
    apk (release)9.15 MB9.36 MB+213 kB (+2.3%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

Coverage Report 1

Affected Products

  • firebase-config

    Overall coverage changed from 84.11% (3dd8ddf) to 83.95% (fcd4c38) by -0.16%.

    FilenameBase (3dd8ddf)Merge (fcd4c38)Diff
    ConfigFetchHandler.java92.86%92.94%+0.08%
    ConfigFetchHttpClient.java87.33%86.27%-1.06%
    ConfigSharedPrefsClient.java?87.50%?
    CustomSignals.java?100.00%?
    FirebaseRemoteConfig.java89.52%89.76%+0.25%
  • firebase-firestore

    Overall coverage changed from 45.74% (3dd8ddf) to 45.74% (fcd4c38) by -0.00%.

    FilenameBase (3dd8ddf)Merge (fcd4c38)Diff
    DeleteMutation.java95.24%90.48%-4.76%
    SetMutation.java97.22%94.44%-2.78%
    Util.java73.38%73.94%+0.56%
  • firebase-installations

    Overall coverage changed from ? (3dd8ddf) to 58.17% (fcd4c38) by ?.

    23 individual files with coverage change

    FilenameBase (3dd8ddf)Merge (fcd4c38)Diff
    AutoValue_InstallationResponse.java?58.93%?
    AutoValue_PersistedInstallationEntry.java?56.98%?
    AutoValue_TokenResult.java?42.22%?
    AwaitListener.java?0.00%?
    Clock.java?0.00%?
    CrossProcessLock.java?51.85%?
    FirebaseInstallations.java?96.62%?
    FirebaseInstallationServiceClient.java?4.80%?
    FirebaseInstallationsException.java?78.57%?
    FirebaseInstallationsRegistrar.java?100.00%?
    GetAuthTokenListener.java?100.00%?
    GetIdListener.java?70.00%?
    IidStore.java?22.39%?
    InstallationResponse.java?100.00%?
    Installations.kt?40.00%?
    PersistedInstallation.java?97.01%?
    PersistedInstallationEntry.java?100.00%?
    RandomFidGenerator.java?20.00%?
    RequestLimiter.java?100.00%?
    StateListener.java?0.00%?
    SystemClock.java?100.00%?
    TokenResult.java?100.00%?
    Utils.java?95.00%?

  • firebase-messaging

    Overall coverage changed from 84.08% (3dd8ddf) to 84.04% (fcd4c38) by -0.04%.

    FilenameBase (3dd8ddf)Merge (fcd4c38)Diff
    FirebaseMessaging.java76.40%76.00%-0.40%
  • firebase-ml-modeldownloader

    Overall coverage changed from 81.86% (3dd8ddf) to 82.11% (fcd4c38) by +0.25%.

    FilenameBase (3dd8ddf)Merge (fcd4c38)Diff
    FirebaseModelDownloader.java82.21%84.66%+2.45%
  • firebase-perf

    Overall coverage changed from 70.57% (3dd8ddf) to 70.60% (fcd4c38) by +0.04%.

    FilenameBase (3dd8ddf)Merge (fcd4c38)Diff
    ConfigResolver.java90.07%90.33%+0.26%
  • firebase-sessions

    Overall coverage changed from 72.61% (3dd8ddf) to 72.39% (fcd4c38) by -0.22%.

    FilenameBase (3dd8ddf)Merge (fcd4c38)Diff
    SessionLifecycleService.kt81.48%78.41%-3.07%
  • firebase-storage

    Overall coverage changed from ? (3dd8ddf) to 84.12% (fcd4c38) by ?.

    48 individual files with coverage change

    FilenameBase (3dd8ddf)Merge (fcd4c38)Diff
    ActivityLifecycleListener.java?74.14%?
    AdaptiveStreamBuffer.java?84.62%?
    CancelException.java?100.00%?
    CancellableTask.java?100.00%?
    ControllableTask.java?100.00%?
    DeleteNetworkRequest.java?100.00%?
    DeleteStorageTask.java?100.00%?
    ExponentialBackoffSender.java?86.00%?
    FileDownloadTask.java?80.00%?
    FirebaseStorage.java?83.67%?
    FirebaseStorageComponent.java?100.00%?
    GetDownloadUrlTask.java?96.77%?
    GetMetadataNetworkRequest.java?100.00%?
    GetMetadataTask.java?85.19%?
    GetNetworkRequest.java?100.00%?
    HttpURLConnectionFactory.java?0.00%?
    HttpURLConnectionFactoryImpl.java?50.00%?
    ListNetworkRequest.java?100.00%?
    ListResult.java?100.00%?
    ListTask.java?85.71%?
    NetworkRequest.java?87.29%?
    OnPausedListener.java?0.00%?
    OnProgressListener.java?0.00%?
    ResumableNetworkRequest.java?100.00%?
    ResumableUploadByteRequest.java?90.91%?
    ResumableUploadCancelRequest.java?100.00%?
    ResumableUploadQueryRequest.java?100.00%?
    ResumableUploadStartRequest.java?95.24%?
    Slashes.java?88.24%?
    Sleeper.java?0.00%?
    SleeperImpl.java?100.00%?
    SmartHandler.java?92.31%?
    Storage.kt?39.58%?
    StorageException.java?65.45%?
    StorageMetadata.java?86.34%?
    StorageReference.java?89.94%?
    StorageReferenceUri.java?100.00%?
    StorageRegistrar.java?100.00%?
    StorageTask.java?83.69%?
    StorageTaskManager.java?100.00%?
    StorageTaskScheduler.java?95.45%?
    StreamDownloadTask.java?88.89%?
    TaskListenerImpl.java?100.00%?
    TaskState.kt?0.00%?
    UpdateMetadataNetworkRequest.java?100.00%?
    UpdateMetadataTask.java?82.14%?
    UploadTask.java?82.51%?
    Util.java?73.24%?

Test Logs

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

@firebase firebase locked and limited conversation to collaborators Mar 23, 2025
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.