Skip to content

fix(native): register Cloud Scheduler and Monitoring protos for native-image reflection#66

Merged
hectorvent merged 1 commit into
mainfrom
fix/native-proto-reflection
Jun 19, 2026
Merged

fix(native): register Cloud Scheduler and Monitoring protos for native-image reflection#66
hectorvent merged 1 commit into
mainfrom
fix/native-proto-reflection

Conversation

@hectorvent

Copy link
Copy Markdown
Contributor

Summary

Registers the SDK reflect-config for com.google.cloud.scheduler.v1 and com.google.monitoring.v3 under META-INF/native-image. floci-gcp depends on the gRPC stubs (grpc-google-cloud-scheduler-v1, grpc-google-cloud-monitoring-v3), not the GAPIC client libraries that ship reflect-config.json, so these proto message classes weren't registered for GraalVM native-image reflection.

Type of change

  • Bug fix (fix:)
  • New feature (feat:)
  • Breaking change (feat!: or fix!:)
  • Docs / chore

GCP Compatibility

Native-image only; no wire-protocol change. In native builds this broke:

  • Cloud Scheduler REST (gcloud): Invalid protobuf JSON: Generated message class com.google.cloud.scheduler.v1.Job missing method getName.
  • Cloud Monitoring CreateTimeSeries: com.google.monitoring.v3.TypedValue missing getBoolValue()StatusRuntimeException INTERNAL.

Verified against the native binary: the sdk-test-gcloud scheduler cases and MonitoringTest now pass. JVM/CI was unaffected (the java.sql-style ServiceLoader/reflection is present on the JVM).

Checklist

  • ./mvnw test passes locally
  • New or updated integration test added — reflect-config only; verified via native build + compatibility suites
  • Commit messages follow Conventional Commits

…e-image reflection

floci-gcp depends on the gRPC stubs (grpc-google-cloud-scheduler-v1,
grpc-google-cloud-monitoring-v3), not the GAPIC client libraries that ship
reflect-config.json, so the proto message classes were not registered for
native-image reflection. In native builds this broke:

- Cloud Scheduler REST (gcloud): "Invalid protobuf JSON: Generated message
  class com.google.cloud.scheduler.v1.Job missing method getName".
- Cloud Monitoring CreateTimeSeries: com.google.monitoring.v3.TypedValue
  missing getBoolValue() -> StatusRuntimeException INTERNAL.

Add the SDK's authoritative reflect-config.json for com.google.cloud.scheduler.v1
and com.google.cloud.monitoring.v3 under META-INF/native-image, so GraalVM
registers the message graphs. JVM builds were unaffected.
@hectorvent hectorvent merged commit cf15a03 into main Jun 19, 2026
10 checks passed
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.

1 participant