Skip to content

Add warning for parallel builds#244

Merged
duncanpo merged 2 commits intomainfrom
mbt-parallel-warning
Mar 25, 2026
Merged

Add warning for parallel builds#244
duncanpo merged 2 commits intomainfrom
mbt-parallel-warning

Conversation

@sameagen-MW
Copy link
Copy Markdown
Member

Parallel workers currently do not emit telemetry data, and there are a few technical hurdles to implementing that behavior. After some consideration, I've decided that the best approach moving forward is to warn the user of this behavior, but keep it as it is today so that we can still provide users with telemetry data related to the overall build result and all tasks which ran on the client.

Unfortunately, the framework currently does not have a way to determine from within a plugin whether the build is running in parallel or not. As such, I check whether a parpool is open. This approach will never result in false negatives, but may occasionally result in false positives. Because the impact of a false positive is very low here, this seems acceptable to me but I welcome feedback from others on that decision.

p = gcp("nocreate");
if ~isempty(p)
warning("opentelemetry:buildtool:OpenTelemetryPlugin:NoParallelEmit", ...
"Tasks run on parallel workers will not emit telemetry data");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A couple of suggestions:

  • Let's not use future tense.
  • Warnings should end in a period.

Proposed edit:

Tasks executed on parallel workers do not emit telemetry data.

Question: Does a task that runs on a client (e.g., a TestTask instance) emit data?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks Houman, I like your proposal and will update the message. Tasks that run on the client will indeed emit data.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you, Sam.

@duncanpo duncanpo merged commit 357f413 into main Mar 25, 2026
5 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.

3 participants