Skip to content

Migrate Android Build API usage to V4 OnePlatform under feature flag#5327

Open
hunsche wants to merge 2 commits into
masterfrom
migrate-android-build-api-v4
Open

Migrate Android Build API usage to V4 OnePlatform under feature flag#5327
hunsche wants to merge 2 commits into
masterfrom
migrate-android-build-api-v4

Conversation

@hunsche

@hunsche hunsche commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

This PR migrates the Android Build API client calls from legacy V3 (androidbuildinternal.googleapis.com) to the new V4 Private API (androidbuild-pa.googleapis.com) using standard OnePlatform discovery.

Changes:

  • Added a new Datastore Config property 'use_android_build_api_v4' to the Config model class to support runtime toggle of the API version.
  • Updated 'fetch_artifact.py' to conditionally initialize and use either the V3 or V4 client/endpoints depending on the Datastore feature flag.
  • Refactored logs to use structured dictionary-based entries with the '[AndroidBuildAPI]' tag to facilitate filtering and diagnosis in Cloud Logging.

@hunsche hunsche requested a review from a team as a code owner June 16, 2026 19:33
@hunsche hunsche requested review from PauloVLB and javanlacerda June 16, 2026 19:34
artifact_name=name)

if _use_v4():
artifact_query = client.buildartifacts().get(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just to confirm: Is the difference between the v4 path and the v3 path buildartifacts vs buildartifact?

@dylanjew

Copy link
Copy Markdown
Collaborator

Any concerns with landing this so we can test the API and uncover any issues? @hunsche

hunsche added 2 commits June 23, 2026 08:55
The legacy Android Build API V3 (androidbuildinternal.googleapis.com) is being sunsetted. This CL migrates the client calls to the new V4 Private API (androidbuild-pa.googleapis.com) using standard discovery.

Changes:
- Added a 'use_android_build_api_v4' Datastore Config property to allow runtime feature toggle.
- Refactored 'fetch_artifact.py' to support V4 OnePlatform endpoint and resource names dynamically behind the feature flag.
- Migrated legacy logs to structured dictionary-based logs with '[AndroidBuildAPI]' tagging for easier Cloud Logging filtering.
@dylanjew dylanjew force-pushed the migrate-android-build-api-v4 branch from 1ca0a3e to a7f4923 Compare June 23, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants