Skip to content

Commit 2a690f0

Browse files
authored
Ensure that PCT is installed and licenesed before checking if a pool is open. (#245)
1 parent 357f413 commit 2a690f0

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/build_and_test_full.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
push:
66
branches:
77
- main
8-
- mbt-plugin
8+
- pct-unavailable-fix
99
env:
1010
MLM_LICENSE_TOKEN: ${{ secrets.MLM_LICENSE_TOKEN }}
1111
jobs:

instrumentation/buildtool/+matlab/+buildtool/+plugins/OpenTelemetryPlugin.m

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ function runBuild(plugin, pluginData)
99
%
1010
% Imperfect detection of parallel builds but
1111
% the impact of a false positive is very low
12-
p = gcp("nocreate");
13-
if ~isempty(p)
14-
warning("opentelemetry:buildtool:OpenTelemetryPlugin:NoParallelEmit", ...
15-
"Tasks executed on parallel workers do not emit telemetry data.");
12+
if matlab.internal.parallel.isPCTInstalled && matlab.internal.parallel.isPCTLicensed
13+
p = gcp("nocreate");
14+
if ~isempty(p)
15+
warning("opentelemetry:buildtool:OpenTelemetryPlugin:NoParallelEmit", ...
16+
"Tasks executed on parallel workers do not emit telemetry data.");
17+
end
1618
end
1719

1820
% Configure by attaching to span if passed in via environment

0 commit comments

Comments
 (0)