Skip to content

Commit 12ccdc8

Browse files
committed
Fix inner_type
1 parent ab03ce5 commit 12ccdc8

8 files changed

Lines changed: 20 additions & 21 deletions

File tree

apps/runner/images/csharp/Containerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ RUN groupadd -r runneruser \
3434
# Switch to non-root BEFORE restore so any generated dirs are owned correctly
3535
USER runneruser
3636

37-
# Create Directory.Build.props inside the image so obj/bin go to /tmp (always writable)
37+
# Create Directory.Build.props inside the image so obj/bin stay in project-local paths
3838
RUN cat > Directory.Build.props <<'EOF'
3939
<Project>
4040
<PropertyGroup>
41-
<BaseIntermediateOutputPath>/tmp/obj/</BaseIntermediateOutputPath>
42-
<IntermediateOutputPath>/tmp/obj/</IntermediateOutputPath>
43-
<BaseOutputPath>/tmp/bin/</BaseOutputPath>
41+
<BaseIntermediateOutputPath>obj/</BaseIntermediateOutputPath>
42+
<IntermediateOutputPath>obj/</IntermediateOutputPath>
43+
<BaseOutputPath>bin/</BaseOutputPath>
4444
</PropertyGroup>
4545
</Project>
4646
EOF
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<PropertyGroup>
3-
<BaseIntermediateOutputPath>/tmp/obj/</BaseIntermediateOutputPath>
4-
<IntermediateOutputPath>/tmp/obj/</IntermediateOutputPath>
5-
<BaseOutputPath>/tmp/bin/</BaseOutputPath>
3+
<BaseIntermediateOutputPath>obj/</BaseIntermediateOutputPath>
4+
<IntermediateOutputPath>obj/</IntermediateOutputPath>
5+
<BaseOutputPath>bin/</BaseOutputPath>
66
</PropertyGroup>
77
</Project>

apps/runner/images/csharp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DOTNET_FLAGS = --nologo -p:BaseIntermediateOutputPath=/tmp/obj/ -p:BaseOutputPath=/tmp/bin/
1+
DOTNET_FLAGS = --nologo -p:BaseIntermediateOutputPath=obj/ -p:BaseOutputPath=bin/
22

33
test-runtime:
44
dotnet run $(DOTNET_FLAGS)

apps/runner/images/rust/Containerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ FROM --platform=$TARGETPLATFORM rust:${RUST_TAG}
77

88
RUN apk add --no-cache make libc-dev
99

10+
ENV CARGO_HOME=/tmp/cargo-home \
11+
CARGO_TARGET_DIR=/tmp/cargo-target
12+
13+
RUN mkdir -p /tmp/cargo-home /tmp/cargo-target \
14+
&& chmod -R 777 /tmp/cargo-home /tmp/cargo-target
15+
1016
RUN addgroup -S app -g 10001 \
1117
&& adduser -S -D -H -h /nonexistent -s /sbin/nologin -G app -u 10001 app
1218

apps/runner/images/rust/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
test:
2-
cargo run -q
2+
cargo run -q --offline --target-dir /tmp/cargo-target
33

44
.PHONY: test

apps/runner/lib/runner/checker_generator.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ defmodule Runner.CheckerGenerator do
118118
inner_type = TypesGenerator.call(nested, lang_meta)
119119

120120
if Enum.empty?(list) do
121-
checker_meta.type_templates.hash_empty
121+
EEx.eval_string(checker_meta.type_templates.hash_empty, inner_type: inner_type)
122122
else
123123
hash_entries =
124124
Enum.map_join(list, ", ", fn item -> get_hash_inners(item, signature, lang_meta) end)

k8s/app-chart/templates/zig_runner_deployment.yaml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ spec:
1818
metadata:
1919
labels:
2020
app: "runner-{{ .name }}"
21+
annotations:
22+
codebattle.io/rollout-revision: "{{ $.Release.Revision }}"
2123
spec:
2224
{{- if or (eq $.Values.zigRunners.strategy "robust") (eq $.Values.zigRunners.strategy "hard") }}
2325
nodeSelector:
@@ -65,19 +67,9 @@ spec:
6567
env:
6668
- name: DEBUG
6769
value: {{ $.Values.zigRunners.env.DEBUG | quote }}
68-
{{- if eq .name "csharp" }}
69-
- name: HOME
70-
value: /tmp
71-
- name: DOTNET_CLI_HOME
72-
value: /tmp
73-
- name: NUGET_PACKAGES
74-
value: /tmp/.nuget/packages
75-
- name: NUGET_HTTP_CACHE_PATH
76-
value: /tmp/.nuget/http-cache
77-
{{- end }}
7870
resources:
7971
{{- toYaml $.Values.zigRunners.resources | nindent 12 }}
80-
imagePullPolicy: Always
72+
imagePullPolicy: {{ $.Values.zigRunners.imagePullPolicy | default "Always" }}
8173
image: "{{ .image }}"
8274
readinessProbe:
8375
httpGet:

k8s/app-chart/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ nginx:
114114

115115
zigRunners:
116116
enabled: false
117+
imagePullPolicy: Always
117118
strategy: simple # simple | robust
118119
avoidCodebattleNode: false
119120
appNodeSelector:

0 commit comments

Comments
 (0)