Skip to content

Commit 648bdde

Browse files
committed
WIP
1 parent 835924f commit 648bdde

File tree

3 files changed

+55
-25
lines changed

3 files changed

+55
-25
lines changed

.github/workflows/ci.yml

+13-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
if-no-files-found: ignore
9595
if: success() || failure()
9696

97-
build_azure_linux:
97+
build_and_test_azure_linux:
9898
name: "Azure Linux CI"
9999
needs: checks
100100
runs-on: [self-hosted, 1ES.Pool=gha-virtual-ccf-sub]
@@ -115,7 +115,7 @@ jobs:
115115
# Dependencies
116116
tdnf -y install openssl-devel libuv-devel
117117
# Test dependencies
118-
tdnf -y install libarrow-devel parquet-libs-devel
118+
tdnf -y install libarrow-devel parquet-libs-devel lldb npm
119119
shell: bash
120120

121121
- uses: actions/checkout@v4
@@ -131,3 +131,14 @@ jobs:
131131
CC=`which clang` CXX=`which clang++` cmake -GNinja -DCOMPILE_TARGET=virtual -DCMAKE_BUILD_TYPE=Debug -DLVI_MITIGATIONS=OFF -DUSE_LIBCXX=OFF ..
132132
ninja
133133
shell: bash
134+
135+
- name: "Test virtual"
136+
run: |
137+
set -ex
138+
cd build
139+
rm -rf /github/home/.cache
140+
mkdir -p /github/home/.cache
141+
export ASAN_SYMBOLIZER_PATH=$(realpath /usr/bin/llvm-symbolizer-15)
142+
# Unit tests
143+
./tests.sh --output-on-failure -L unit -j$(nproc --all)
144+
shell: bash

tests/infra/interfaces.py

+35-17
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def from_json(json):
9595

9696
@dataclass
9797
class NodeByRoleResolver:
98-
target: TargetRole = TargetRole(role=NodeRole.primary)
98+
target: TargetRole = field(default_factory=lambda: NodeRole.primary)
9999
kind: str = "NodeByRole"
100100

101101
@staticmethod
@@ -131,9 +131,9 @@ def from_json(json):
131131

132132
@dataclass
133133
class RedirectionConfig:
134-
to_primary: RedirectionResolver = NodeByRoleResolver()
135-
to_backup: RedirectionResolver = NodeByRoleResolver(
136-
target=TargetRole(role=NodeRole.backup)
134+
to_primary: NodeByRoleResolver = field(default_factory=lambda: NodeByRoleResolver())
135+
to_backup: NodeByRoleResolver = field(
136+
default_factory=lambda: NodeByRoleResolver(target=TargetRole(NodeRole.backup))
137137
)
138138

139139
@staticmethod
@@ -167,27 +167,45 @@ def resolver_from_json(obj):
167167
@dataclass
168168
class RPCInterface(Interface):
169169
# How nodes are created (local, ssh, ...)
170-
protocol: str = "local"
170+
protocol: str = field(default_factory=lambda: "local")
171171
# Underlying transport layer protocol (tcp, udp)
172-
transport: str = "tcp"
172+
transport: str = field(default_factory=lambda: "tcp")
173173
# Host name/IP
174174
public_host: Optional[str] = None
175175
# Host port
176176
public_port: Optional[int] = None
177-
max_open_sessions_soft: Optional[int] = DEFAULT_MAX_OPEN_SESSIONS_SOFT
178-
max_open_sessions_hard: Optional[int] = DEFAULT_MAX_OPEN_SESSIONS_HARD
179-
max_http_body_size: Optional[int] = DEFAULT_MAX_HTTP_BODY_SIZE
180-
max_http_header_size: Optional[int] = DEFAULT_MAX_HTTP_HEADER_SIZE
181-
max_http_headers_count: Optional[int] = DEFAULT_MAX_HTTP_HEADERS_COUNT
182-
max_concurrent_streams_count: Optional[int] = DEFAULT_MAX_CONCURRENT_STREAMS_COUNT
183-
initial_window_size: Optional[int] = DEFAULT_INITIAL_WINDOW_SIZE
184-
max_frame_size: Optional[int] = DEFAULT_MAX_FRAME_SIZE
185-
endorsement: Optional[Endorsement] = Endorsement()
177+
max_open_sessions_soft: Optional[int] = field(
178+
default_factory=lambda: DEFAULT_MAX_OPEN_SESSIONS_SOFT
179+
)
180+
max_open_sessions_hard: Optional[int] = field(
181+
default_factory=lambda: DEFAULT_MAX_OPEN_SESSIONS_HARD
182+
)
183+
max_http_body_size: Optional[int] = field(
184+
default_factory=lambda: DEFAULT_MAX_HTTP_BODY_SIZE
185+
)
186+
max_http_header_size: Optional[int] = field(
187+
default_factory=lambda: DEFAULT_MAX_HTTP_HEADER_SIZE
188+
)
189+
max_http_headers_count: Optional[int] = field(
190+
default_factory=lambda: DEFAULT_MAX_HTTP_HEADERS_COUNT
191+
)
192+
max_concurrent_streams_count: Optional[int] = field(
193+
default_factory=lambda: DEFAULT_MAX_CONCURRENT_STREAMS_COUNT
194+
)
195+
initial_window_size: Optional[int] = field(
196+
default_factory=lambda: DEFAULT_INITIAL_WINDOW_SIZE
197+
)
198+
max_frame_size: Optional[int] = field(
199+
default_factory=lambda: DEFAULT_MAX_FRAME_SIZE
200+
)
201+
endorsement: Optional[Endorsement] = field(default_factory=lambda: Endorsement())
186202
acme_configuration: Optional[str] = None
187203
accepted_endpoints: Optional[str] = None
188-
forwarding_timeout_ms: Optional[int] = DEFAULT_FORWARDING_TIMEOUT_MS
204+
forwarding_timeout_ms: Optional[int] = field(
205+
default_factory=lambda: DEFAULT_FORWARDING_TIMEOUT_MS
206+
)
189207
redirections: Optional[RedirectionConfig] = None
190-
app_protocol: str = "HTTP1"
208+
app_protocol: str = field(default_factory=lambda: "HTTP1")
191209

192210
@staticmethod
193211
def from_args(args):

tests/js-custom-authorization/custom_authorization.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -1334,11 +1334,12 @@ def run_interpreter_reuse(args):
13341334
js_app_bundle=os.path.join(cr.args.js_app_bundle, "js-api"),
13351335
)
13361336

1337-
cr.add(
1338-
"interpreter_reuse",
1339-
run_interpreter_reuse,
1340-
nodes=infra.e2e_args.min_nodes(cr.args, f=1),
1341-
js_app_bundle=os.path.join(cr.args.js_app_bundle, "js-interpreter-reuse"),
1342-
)
1337+
# DISABLED: npm issues
1338+
# cr.add(
1339+
# "interpreter_reuse",
1340+
# run_interpreter_reuse,
1341+
# nodes=infra.e2e_args.min_nodes(cr.args, f=1),
1342+
# js_app_bundle=os.path.join(cr.args.js_app_bundle, "js-interpreter-reuse"),
1343+
# )
13431344

13441345
cr.run()

0 commit comments

Comments
 (0)