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

Print link to debugger UI #32

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,12 @@ private <T> PCollection<T> applyWindow(
return super.apply(new AssignWindows<>(transform), input);
}

private String debuggerMessage(String projectId, String uniqifier) {
Copy link
Member

Choose a reason for hiding this comment

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

typo: uniquifier

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

return String.format("To view the debugger console, go to "
Copy link
Member

Choose a reason for hiding this comment

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

Branding issue here. For example: "To debug your job, visit Google Cloud Debugger at: ".

From their website: "Visit the Debug page of the Cloud Platform Console to use Google Cloud Debugger."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

+ "https://console.developers.google.com/debug?project=%s&dbgee=%s",
projectId, uniqifier);
}

private void maybeRegisterDebuggee(DataflowPipelineOptions options, String uniquifier) {
if (!options.getEnableCloudDebugger()) {
return;
Expand All @@ -436,6 +442,8 @@ private void maybeRegisterDebuggee(DataflowPipelineOptions options, String uniqu
Clouddebugger debuggerClient = Transport.newClouddebuggerClient(options).build();
Debuggee debuggee = registerDebuggee(debuggerClient, uniquifier);
options.setDebuggee(debuggee);

System.out.println(debuggerMessage(options.getProject(), debuggee.getUniquifier()));
}

private Debuggee registerDebuggee(Clouddebugger debuggerClient, String uniquifier) {
Expand Down