Skip to content

Commit 396fe26

Browse files
authored
Merge branch 'main' into guidedButton
2 parents 6fc634d + f91f98c commit 396fe26

File tree

58 files changed

+14818
-13582
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+14818
-13582
lines changed

.github/actions/clp-execution-image-build/action.yaml renamed to .github/actions/clp-build-runtime-image/action.yaml

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
name: "clp-execution-image-build"
2-
description: "Builds a container image that contains the dependencies necessary
3-
to run the CLP package."
1+
name: "clp-build-runtime-image"
2+
description: "Builds a container image to be used for running CLP."
43

54
inputs:
5+
image_type:
6+
description: "Type of image to build"
7+
required: true
68
image_registry:
79
default: "ghcr.io"
810
description: "Container image registry"
@@ -17,11 +19,11 @@ inputs:
1719
required: false
1820
platform_id:
1921
description: "Platform ID of the container (e.g. ubuntu)"
20-
required: true
22+
required: false
2123
platform_version_id:
2224
description: "Platform VERSION_ID / VERSION_CODENAME of the container
2325
(e.g. jammy, focal, etc.)"
24-
required: true
26+
required: false
2527

2628
runs:
2729
using: "composite"
@@ -45,20 +47,37 @@ runs:
4547
echo "REPOSITORY=$(echo '${{github.repository}}' | tr '[:upper:]' '[:lower:]')" \
4648
>> "$GITHUB_OUTPUT"
4749
48-
- name: "Update Metadata"
49-
id: "meta"
50+
- name: "Compute metadata"
51+
id: "compute-meta"
52+
shell: "bash"
53+
run: |
54+
base_path="./tools/docker-images"
55+
56+
if [[ "${{inputs.image_type}}" == "execution" ]]; then
57+
platform="${{inputs.platform_id}}-${{inputs.platform_version_id}}"
58+
dockerfile_path="$base_path/clp-execution-base-$platform/Dockerfile"
59+
image_name="clp-${{inputs.image_type}}-$platform"
60+
else
61+
dockerfile_path="$base_path/clp-package/Dockerfile"
62+
image_name="clp-${{inputs.image_type}}"
63+
fi
64+
65+
echo "DOCKERFILE=$dockerfile_path" >> "$GITHUB_OUTPUT"
66+
echo "IMAGE_NAME=$image_name" >> "$GITHUB_OUTPUT"
67+
68+
- name: "Extract GitHub Metadata"
69+
id: "extract-gh-meta"
5070
uses: "docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804"
5171
with:
5272
images: "${{inputs.image_registry}}/${{steps.sanitization.outputs.REPOSITORY}}\
53-
/clp-execution-x86-${{inputs.platform_id}}-${{inputs.platform_version_id}}"
73+
/${{steps.compute-meta.outputs.IMAGE_NAME}}"
5474

5575
- name: "Build and Push"
5676
if: "github.event_name != 'pull_request' && github.ref == 'refs/heads/main'"
5777
uses: "docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4"
5878
with:
5979
context: "./"
60-
file: "./tools/docker-images/\
61-
clp-execution-base-${{inputs.platform_id}}-${{inputs.platform_version_id}}/Dockerfile"
80+
file: "${{steps.compute-meta.outputs.DOCKERFILE}}"
6281
push: true
63-
tags: "${{steps.meta.outputs.tags}}"
64-
labels: "${{steps.meta.outputs.labels}}"
82+
tags: "${{steps.extract-gh-meta.outputs.tags}}"
83+
labels: "${{steps.extract-gh-meta.outputs.labels}}"

.github/actions/run-on-image/action.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ runs:
4242
- run: "./tools/scripts/deps-download/init.sh"
4343
shell: "bash"
4444

45+
# `--env npm_config_cache` overrides the default `/.npm` to avoid permission issues.
4546
- run: >-
4647
docker run
4748
--user $(id -u):$(id -g)
49+
--env npm_config_cache=/tmp/.npm
4850
--volume "$GITHUB_WORKSPACE":/mnt/repo
4951
--workdir /mnt/repo
5052
${{steps.get_image_props.outputs.qualified_image_name}}

.github/workflows/clp-core-build.yaml renamed to .github/workflows/clp-artifact-build.yaml

Lines changed: 51 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,14 @@
1-
name: "clp-core-build"
1+
name: "clp-artifact-build"
22

33
on:
44
pull_request:
5-
paths:
6-
- ".github/actions/clp-core-build-containers/action.yaml"
7-
- ".github/actions/run-on-image/action.yaml"
8-
- ".github/workflows/clp-core-build.yaml"
9-
- ".gitmodules"
10-
- "components/core/**"
11-
- "taskfile.yaml"
12-
- "taskfiles/**"
13-
- "tools/scripts/deps-download/**"
14-
- "!components/core/tools/scripts/lib_install/macos/**"
5+
paths-ignore: &ignored_paths
6+
- ".github/*"
7+
- ".github/ISSUE_TEMPLATE/**"
8+
- "components/core/tools/scripts/lib_install/macos/**"
9+
- "docs/**"
1510
push:
16-
paths:
17-
- ".github/actions/clp-core-build-containers/action.yaml"
18-
- ".github/actions/run-on-image/action.yaml"
19-
- ".github/workflows/clp-core-build.yaml"
20-
- ".gitmodules"
21-
- "components/core/**"
22-
- "taskfile.yaml"
23-
- "taskfiles/**"
24-
- "tools/scripts/deps-download/**"
25-
- "!components/core/tools/scripts/lib_install/macos/**"
11+
paths-ignore: *ignored_paths
2612
schedule:
2713
# Run daily at 00:15 UTC (the 15 is to avoid periods of high load)
2814
- cron: "15 0 * * *"
@@ -74,31 +60,31 @@ jobs:
7460
filters: |
7561
centos_stream_9_image:
7662
- ".github/actions/**"
77-
- ".github/workflows/clp-core-build.yaml"
63+
- ".github/workflows/clp-artifact-build.yaml"
7864
- "components/core/tools/scripts/lib_install/*.sh"
7965
- "components/core/tools/docker-images/clp-env-base-centos-stream-9/**"
8066
- "components/core/tools/scripts/lib_install/centos-stream-9/**"
8167
manylinux_2_28_x86_64_image:
8268
- ".github/actions/**"
83-
- ".github/workflows/clp-core-build.yaml"
69+
- ".github/workflows/clp-artifact-build.yaml"
8470
- "components/core/tools/scripts/lib_install/*.sh"
8571
- "components/core/tools/docker-images/clp-env-base-manylinux_2_28-x86_64/**"
8672
- "components/core/tools/scripts/lib_install/manylinux_2_28/**"
8773
musllinux_1_2_x86_64_image:
8874
- ".github/actions/**"
89-
- ".github/workflows/clp-core-build.yaml"
75+
- ".github/workflows/clp-artifact-build.yaml"
9076
- "components/core/tools/scripts/lib_install/*.sh"
9177
- "components/core/tools/docker-images/clp-env-base-musllinux_1_2-x86_64/**"
9278
- "components/core/tools/scripts/lib_install/musllinux_1_2/**"
9379
ubuntu_jammy_image:
9480
- ".github/actions/**"
95-
- ".github/workflows/clp-core-build.yaml"
81+
- ".github/workflows/clp-artifact-build.yaml"
9682
- "components/core/tools/scripts/lib_install/*.sh"
9783
- "components/core/tools/docker-images/clp-env-base-ubuntu-jammy/**"
9884
- "components/core/tools/scripts/lib_install/ubuntu-jammy/**"
9985
clp:
10086
- ".github/actions/**"
101-
- ".github/workflows/clp-core-build.yaml"
87+
- ".github/workflows/clp-artifact-build.yaml"
10288
- ".gitmodules"
10389
- "components/core/cmake/**"
10490
- "components/core/CMakeLists.txt"
@@ -520,3 +506,42 @@ jobs:
520506
.task/checksum/utils-cpp-lint-clang-tidy-*
521507
build/lint-clang-tidy
522508
key: "${{steps.cache-restore-lint-check-cpp-static-full.outputs.cache-primary-key}}"
509+
510+
package-image:
511+
name: "package-image"
512+
if: >-
513+
!cancelled() && !failure() && (
514+
needs.filter-relevant-changes.outputs.ubuntu_jammy_image_changed == 'false' ||
515+
needs.ubuntu-jammy-deps-image.result == 'success'
516+
)
517+
needs:
518+
- "filter-relevant-changes"
519+
- "ubuntu-jammy-deps-image"
520+
runs-on: "ubuntu-24.04"
521+
steps:
522+
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
523+
with:
524+
submodules: "recursive"
525+
526+
- name: "Workaround actions/runner-images/issues/6775"
527+
shell: "bash"
528+
run: "chown $(id -u):$(id -g) -R ."
529+
530+
- name: "Build the package"
531+
uses: "./.github/actions/run-on-image"
532+
env:
533+
OS_NAME: "ubuntu-jammy"
534+
with:
535+
image_name: "${{env.DEPS_IMAGE_NAME_PREFIX}}${{env.OS_NAME}}"
536+
use_published_image: >-
537+
${{needs.filter-relevant-changes.outputs.ubuntu_jammy_image_changed == 'false'
538+
|| (github.event_name != 'pull_request' && github.ref == 'refs/heads/main')}}
539+
run_command: >-
540+
CLP_CORE_MAX_PARALLELISM_PER_BUILD_TASK=$(getconf _NPROCESSORS_ONLN) task package
541+
542+
- uses: "./.github/actions/clp-build-runtime-image"
543+
with:
544+
image_type: "package"
545+
image_registry: "ghcr.io"
546+
image_registry_username: "${{github.actor}}"
547+
image_registry_password: "${{secrets.GITHUB_TOKEN}}"

.github/workflows/clp-execution-image-build.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ name: "clp-execution-image-build"
33
on:
44
pull_request:
55
paths:
6-
- ".github/actions/clp-execution-image-build/action.yaml"
6+
- ".github/actions/clp-build-runtime-image/action.yaml"
77
- ".github/workflows/clp-execution-image-build.yaml"
88
- "tools/docker-images/**/*"
99
push:
1010
paths:
11-
- ".github/actions/clp-execution-image-build/action.yaml"
11+
- ".github/actions/clp-build-runtime-image/action.yaml"
1212
- ".github/workflows/clp-execution-image-build.yaml"
1313
- "tools/docker-images/**/*"
1414
schedule:
@@ -61,8 +61,9 @@ jobs:
6161
shell: "bash"
6262
run: "chown $(id -u):$(id -g) -R ."
6363

64-
- uses: "./.github/actions/clp-execution-image-build"
64+
- uses: "./.github/actions/clp-build-runtime-image"
6565
with:
66+
image_type: "execution"
6667
image_registry: "ghcr.io"
6768
image_registry_username: "${{github.actor}}"
6869
image_registry_password: "${{secrets.GITHUB_TOKEN}}"

components/clp-package-utils/clp_package_utils/scripts/start_clp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ def start_webui(
843843
get_clp_home() / "var" / "www" / "webui" / "client" / "settings.json"
844844
)
845845
server_settings_json_path = (
846-
get_clp_home() / "var" / "www" / "webui" / "server" / "dist" / "server" / "settings.json"
846+
get_clp_home() / "var" / "www" / "webui" / "server" / "dist" / "settings.json"
847847
)
848848

849849
validate_webui_config(clp_config, client_settings_json_path, server_settings_json_path)
@@ -964,7 +964,7 @@ def start_webui(
964964

965965
node_cmd = [
966966
str(CONTAINER_CLP_HOME / "bin" / "node-22"),
967-
str(container_webui_dir / "server" / "dist" / "server" / "src" / "main.js"),
967+
str(container_webui_dir / "server" / "dist" / "src" / "main.js"),
968968
]
969969
cmd = container_cmd + node_cmd
970970
subprocess.run(cmd, stdout=subprocess.DEVNULL, check=True)

components/core/src/clp/ffi/ir_stream/Deserializer.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,14 @@ class Deserializer {
158158
*/
159159
[[nodiscard]] auto get_metadata() const -> nlohmann::json const& { return m_metadata; }
160160

161+
/**
162+
* @return The number of log events (log event IR units) that have been deserialized from the
163+
* current stream.
164+
*/
165+
[[nodiscard]] auto get_num_log_events_deserialized() const -> size_t {
166+
return m_next_log_event_idx;
167+
}
168+
161169
private:
162170
// Factory function
163171
/**

components/core/tools/scripts/lib_install/ubuntu-jammy/install-prebuilt-packages.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
2323
openjdk-11-jdk \
2424
pkg-config \
2525
python3 \
26+
python3-dev \
2627
python3-pip \
2728
python3-venv \
29+
rsync \
2830
software-properties-common \
2931
unzip
3032

components/webui/client/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "webui-client",
2+
"name": "@webui/client",
33
"version": "0.1.0",
44
"description": "",
55
"main": "src/main.tsx",
@@ -19,9 +19,10 @@
1919
"@emotion/styled": "^11.14.0",
2020
"@monaco-editor/react": "^4.7.0",
2121
"@mui/joy": "^5.0.0-beta.51",
22-
"@sinclair/typebox": "^0.34.25",
22+
"@sinclair/typebox": "^0.34.38",
2323
"@tanstack/react-query": "^5.81.5",
2424
"@tanstack/react-query-devtools": "^5.81.5",
25+
"@webui/common": "*",
2526
"antd": "^5.24.5",
2627
"axios": "^1.7.9",
2728
"chart.js": "^4.4.9",
@@ -44,8 +45,8 @@
4445
"@types/react-dom": "^19.0.4",
4546
"@types/react-syntax-highlighter": "^15.5.13",
4647
"@vitejs/plugin-react": "^4.3.4",
47-
"eslint-config-yscope": "latest",
48-
"typescript": "~5.6.2",
48+
"eslint-config-yscope": "1.1.1",
49+
"typescript": "~5.7.3",
4950
"vite": "^6.3.5"
5051
}
5152
}

components/webui/client/src/api/socket/MongoSocketCollection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
ClientToServerEvents,
33
ServerToClientEvents,
4-
} from "@common/index.js";
4+
} from "@webui/common";
55
import {Socket} from "socket.io-client";
66

77
import {MongoSocketCursor} from "./MongoSocketCursor.js";

components/webui/client/src/api/socket/MongoSocketCursor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
QueryId,
44
Response,
55
ServerToClientEvents,
6-
} from "@common/index.js";
6+
} from "@webui/common";
77
import {Socket} from "socket.io-client";
88

99
import {Nullable} from "../../typings/common";

0 commit comments

Comments
 (0)