This is an automated email from the ASF dual-hosted git repository.
tiagobento pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git
The following commit(s) were added to refs/heads/main by this push:
new fdb7c5d7545 NO-ISSUE: CI partitioning script was leaving out the last
package (#2647)
fdb7c5d7545 is described below
commit fdb7c5d7545d47ae0297e19e4340c087d7147978
Author: Thiago Lugli <[email protected]>
AuthorDate: Fri Oct 4 15:18:32 2024 -0300
NO-ISSUE: CI partitioning script was leaving out the last package (#2647)
---
.../supporting-files/ci/build-partitioning/build_partitioning.ts | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/.github/supporting-files/ci/build-partitioning/build_partitioning.ts
b/.github/supporting-files/ci/build-partitioning/build_partitioning.ts
index a9dcd6f77a5..8b080b25185 100644
--- a/.github/supporting-files/ci/build-partitioning/build_partitioning.ts
+++ b/.github/supporting-files/ci/build-partitioning/build_partitioning.ts
@@ -182,7 +182,7 @@ async function getPartitions(): Promise<Array<None | Full |
Partial>> {
const chunkSize = 50;
for (let i = 0; i < changedPackagesNames.length; i += chunkSize) {
changedPackagesNamesChunks.push(
- changedPackagesNames.slice(i, Math.min(i + chunkSize,
changedPackagesNames.length - 1))
+ changedPackagesNames.slice(i, Math.min(i + chunkSize,
changedPackagesNames.length))
);
}
@@ -215,7 +215,7 @@ async function getPartitions(): Promise<Array<None | Full |
Partial>> {
}
const changedSourcePathsInPartition = changedPackagesDirs.filter((path)
=>
- [...partition.dirs].some((partitionDir) =>
path.startsWith(`${partitionDir}`))
+ [...partition.dirs].some((partitionDir) => path === partitionDir)
);
if (changedSourcePathsInPartition.length === 0) {
@@ -268,6 +268,9 @@ async function getPartitions(): Promise<Array<None | Full |
Partial>> {
}
async function getDirsOfDependencies(leafPackageNames: Set<string>) {
+ if (leafPackageNames.size === 0) {
+ return new Set<string>();
+ }
const packagesFilter = [...leafPackageNames].map((pkgName) => `-F
${pkgName}...`).join(" ");
return new Set(
stdoutArray(execSync(`bash -c "pnpm ${packagesFilter} exec bash -c
pwd"`).toString()) //
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]