Skip to content

Commit bef5dc6

Browse files
committed
Merge remote-tracking branch 'origin/candidate-10.0.x' into candidate-10.2.x
2 parents 04ac140 + 77bf803 commit bef5dc6

24 files changed

Lines changed: 284 additions & 59 deletions
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: "Download ECL Watch Nightly"
2+
description: "Download the latest non-expired ECL Watch nightly artifact into a package build tree."
3+
4+
inputs:
5+
destination:
6+
description: "Destination directory for the downloaded nightly dist files."
7+
required: true
8+
artifact-name:
9+
description: "Name of the ECL Watch nightly artifact."
10+
required: false
11+
default: eclwatch-nightly
12+
13+
runs:
14+
using: "composite"
15+
steps:
16+
- name: Locate latest ECL Watch nightly
17+
id: nightly
18+
uses: actions/github-script@v8
19+
env:
20+
NIGHTLY_ARTIFACT_NAME: ${{ inputs.artifact-name }}
21+
NIGHTLY_DESTINATION: ${{ inputs.destination }}
22+
with:
23+
github-token: ${{ github.token }}
24+
script: |
25+
const fs = require("fs");
26+
27+
const artifactName = process.env.NIGHTLY_ARTIFACT_NAME;
28+
const destination = process.env.NIGHTLY_DESTINATION;
29+
const [owner, repo] = context.repo.owner && context.repo.repo
30+
? [context.repo.owner, context.repo.repo]
31+
: "${{ github.repository }}".split("/");
32+
33+
fs.rmSync(destination, { recursive: true, force: true });
34+
fs.mkdirSync(destination, { recursive: true });
35+
36+
const artifacts = await github.paginate(github.rest.actions.listArtifactsForRepo, {
37+
owner,
38+
repo,
39+
name: artifactName,
40+
per_page: 100
41+
});
42+
43+
const artifact = artifacts
44+
.filter(item => !item.expired && item.workflow_run?.id)
45+
.sort((left, right) => Date.parse(right.created_at) - Date.parse(left.created_at))[0];
46+
47+
if (!artifact) {
48+
core.setFailed(`Unable to find a non-expired ${artifactName} artifact in ${owner}/${repo}.`);
49+
return;
50+
}
51+
52+
core.info(`Using ${artifactName} artifact ${artifact.id} from run ${artifact.workflow_run.id}, created ${artifact.created_at}.`);
53+
core.setOutput("run-id", String(artifact.workflow_run.id));
54+
55+
- name: Download latest ECL Watch nightly
56+
uses: actions/download-artifact@v8
57+
with:
58+
name: ${{ inputs.artifact-name }}
59+
path: ${{ inputs.destination }}
60+
repository: ${{ github.repository }}
61+
run-id: ${{ steps.nightly.outputs.run-id }}
62+
github-token: ${{ github.token }}

.github/workflows/build-docker-community.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ on:
6565

6666
permissions:
6767
contents: write
68+
actions: read
6869

6970
jobs:
7071
build:
@@ -140,6 +141,12 @@ jobs:
140141
- name: Print Vars
141142
run: echo "${{ toJson(steps.vars.outputs)}}"
142143

144+
- name: Download ECL Watch Nightly
145+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
146+
uses: ./HPCC-Platform/.github/actions/download-eclwatch-nightly
147+
with:
148+
destination: ${{ steps.vars.outputs.folder_build }}/esp/src/build/dist-nightly
149+
143150
- name: Set up Docker Buildx
144151
id: buildx
145152
uses: docker/setup-buildx-action@v4

.github/workflows/build-docker-enterprise.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ on:
5555

5656
permissions:
5757
contents: read
58+
actions: read
5859

5960
jobs:
6061
build:
@@ -130,6 +131,12 @@ jobs:
130131
- name: Print Vars
131132
run: echo "${{ toJson(steps.vars.outputs)}}"
132133

134+
- name: Download ECL Watch Nightly
135+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
136+
uses: ./HPCC-Platform/.github/actions/download-eclwatch-nightly
137+
with:
138+
destination: ${{ steps.vars.outputs.folder_build }}/esp/src/build/dist-nightly
139+
133140
- name: Checkout LN
134141
uses: actions/checkout@v6
135142
with:

.github/workflows/build-docker-internal.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ on:
5555

5656
permissions:
5757
contents: read
58+
actions: read
5859

5960
jobs:
6061
build:
@@ -130,6 +131,12 @@ jobs:
130131
- name: Print Vars
131132
run: echo "${{ toJson(steps.vars.outputs)}}"
132133

134+
- name: Download ECL Watch Nightly
135+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
136+
uses: ./HPCC-Platform/.github/actions/download-eclwatch-nightly
137+
with:
138+
destination: ${{ steps.vars.outputs.folder_build }}/esp/src/build/dist-nightly
139+
133140
- name: Checkout LN
134141
uses: actions/checkout@v6
135142
with:

.github/workflows/build-docker.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ on:
6969

7070
permissions:
7171
contents: read
72+
actions: read
7273

7374
jobs:
7475

@@ -129,6 +130,12 @@ jobs:
129130
run: |
130131
echo "${{ toJSON(steps.vars.outputs) }}"
131132
133+
- name: Download ECL Watch Nightly
134+
if: ${{ startsWith(github.ref, 'refs/tags/') && inputs.upload-package == true }}
135+
uses: ./HPCC-Platform/.github/actions/download-eclwatch-nightly
136+
with:
137+
destination: ${{ github.workspace }}/build/esp/src/build/dist-nightly
138+
132139
- name: Set up Docker Buildx
133140
id: buildx
134141
uses: docker/setup-buildx-action@v4

.github/workflows/build-eclwatch.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,40 +14,34 @@ jobs:
1414
build:
1515
name: "Build eclwatch"
1616
runs-on: ubuntu-latest
17-
strategy:
18-
matrix:
19-
node: ["24", "22"]
20-
fail-fast: false
2117

2218
steps:
23-
- name: Free additional disk space (remove Android SDK + Tools)
24-
run: |
25-
sudo rm -rf /usr/local/lib/android
19+
2620
- uses: actions/checkout@v6
2721
with:
2822
submodules: "recursive"
2923

3024
- uses: actions/setup-node@v6
3125
with:
32-
node-version: ${{ matrix.node }}
26+
node-version: 24
27+
cache: 'npm'
28+
cache-dependency-path: ${{ github.workspace }}/esp/src/package-lock.json
3329

3430
- name: Install Dependencies
3531
working-directory: ${{ github.workspace }}/esp/src
3632
run: npm ci
3733

38-
- name: Lint
39-
working-directory: ${{ github.workspace }}/esp/src
40-
run: npm run lint
41-
4234
- name: Build
4335
working-directory: ${{ github.workspace }}/esp/src
36+
env:
37+
ECLWATCH_DIST_URL: /esp/files/dist-nightly/
4438
run: npm run build
4539

4640
- name: Upload Package
47-
if: ${{ matrix.node == '22' && inputs.asset-name}}
41+
if: ${{ inputs.asset-name }}
4842
uses: actions/upload-artifact@v7
4943
with:
5044
name: ${{ inputs.asset-name }}
5145
path: |
52-
${{ github.workspace }}/esp/src/build/**/*
46+
${{ github.workspace }}/esp/src/build/dist/**/*
5347
if-no-files-found: error

.github/workflows/build-gh_runner.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ on:
6868

6969
permissions:
7070
contents: read
71+
actions: read
7172
packages: read
7273

7374
jobs:
@@ -185,6 +186,12 @@ jobs:
185186
run: |
186187
echo "${{ toJSON(steps.vars.outputs) }}"
187188
189+
- name: Download ECL Watch Nightly
190+
if: ${{ startsWith(github.ref, 'refs/tags/') && inputs.upload-package == true }}
191+
uses: ./HPCC-Platform/.github/actions/download-eclwatch-nightly
192+
with:
193+
destination: ${{ github.workspace }}/build/esp/src/build/dist-nightly
194+
188195
- uses: actions/cache@v5
189196
id: cache
190197
with:

.github/workflows/build-vcpkg.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,3 +356,9 @@ jobs:
356356
cmake-configuration-ex: '-DCMAKE_OSX_ARCHITECTURES=arm64 -DUSE_CPPUNIT=OFF -DCLIENTTOOLS_ONLY=ON -DINCLUDE_PLUGINS=OFF -DUSE_AZURE=OFF -DUSE_CASSANDRA=OFF -DSUPPRESS_CASSANDRAEMBED=ON -DUSE_JAVA=OFF -DUSE_OPENLDAP=OFF'
357357
secrets: inherit
358358

359+
build-build-eclwatch:
360+
if: ${{ github.event_name == 'schedule' }}
361+
uses: ./.github/workflows/build-eclwatch.yml
362+
with:
363+
asset-name: 'eclwatch-nightly'
364+
secrets: inherit

.github/workflows/test-regression-suite-k8s.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616

1717
permissions:
1818
contents: read
19+
actions: read
1920

2021
jobs:
2122
build-docker:

ecl/hthor/hthorkey.cpp

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ class CHThorIndexReadActivityBase : public CHThorActivityBase
234234
private:
235235
bool firstMultiPart();
236236
bool nextMultiPart();
237+
size32_t getPartBlockedIOSize(IDistributedFilePart &part) const;
237238
bool setCurrentPart(unsigned whichPart);
238239
void clearTlk() { tlk.clear(); tlManager.clear(); }
239240
void openTlk();
@@ -274,6 +275,7 @@ class CHThorIndexReadActivityBase : public CHThorActivityBase
274275
bool singlePart = false; // a single part index, not part of a super file - optimize so never reload the part.
275276
bool localSortKey = false;
276277
bool initializedFileInfo = false;
278+
size32_t foreignBlockedIOSize = (size32_t)-1;
277279

278280
//for layout translation
279281
Owned<const IDynamicTransform> layoutTrans;
@@ -330,6 +332,9 @@ void CHThorIndexReadActivityBase::resolveIndexFilename()
330332
{
331333
// A logical filename for the key should refer to a single physical file - either the TLK or a monolithic key
332334
OwnedRoxieString lfn(helper.getFileName());
335+
CDfsLogicalFileName dlfn;
336+
dlfn.set(lfn);
337+
foreignBlockedIOSize = dlfn.isForeign() ? getForeignBlockedIOSize(helper.hasSegmentMonitors()) : (size32_t)-1;
333338
Owned<ILocalOrDistributedFile> ldFile = resolveLFNIndex(agent, lfn, "IndexRead", 0 != (helper.getFlags() & TIRoptional),true, AccessMode::tbdRead, defaultPrivilegedUser);
334339
df.set(ldFile ? ldFile->queryDistributedFile() : NULL);
335340
if (!df)
@@ -452,7 +457,8 @@ bool CHThorIndexReadActivityBase::doPreopenLimitFile(unsigned __int64 & count, u
452457
IKeyIndex * CHThorIndexReadActivityBase::doPreopenLimitPart(unsigned __int64 & result, unsigned __int64 limit, unsigned part)
453458
{
454459
Owned<IKeyIndex> kidx;
455-
kidx.setown(openKeyFile(df->queryPart(part)));
460+
IDistributedFilePart & filePart = df->queryPart(part);
461+
kidx.setown(openKeyFile(filePart, getPartBlockedIOSize(filePart)));
456462
if(df->numParts() == 1)
457463
verifyIndex(kidx);
458464
if (limit != (unsigned) -1)
@@ -573,17 +579,20 @@ void CHThorIndexReadActivityBase::killPart()
573579
klManager.clear();
574580
}
575581

582+
size32_t CHThorIndexReadActivityBase::getPartBlockedIOSize(IDistributedFilePart &part) const
583+
{
584+
if (foreignBlockedIOSize != (size32_t)-1)
585+
return foreignBlockedIOSize;
586+
587+
StringBuffer planeName;
588+
df->getClusterName(part.copyClusterNum(0), planeName);
589+
return getIndexBlockedIOSize(planeName, helper.hasSegmentMonitors());
590+
}
591+
576592
bool CHThorIndexReadActivityBase::setCurrentPart(unsigned whichPart)
577593
{
578594
IDistributedFilePart &part = df->queryPart(whichPart);
579-
size32_t blockedSize = 0;
580-
if (!helper.hasSegmentMonitors()) // unfiltered
581-
{
582-
StringBuffer planeName;
583-
df->getClusterName(part.copyClusterNum(0), planeName);
584-
blockedSize = getBlockedFileIOSize(planeName);
585-
}
586-
keyIndex.setown(openKeyFile(part, blockedSize));
595+
keyIndex.setown(openKeyFile(part, getPartBlockedIOSize(part)));
587596
if(df->numParts() == 1)
588597
verifyIndex(keyIndex);
589598
initPart();

0 commit comments

Comments
 (0)