Browse Source

Merge pull request #15561 from smatvienko-tb/fix/yarn-build-race-tsc-not-found-lts-4.2

Fix intermittent `tsc: not found` under `mvn -T`: serialize msa yarn modules
pull/15581/head
Viacheslav Klimov 4 weeks ago
committed by GitHub
parent
commit
31800a0bb2
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 25
      msa/js-executor/pom.xml
  2. 11
      msa/pom.xml
  3. 2
      msa/web-ui/pom.xml
  4. 2
      ui-ngx/pom.xml

25
msa/js-executor/pom.xml

@ -52,6 +52,29 @@
<type>exe</type>
<scope>provided</scope>
</dependency>
<!--
Reactor-only ordering dep (NOT a real classpath dependency).
Forces `mvn -T<n>` to serialize this module after web-ui so that
no two `yarn install` / `yarn run pkg` invocations can overlap on
the same agent. Concurrent yarn 1.x processes share ~/.cache/yarn
and have intermittently produced `tsc: not found` failures during
yarn pkg (incomplete typescript extraction in node_modules).
The chain is: ui-ngx -> msa/web-ui -> msa/js-executor.
type=pom + provided + wildcard exclusions keep nothing on the classpath.
-->
<dependency>
<groupId>org.thingsboard.msa</groupId>
<artifactId>web-ui</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
@ -90,7 +113,7 @@
</goals>
<phase>compile</phase>
<configuration>
<arguments>run pkg</arguments>
<arguments>--mutex network run pkg</arguments>
</configuration>
</execution>
</executions>

11
msa/pom.xml

@ -44,7 +44,16 @@
</properties>
<modules>
<!--Modules order is important to speedup parallel build and avoid yarn pgk parallel execution-->
<!--
Module order below is informational only. Yarn-using modules
(web-ui, js-executor) are serialized via reactor-only
<dependency> entries in their own poms, forming the chain
ui-ngx -> web-ui -> js-executor. This prevents
concurrent yarn install / yarn run pkg invocations under `mvn -T<n>`,
which previously caused intermittent `tsc: not found` failures
(incomplete typescript extraction in node_modules from racing
yarn 1.x processes against the shared ~/.cache/yarn).
-->
<module>tb</module>
<module>web-ui</module>
<module>vc-executor</module>

2
msa/web-ui/pom.xml

@ -99,7 +99,7 @@
</goals>
<phase>compile</phase>
<configuration>
<arguments>run pkg</arguments>
<arguments>--mutex network run pkg</arguments>
</configuration>
</execution>
</executions>

2
ui-ngx/pom.xml

@ -106,7 +106,7 @@
<goal>yarn</goal>
</goals>
<configuration>
<arguments>run build:prod</arguments>
<arguments>--mutex network run build:prod</arguments>
</configuration>
</execution>
</executions>

Loading…
Cancel
Save