Skip to content

Commit

Permalink
Remove Cloud Debugger from Java 8 runtime.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 536387567
Change-Id: Ia0384868e9971153dded1f2b2d08a18d37c92226
  • Loading branch information
ludoch authored and gae-java-bot committed May 30, 2023
1 parent d6a8426 commit 332e8a6
Show file tree
Hide file tree
Showing 23 changed files with 9 additions and 963 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ The Java 11, Java 17 runtimes can benefit from extra user configuration when sta
The default entrypoint used to boot the JVM is generated by App Engine Buildpacks.
Essentially, it is equivalent to define this entrypoint in the `appengine-web.xml` file. For example:
<pre><entrypoint>java --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED -showversion -Xms32M -Xmx204M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:+PrintCommandLineFlags -agentpath:/opt/cdbg/cdbg_java_agent.so=--log_dir=/tmp,--alsologtostderr=true,--cdbg_extra_class_path=/workspace/WEB-INF/classes:/workspace/WEB-INF/lib -Dclasspath.runtimebase=/base/java_runtime -Djava.class.path=/base/java_runtime/runtime-main.jar -Djava.library.path=/base/java_runtime: com/google/apphosting/runtime/JavaRuntimeMainWithDefaults --fixed_application_path=/workspace /base/java_runtime</entrypoint></pre>
<pre><entrypoint>java --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED -showversion -Xms32M -Xmx204M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:+PrintCommandLineFlags -Dclasspath.runtimebase=/base/java_runtime -Djava.class.path=/base/java_runtime/runtime-main.jar -Djava.library.path=/base/java_runtime: com/google/apphosting/runtime/JavaRuntimeMainWithDefaults --fixed_application_path=/workspace /base/java_runtime</entrypoint></pre>
We do not recommend changing this default entrypoint as the memory settings are calculated based on the instance type (F1, F2, F4) and memory available.
Expand Down
8 changes: 0 additions & 8 deletions protobuf/clone-controller.proto
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,4 @@ service CloneController {
// Deprecated.
rpc GetPerformanceData(PerformanceDataRequest)
returns (java.apphosting.PerformanceData) {}

// Updates a list of Cloud Debugger breakpoints on a clone.
rpc UpdateActiveBreakpoints(java.apphosting.CloudDebuggerBreakpoints)
returns (java.apphosting.CloudDebuggerBreakpoints) {}

// Gets source context of the clone app.
rpc GetDebuggeeInfo(java.apphosting.DebuggeeInfoRequest)
returns (java.apphosting.DebuggeeInfoResponse) {}
}
20 changes: 0 additions & 20 deletions protobuf/clone.proto
Original file line number Diff line number Diff line change
Expand Up @@ -429,23 +429,3 @@ message SupervisorSettings {
// this.
optional int32 clone_reducer_min_clones = 67;
}

// List of active Cloud Debugger breakpoints that AppServer sends to the clone.
message CloudDebuggerBreakpoints {
// Serialized "google.cloud.debugger.v1.Breakpoint" messages. We can't use
// it directly here because this file is build with proto1 and "Breakpoint"
// seems to be incompatible.
repeated bytes breakpoint_data = 1;
}

message DebuggeeInfo {
optional google.devtools.source.v1.SourceContext source_context = 1;
}

message DebuggeeInfoRequest {
required string app_version_id = 1;
}

message DebuggeeInfoResponse {
optional DebuggeeInfo debuggee_info = 1;
}
Original file line number Diff line number Diff line change
Expand Up @@ -213,104 +213,6 @@ private CloneControllerGrpc() {}
return getGetPerformanceDataMethod;
}

private static volatile io.grpc.MethodDescriptor<
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints,
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints>
getUpdateActiveBreakpointsMethod;

@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "UpdateActiveBreakpoints",
requestType = com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints.class,
responseType = com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints,
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints>
getUpdateActiveBreakpointsMethod() {
io.grpc.MethodDescriptor<
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints,
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints>
getUpdateActiveBreakpointsMethod;
if ((getUpdateActiveBreakpointsMethod = CloneControllerGrpc.getUpdateActiveBreakpointsMethod)
== null) {
synchronized (CloneControllerGrpc.class) {
if ((getUpdateActiveBreakpointsMethod =
CloneControllerGrpc.getUpdateActiveBreakpointsMethod)
== null) {
CloneControllerGrpc.getUpdateActiveBreakpointsMethod =
getUpdateActiveBreakpointsMethod =
io.grpc.MethodDescriptor
.<com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints,
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints>
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(SERVICE_NAME, "UpdateActiveBreakpoints"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints
.getDefaultInstance()))
.setSchemaDescriptor(
new CloneControllerMethodDescriptorSupplier("UpdateActiveBreakpoints"))
.build();
}
}
}
return getUpdateActiveBreakpointsMethod;
}

private static volatile io.grpc.MethodDescriptor<
com.google.apphosting.base.protos.ClonePb.DebuggeeInfoRequest,
com.google.apphosting.base.protos.ClonePb.DebuggeeInfoResponse>
getGetDebuggeeInfoMethod;

@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetDebuggeeInfo",
requestType = com.google.apphosting.base.protos.ClonePb.DebuggeeInfoRequest.class,
responseType = com.google.apphosting.base.protos.ClonePb.DebuggeeInfoResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.apphosting.base.protos.ClonePb.DebuggeeInfoRequest,
com.google.apphosting.base.protos.ClonePb.DebuggeeInfoResponse>
getGetDebuggeeInfoMethod() {
io.grpc.MethodDescriptor<
com.google.apphosting.base.protos.ClonePb.DebuggeeInfoRequest,
com.google.apphosting.base.protos.ClonePb.DebuggeeInfoResponse>
getGetDebuggeeInfoMethod;
if ((getGetDebuggeeInfoMethod = CloneControllerGrpc.getGetDebuggeeInfoMethod) == null) {
synchronized (CloneControllerGrpc.class) {
if ((getGetDebuggeeInfoMethod = CloneControllerGrpc.getGetDebuggeeInfoMethod) == null) {
CloneControllerGrpc.getGetDebuggeeInfoMethod =
getGetDebuggeeInfoMethod =
io.grpc.MethodDescriptor
.<com.google.apphosting.base.protos.ClonePb.DebuggeeInfoRequest,
com.google.apphosting.base.protos.ClonePb.DebuggeeInfoResponse>
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDebuggeeInfo"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.apphosting.base.protos.ClonePb.DebuggeeInfoRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.apphosting.base.protos.ClonePb.DebuggeeInfoResponse
.getDefaultInstance()))
.setSchemaDescriptor(
new CloneControllerMethodDescriptorSupplier("GetDebuggeeInfo"))
.build();
}
}
}
return getGetDebuggeeInfoMethod;
}

/** Creates a new async stub that supports all call types for the service */
public static CloneControllerStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory<CloneControllerStub> factory =
Expand Down Expand Up @@ -418,37 +320,6 @@ public void getPerformanceData(
getGetPerformanceDataMethod(), responseObserver);
}

/**
*
*
* <pre>
* Updates a list of Cloud Debugger breakpoints on a clone.
* </pre>
*/
public void updateActiveBreakpoints(
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints request,
io.grpc.stub.StreamObserver<
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints>
responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getUpdateActiveBreakpointsMethod(), responseObserver);
}

/**
*
*
* <pre>
* Gets source context of the clone app.
* </pre>
*/
public void getDebuggeeInfo(
com.google.apphosting.base.protos.ClonePb.DebuggeeInfoRequest request,
io.grpc.stub.StreamObserver<com.google.apphosting.base.protos.ClonePb.DebuggeeInfoResponse>
responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getGetDebuggeeInfoMethod(), responseObserver);
}

@java.lang.Override
public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
Expand Down Expand Up @@ -480,20 +351,6 @@ public final io.grpc.ServerServiceDefinition bindService() {
com.google.apphosting.base.protos.ModelClonePb.PerformanceDataRequest,
com.google.apphosting.base.protos.ClonePb.PerformanceData>(
this, METHODID_GET_PERFORMANCE_DATA)))
.addMethod(
getUpdateActiveBreakpointsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints,
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints>(
this, METHODID_UPDATE_ACTIVE_BREAKPOINTS)))
.addMethod(
getGetDebuggeeInfoMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.apphosting.base.protos.ClonePb.DebuggeeInfoRequest,
com.google.apphosting.base.protos.ClonePb.DebuggeeInfoResponse>(
this, METHODID_GET_DEBUGGEE_INFO)))
.build();
}
}
Expand Down Expand Up @@ -580,41 +437,6 @@ public void getPerformanceData(
request,
responseObserver);
}

/**
*
*
* <pre>
* Updates a list of Cloud Debugger breakpoints on a clone.
* </pre>
*/
public void updateActiveBreakpoints(
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints request,
io.grpc.stub.StreamObserver<
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints>
responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getUpdateActiveBreakpointsMethod(), getCallOptions()),
request,
responseObserver);
}

/**
*
*
* <pre>
* Gets source context of the clone app.
* </pre>
*/
public void getDebuggeeInfo(
com.google.apphosting.base.protos.ClonePb.DebuggeeInfoRequest request,
io.grpc.stub.StreamObserver<com.google.apphosting.base.protos.ClonePb.DebuggeeInfoResponse>
responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetDebuggeeInfoMethod(), getCallOptions()),
request,
responseObserver);
}
}

/** */
Expand Down Expand Up @@ -684,33 +506,6 @@ public com.google.apphosting.base.protos.ClonePb.PerformanceData getPerformanceD
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetPerformanceDataMethod(), getCallOptions(), request);
}

/**
*
*
* <pre>
* Updates a list of Cloud Debugger breakpoints on a clone.
* </pre>
*/
public com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints
updateActiveBreakpoints(
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getUpdateActiveBreakpointsMethod(), getCallOptions(), request);
}

/**
*
*
* <pre>
* Gets source context of the clone app.
* </pre>
*/
public com.google.apphosting.base.protos.ClonePb.DebuggeeInfoResponse getDebuggeeInfo(
com.google.apphosting.base.protos.ClonePb.DebuggeeInfoRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetDebuggeeInfoMethod(), getCallOptions(), request);
}
}

/** */
Expand Down Expand Up @@ -785,43 +580,12 @@ protected CloneControllerFutureStub build(
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetPerformanceDataMethod(), getCallOptions()), request);
}

/**
*
*
* <pre>
* Updates a list of Cloud Debugger breakpoints on a clone.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints>
updateActiveBreakpoints(
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getUpdateActiveBreakpointsMethod(), getCallOptions()), request);
}

/**
*
*
* <pre>
* Gets source context of the clone app.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.apphosting.base.protos.ClonePb.DebuggeeInfoResponse>
getDebuggeeInfo(com.google.apphosting.base.protos.ClonePb.DebuggeeInfoRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetDebuggeeInfoMethod(), getCallOptions()), request);
}
}

private static final int METHODID_WAIT_FOR_SANDBOX = 0;
private static final int METHODID_APPLY_CLONE_SETTINGS = 1;
private static final int METHODID_SEND_DEADLINE = 2;
private static final int METHODID_GET_PERFORMANCE_DATA = 3;
private static final int METHODID_UPDATE_ACTIVE_BREAKPOINTS = 4;
private static final int METHODID_GET_DEBUGGEE_INFO = 5;

private static final class MethodHandlers<Req, Resp>
implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
Expand Down Expand Up @@ -865,20 +629,6 @@ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserv
com.google.apphosting.base.protos.ClonePb.PerformanceData>)
responseObserver);
break;
case METHODID_UPDATE_ACTIVE_BREAKPOINTS:
serviceImpl.updateActiveBreakpoints(
(com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints) request,
(io.grpc.stub.StreamObserver<
com.google.apphosting.base.protos.ClonePb.CloudDebuggerBreakpoints>)
responseObserver);
break;
case METHODID_GET_DEBUGGEE_INFO:
serviceImpl.getDebuggeeInfo(
(com.google.apphosting.base.protos.ClonePb.DebuggeeInfoRequest) request,
(io.grpc.stub.StreamObserver<
com.google.apphosting.base.protos.ClonePb.DebuggeeInfoResponse>)
responseObserver);
break;
default:
throw new AssertionError();
}
Expand Down Expand Up @@ -947,8 +697,6 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
.addMethod(getApplyCloneSettingsMethod())
.addMethod(getSendDeadlineMethod())
.addMethod(getGetPerformanceDataMethod())
.addMethod(getUpdateActiveBreakpointsMethod())
.addMethod(getGetDebuggeeInfoMethod())
.build();
}
}
Expand Down
Loading

0 comments on commit 332e8a6

Please sign in to comment.