Skip to content

Commit 8a95ce8

Browse files
authored
Merge pull request #274 from buildingSMART/IVS-715-Maximum-recursion-depth-in-rule-execution
Schema val.: --recursion-limit 10000; skip over level=info messages
2 parents c85be6c + 4b4581e commit 8a95ce8

File tree

7 files changed

+11
-8
lines changed

7 files changed

+11
-8
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
source venv/bin/activate
101101
# use version of ifcopenshell with desired schema parsing
102102
# TODO: revert to pyPI when schema parsing is published in the future
103-
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.4-e8eb5e4-linux64.zip"
103+
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.5-1c5b825-linux64.zip"
104104
mkdir -p venv/lib/python3.11/site-packages
105105
unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip
106106

.github/workflows/ci_cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
source venv/bin/activate
102102
# use version of ifcopenshell with desired schema parsing
103103
# TODO: revert to pyPI when schema parsing is published in the future
104-
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.4-e8eb5e4-linux64.zip"
104+
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.5-1c5b825-linux64.zip"
105105
mkdir -p venv/lib/python3.11/site-packages
106106
unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip
107107

.github/workflows/playwright.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
105105
- name: Download and install ifcopenshell
106106
run: |
107-
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.4-e8eb5e4-linux64.zip"
107+
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.5-1c5b825-linux64.zip"
108108
mkdir -p .dev/venv/lib/python3.11/site-packages
109109
unzip -o -d .dev/venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip
110110
rm /tmp/ifcopenshell_python.zip

backend/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ venv:
1414
install: venv
1515
$(PIP) install --upgrade pip
1616
find . -name 'requirements.txt' -exec $(PIP) install -r {} \;
17-
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.4-e8eb5e4-linux64.zip"
17+
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.5-1c5b825-linux64.zip"
1818
mkdir -p $(VIRTUAL_ENV)/lib/python3.11/site-packages
1919
unzip -f -d $(VIRTUAL_ENV)/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip
2020
rm /tmp/ifcopenshell_python.zip
2121

2222
install-macos: venv
2323
find . -name 'requirements.txt' -exec $(PIP) install -r {} \;
2424
$(PIP) install -r requirements.txt
25-
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.4-e8eb5e4-macos64.zip"
25+
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.5-1c5b825-macos64.zip"
2626
mkdir -p $(VIRTUAL_ENV)/lib/python3.11/site-packages
2727
unzip /tmp/ifcopenshell_python.zip -d $(VIRTUAL_ENV)/lib/python3.11/site-packages
2828
rm /tmp/ifcopenshell_python.zip
2929

3030
install-macos-m1: venv
3131
find . -name 'requirements.txt' -exec $(PIP) install -r {} \;
3232
$(PIP) install -r requirements.txt
33-
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.4-e8eb5e4-macosm164.zip"
33+
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.5-1c5b825-macosm164.zip"
3434
mkdir -p $(VIRTUAL_ENV)/lib/python3.11/site-packages
3535
unzip /tmp/ifcopenshell_python.zip -d $(VIRTUAL_ENV)/lib/python3.11/site-packages
3636
rm /tmp/ifcopenshell_python.zip

backend/apps/ifc_validation/tasks/check_programs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def is_schema_error(line):
9393
def check_schema(context:TaskContext):
9494
proc = run_subprocess(
9595
task = context.task,
96-
command = [sys.executable, "-m", "ifcopenshell.validate", "--json", "--rules", "--fields", context.file_path ]
96+
command = [sys.executable, "-m", "ifcopenshell.validate", "--json", "--rules", "--fields", "--recursion-limit", "10000", context.file_path]
9797
)
9898
output = list(filter(is_schema_error, proc.stdout.split("\n")))
9999
success = proc.returncode >= 0

backend/apps/ifc_validation/tasks/processing/schema.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ def process_schema(context:TaskContext):
2626

2727
for line in output:
2828
message = json.loads(line)
29+
if message["level"] == "info":
30+
# This currently only happens due to caught RecursionErrors in rule executor
31+
continue
2932
outcome = ValidationOutcome(
3033
severity=ValidationOutcome.OutcomeSeverity.ERROR,
3134
outcome_code=ValidationOutcome.ValidationOutcomeCode.SCHEMA_ERROR,

docker/backend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ RUN --mount=type=cache,target=/root/.cache \
3737
find /app/backend -name 'requirements.txt' -exec pip install --no-cache-dir -r {} \; && \
3838
# use version of ifcopenshell with desired schema parsing
3939
# TODO: revert to pyPI when schema parsing is published in the future
40-
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.4-e8eb5e4-linux64.zip" && \
40+
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.5-1c5b825-linux64.zip" && \
4141
mkdir -p /opt/venv/lib/python3.11/site-packages && \
4242
unzip -d /opt/venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip && \
4343
# some cleanup

0 commit comments

Comments
 (0)