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

More details on IJ timings in the log #5325

Merged
merged 6 commits into from
Sep 13, 2023

Conversation

dkashyn-sfdc
Copy link
Contributor

Checklist

  • I have filed an issue about this change and discussed potential changes with the maintainers.
  • I have received the approval from the maintainers to make this change.
  • This is not a stylistic, refactoring, or cleanup change.

Please note that the maintainers will not be reviewing this change until all checkboxes are ticked. See
the Contributions section in the README for more
details.

Discussion thread for this change

Issue number: <please reference the issue number or url here>

Description of this change

@github-actions github-actions bot added product: CLion CLion plugin product: IntelliJ IntelliJ plugin product: GoLand GoLand plugin awaiting-review Awaiting review from Bazel team on PRs labels Sep 8, 2023
try {
Interner<String> stringInterner =
Optional.ofNullable(context.getScope(SharedStringPoolScope.class))
.map(SharedStringPoolScope::getStringInterner)
.orElse(null);
return BlazeBuildOutputs.fromParsedBepOutput(
buildResult, buildResultHelper.getBuildOutput(stringInterner));
context.output(PrintOutput.log("%s Parsing BEP outputs...", SummaryOutput.Prefix.TIMESTAMP));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't know what are the consequences of it, but we mix PrintOutput and SummaryOutput here. How about doing it this way?

context.output(SummaryOutput.output(SummaryOutput.Prefix.TIMESTAMP, "Parsing BEP outputs..."));

additionally we could avoid overriding TIMESTAMP.toString(), which also doesn't look good to me, as in this case we would call IO inside toString method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Otherwise it just prints TIMESTAMP :(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tpasternak what would you say regarding output like this?

12:03:28	Sync started
12:06:13	Triggering build with flags '[--build_event_binary_file=/var/folders/k3/n5f1skhj65g10072006pgtvr0000gq/T/intellij-bep-31d9e34c-7f8f-4376-b9be-1b944e47f3d9, --nobuild_event_binary_file_path_conversion]' ...
12:07:40	Build command finished. Retrieving BEP outputs ...
12:07:40	BEP file '/var/folders/k3/n5f1skhj65g10072006pgtvr0000gq/T/intellij-bep-31d9e34c-7f8f-4376-b9be-1b944e47f3d9' file size 294227682 bytes
12:07:40	Parsing BEP outputs...
12:07:42	Handling parsed BEP outputs...
12:07:57	BEP outputs has been processed.

Copy link
Collaborator

@tpasternak tpasternak Sep 12, 2023

Choose a reason for hiding this comment

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

So the line "Triggering build with flags is literally a duplicate of that, so i'm not sure if we need it that much

private static void outputCommand(BlazeContext context, List<String> command) {
String logMessage = "Command: " + ParametersListUtil.join(command);
context.output(
PrintOutput.log(
StringUtil.shortenTextWithEllipsis(
logMessage, /* maxLength= */ 1000, /* suffixLength= */ 0)));
}

About the bep file path - I'm not sure if it's that useful, but yes, we can merge it if you wish

context.output(SummaryOutput.output(SummaryOutput.Prefix.TIMESTAMP, "Build command finished. Retrieving BEP outputs ..."));
if (buildResultHelper instanceof BuildResultHelperBep) {
File outputFile = ((BuildResultHelperBep) buildResultHelper).getOutputFile();
context.output(SummaryOutput.output(SummaryOutput.Prefix.TIMESTAMP, String.format("BEP file '%s' file size %d bytes", outputFile.getAbsolutePath(), outputFile.length())));
Copy link
Collaborator

@tpasternak tpasternak Sep 12, 2023

Choose a reason for hiding this comment

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

I'm not sure if we really want to print the file path. But it's not a problem, we can merge it if you wish. Please only remove the duplicate file word in BEP file ... file size

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know whether shards are expected to be executed sequentially forever so wanted to have some "correlation id" just for the case.

@dkashyn-sfdc
Copy link
Contributor Author

@tpasternak could you please re-review and merge if you are ok with the current state?

@tpasternak
Copy link
Collaborator

Yeah, please only remove the "Triggering build with flags" line and let's merge it

@dkashyn-sfdc
Copy link
Contributor Author

Removed @tpasternak

@tpasternak tpasternak merged commit c6a848f into bazelbuild:master Sep 13, 2023
6 checks passed
@github-actions github-actions bot removed the awaiting-review Awaiting review from Bazel team on PRs label Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: CLion CLion plugin product: GoLand GoLand plugin product: IntelliJ IntelliJ plugin
Projects
Development

Successfully merging this pull request may close these issues.

2 participants