Skip to content

Refactor Build with conda#2980

Open
markovskipetar wants to merge 31 commits intomasterfrom
demo
Open

Refactor Build with conda#2980
markovskipetar wants to merge 31 commits intomasterfrom
demo

Conversation

@markovskipetar
Copy link
Copy Markdown
Collaborator

Reference Issues/PRs

What does this implement or fix?

Any other comments?

Checklist

Checklist for code changes...
  • Have you updated the relevant docstrings, documentation and copyright notice?
  • Is this contribution tested against all ArcticDB's features?
  • Do all exceptions introduced raise appropriate error messages?
  • Are API changes highlighted in the PR description?
  • Is the PR labelled as enhancement or bug so it appears in autogenerated release notes?

@github-actions
Copy link
Copy Markdown

Label error. Requires exactly 1 of: patch, minor, major. Found:

cd cpp/out/${{inputs.preset}}-build/
ctest --output-on-failure
env:
ARCTICDB_USING_CONDA: 1 No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing newline at end of file. This should be fixed — most linters and editors expect a trailing newline in text files.

Suggested change
ARCTICDB_USING_CONDA: 1
env:
ARCTICDB_USING_CONDA: 1

steps:
- uses: actions/checkout@v6.0.1

- name: Configure sccache
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shell: bash -l {0} default shell is set for all steps, but the Windows caller (win_64 with preset: windows-cl-conda-release) requires cmd /C call {0} for steps that interact with the MSVC-activated conda environment. The original cpp_tests_win_64 job used shell: cmd /C call {0} for the Configure, Build, and Run steps specifically, and also cleared CMAKE_GENERATOR_PLATFORM and CMAKE_GENERATOR_TOOLSET before calling cmake.

With the reusable workflow using a single bash -l default, the Windows job will fail at the CMake configure and build steps because the MSVC environment (set by micromamba's conda activation) is not compatible with a bash shell in the same way. The enabled: false guard currently prevents this from running, but it should be documented or fixed before enabled is set to true for Windows.

Consider either:

  1. Adding a shell input parameter so callers can override per-platform, or
  2. Documenting clearly that this reusable workflow is not yet suitable for Windows and should remain enabled: false until those differences are handled.

post-cleanup: 'none'

- name: Configure C++ Tests
run: |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The init-shell is hardcoded to bash for all platforms. The original Windows job used init-shell: bash cmd.exe to also initialise the cmd shell. Since this workflow is called for Windows (win_64) with enabled: false, this will be a problem once enabled. The init-shell value may need to be a parameterised input (e.g. init_shell: string) defaulting to bash, with the Windows caller passing bash cmd.exe.

if: |
always() &&
!cancelled() &&
inputs.enabled
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The if condition uses inputs.enabled (a boolean), but for workflow_call triggered reusable workflows, inputs.enabled evaluates as a string in some contexts. Using inputs.enabled == true is more explicit and safe:

Suggested change
inputs.enabled
if: |
always() &&
!cancelled() &&
inputs.enabled == true

# PYTHON_Conda_Tests ( TO DO !!! )
python_tests_linux_64:
name: Python Tests (linux_64) - ${{matrix.type}}
if: |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cpp_tests_osx_arm64 call omits the free_disk_space input, so it defaults to false. That is consistent with the original job (which also ran the free-disk-space step). However, the original macOS job did include the free-disk-space step. Please verify this omission is intentional — if macOS runners are also space-constrained, free_disk_space: true should be passed here.

ctest --output-on-failure
env:
ARCTICDB_USING_CONDA: 1
uses: ./.github/workflows/build_with_conda_cpp_tests.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Windows job is silently disabled via enabled: false. Consider adding a comment explaining why (the reusable workflow uses bash -l as default shell and lacks the cmd-shell steps and CMAKE_GENERATOR_PLATFORM/CMAKE_GENERATOR_TOOLSET overrides required for MSVC builds on Windows). This makes it easier for future contributors to know what must be resolved before enabling.

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Mar 19, 2026

test body

shell: cmd /C call {0}
run: |
set CMAKE_GENERATOR_PLATFORM=
set CMAKE_GENERATOR_TOOLSET=
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical bug: environment variables set via set in a separate step do not persist to subsequent steps in GitHub Actions.

set CMAKE_GENERATOR_PLATFORM= and set CMAKE_GENERATOR_TOOLSET= only affect the shell for the duration of this step. The next step ("Build ArcticDB with conda") will still see the conda-activated CMAKE_GENERATOR_PLATFORM/CMAKE_GENERATOR_TOOLSET values, causing the MSVC Ninja build to fail exactly as it did before.

To fix this, clear the variables within the same step that runs pip install:

Suggested change
set CMAKE_GENERATOR_TOOLSET=
set CMAKE_GENERATOR_PLATFORM=
set CMAKE_GENERATOR_TOOLSET=

And remove this separate step — instead merge the set commands into the top of the "Build ArcticDB with conda (Windows)" step. Or use $env:CMAKE_GENERATOR_PLATFORM = '' via PowerShell and write them to $GITHUB_ENV.

free_disk_space: true
install_mongodb: true
hypothesis_profile: ci_linux
run_cpp_tests: ${{inputs.run_cpp_tests || true}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: inputs.run_cpp_tests || true prevents users from ever disabling C++ tests.

In GitHub Actions expression language, false || true evaluates to true. So if a user triggers workflow_dispatch and sets run_cpp_tests: false, the expression ${{inputs.run_cpp_tests || true}} evaluates to true, and C++ tests will always run regardless.

The same applies to all four platform calls. Use the original guard logic or pass inputs.run_cpp_tests directly:

Suggested change
run_cpp_tests: ${{inputs.run_cpp_tests || true}}
run_cpp_tests: ${{inputs.run_cpp_tests}}

The reusable workflow already defaults run_cpp_tests to true, so omitting the || true still runs tests on push/pull_request events (where inputs is empty and the default kicks in).

env:
ARCTICDB_USING_CONDA: 1
COMMANDLINE: ${{inputs.run_commandline}}
CI_MONGO_HOST: ${{inputs.install_mongodb && 'mongodb' || ''}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: CI_MONGO_HOST: mongodb will not resolve without a Docker service container.

The original python_tests_linux_64 and python_tests_linux_aarch64 jobs used a Docker service container:

services:
  mongodb:
    image: mongo:4.4

This container made MongoDB reachable at the hostname mongodb (Docker's DNS). The new workflow removes the service container entirely and instead installs the MongoDB binary via the install_mongodb action or a manual curl. However, the install_mongodb action only copies the mongod binary to /usr/local/bin — it does not start a mongod daemon, and the hostname mongodb will not resolve without Docker networking.

As a result, tests requiring MongoDB will fail to connect. Options:

  1. Add a step to start mongod locally and set CI_MONGO_HOST: localhost.
  2. Restore the service container via a services: block (not directly possible in reusable workflow_call workflows without workarounds).
  3. Start mongod in the background as part of the install step and update CI_MONGO_HOST accordingly.

HYPOTHESIS_PROFILE: ${{inputs.hypothesis_profile}}
ARCTICDB_PYTEST_ARGS: ${{inputs.run_custom_pytest_command}}
STORAGE_TYPE: ${{inputs.persistent_storage == 'no' && 'LMDB' || inputs.persistent_storage}}
NODE_OPTIONS: --openssl-legacy-provider
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing newline at end of file.

Suggested change
NODE_OPTIONS: --openssl-legacy-provider
NODE_OPTIONS: --openssl-legacy-provider

ARCTICDB_PYTEST_ARGS: ${{ inputs.run_custom_pytest_command }}
NODE_OPTIONS: --openssl-legacy-provider
linux_64:
uses: ./.github/workflows/conda_build_and_test.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical bug: wrong filename — all 4 jobs will fail.

The reusable workflow is called conda_build_and_test.yml here, but the file added in this PR is .github/workflows/build_with_conda_and_test.yml. GitHub will error with "workflow not found" for every job.

Suggested change
uses: ./.github/workflows/conda_build_and_test.yml
uses: ./.github/workflows/build_with_conda_and_test.yml

)

- name: Archive build artifacts
uses: actions/upload-artifact
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical bug: incomplete actions/upload-artifact step — compile artifacts are never uploaded.

The step is missing the @version pin, with.name, and with.path. Without these, the step is not valid YAML-schema-wise and GitHub Actions will reject it. The downstream Download build artifacts steps depend on the artifact name build-${{inputs.platform}}, so this needs to match.

Suggested change
uses: actions/upload-artifact
- name: Archive build artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: build-${{inputs.platform}}
retention-days: 7
path: |
cpp/out/${{inputs.preset}}-build/
python/arcticdb_ext*
python/**/*.so
python/**/*.pyd

timeout_minutes: 10
max_attempts: 3
command: npm install -g azurite

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: broken sed regex — Windows drive-letter path conversion silently fails.

s|^$[A-Z]$:|/\1| does not capture the drive letter. $[A-Z] matches a literal $ followed by an uppercase letter, and \1 refers to a non-existent capture group. The original code in the monolithic workflow used \([A-Z]\) (BRE capture group):

Suggested change
npm_bin_dir=$(echo "$npm_bin_dir" | sed 's|^\([A-Z]\):|/\1|' | tr '[:upper:]' '[:lower:]' | sed 's|\\|/|g')

install_mongodb: {required: false, type: boolean, default: false, description: Install MongoDB for tests. Linux only}
run_cpp_tests: {required: false, type: boolean, default: true, description: Whether to run C++ tests}
cpp_tests_enabled: {required: false, type: boolean, default: true, description: Whether C++ tests are supported on this platform}
skip_lmdb_tests: {required: false, type: boolean, default: false, description: Skip LMDB tests. Windows only}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The skip_lmdb_tests input is declared here but is never actually read anywhere in the workflow. The Windows pytest step at line 410 unconditionally applies -m "not lmdb" regardless of this input's value, so the input has no effect. Either wire it up to conditionally apply the marker expression, or remove the unused input.

Suggested change
skip_lmdb_tests: {required: false, type: boolean, default: false, description: Skip LMDB tests. Windows only}
skip_lmdb_tests: {required: false, type: boolean, default: false, description: Skip LMDB tests. Windows only}

The pytest step should use:

-m "${{inputs.skip_lmdb_tests && 'not lmdb' || ''}}" \

# ==================== JOB 3: PYTHON TESTS ====================
python_tests:
name: Python Tests (${{inputs.platform}}) - ${{matrix.type}}
needs: [compile]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The python_tests job uses if: always() && !cancelled() which means it will proceed even when the upstream compile job failed (status failure). This wastes runner time attempting to download artifacts that were never uploaded.

The compile job itself uses if: always() && !cancelled(), so a failure there won't be cancelled — it will be failure. The condition should guard against a failed compile:

Suggested change
needs: [compile]
if: |
always() &&
!cancelled() &&
needs.compile.result == 'success'

cache-environment-key: ${{inputs.cache_key}}
post-cleanup: 'none'

- name: Clear CMAKE_GENERATOR variables (Windows)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead step — environment variable changes in cmd /C call {0} do not persist across steps.

set CMAKE_GENERATOR_PLATFORM= and set CMAKE_GENERATOR_TOOLSET= only clear the variables for the duration of this step's shell process. The variables are re-read from the conda-activated environment when the next step starts a new process. This step does nothing useful and can be removed. The actual clearing is (correctly) done again inside the "Build ArcticDB with conda (Windows)" step immediately below.

npm_config_prefix=$(npm config get prefix)
npm_bin_dir="$npm_config_prefix"
if [[ "$RUNNER_OS" == "Windows" ]]; then
npm_bin_dir=$(echo "$npm_bin_dir" | sed 's|^$[A-Z]$:|/\1|' | tr '[:upper:]' '[:lower:]' | sed 's|\\|/|g')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: the sed pattern s|^$[A-Z]$:|/\1| is malformed and silently fails to convert the Windows drive-letter path.

$[A-Z] matches a literal $ followed by an uppercase letter — it is not a regex group and \1 refers to a non-existent capture group. On Windows, npm config get prefix returns something like C:\Users\...\AppData\Roaming\npm, so the path is never converted to a Unix-style format. The npm_bin_dir ends up as the original Windows path (lowercased but with backslashes replaced), which is not a valid path in MSYS2/Git Bash, causing echo "$npm_bin_dir" >> $GITHUB_PATH to add a useless entry.

The original code in the monolithic workflow used a correct pattern. Replace with:

Suggested change
npm_bin_dir=$(echo "$npm_bin_dir" | sed 's|^$[A-Z]$:|/\1|' | tr '[:upper:]' '[:lower:]' | sed 's|\\|/|g')
npm_bin_dir=$(echo "$npm_bin_dir" | sed 's|^\([A-Z]\):|/\1|' | tr '[:upper:]' '[:lower:]' | sed 's|\\|/|g')

env:
ARCTICDB_USING_CONDA: 1
COMMANDLINE: ${{inputs.run_commandline}}
CI_MONGO_HOST: ${{inputs.install_mongodb && 'mongodb' || ''}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: CI_MONGO_HOST: mongodb will not resolve — no Docker service container is defined.

The original python_tests_linux_64 and python_tests_linux_aarch64 jobs in the monolithic workflow defined a services.mongodb container that made the hostname mongodb resolvable. This reusable workflow has no services: block, so the hostname mongodb does not exist. Any test that connects to $CI_MONGO_HOST will fail to connect.

MongoDB is installed as a process via ./.github/actions/install_mongodb (or manual download), but that listens on localhost, not mongodb. The env var should be:

Suggested change
CI_MONGO_HOST: ${{inputs.install_mongodb && 'mongodb' || ''}}
CI_MONGO_HOST: ${{inputs.install_mongodb && 'localhost' || ''}}

ARCTICDB_PYTEST_ARGS: ${{ inputs.run_custom_pytest_command }}
NODE_OPTIONS: --openssl-legacy-provider
linux_64:
uses: ./.github/workflows/conda_build_and_test.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical: wrong workflow filename — all 4 platform jobs will fail with "workflow not found".

The file added in this PR is .github/workflows/build_with_conda_and_test.yml, but every caller job here references ./.github/workflows/conda_build_and_test.yml. GitHub Actions resolves reusable workflows by exact filename, so this mismatch will cause all 4 jobs (linux_64, linux_aarch64, osx_arm64, win_64) to fail immediately.

Suggested change
uses: ./.github/workflows/conda_build_and_test.yml
uses: ./.github/workflows/build_with_conda_and_test.yml

free_disk_space: true
install_mongodb: true
hypothesis_profile: ci_linux
run_cpp_tests: ${{inputs.run_cpp_tests || true}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: inputs.run_cpp_tests || true always evaluates to true, making it impossible to disable C++ tests via workflow_dispatch.

In GitHub Actions expression language, false || true evaluates to true. So when a user triggers workflow_dispatch and explicitly sets run_cpp_tests: false, the expression ${{inputs.run_cpp_tests || true}} evaluates to true and C++ tests always run regardless of user intent.

The same issue exists on lines 56, 73, 90 for the other three platform jobs.

Use the input directly (it defaults to true in the reusable workflow already):

Suggested change
run_cpp_tests: ${{inputs.run_cpp_tests || true}}
run_cpp_tests: ${{inputs.run_cpp_tests}}

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Mar 19, 2026

ArcticDB Code Review Summary

PR #2980 — Refactor conda build for C++ tests, replacing the monolithic build_with_conda.yml with two clean reusable workflows: compile_and_test_with_conda_unix.yml and compile_and_test_with_conda_win.yml.


API & Compatibility

  • ✅ No breaking changes to public Python API
  • ✅ No on-disk format changes
  • ✅ No protobuf schema changes

Memory & Safety

  • ✅ N/A (CI/workflow-only change)

Correctness

  • disable_cpp_tests != true correctly replaces the old || true bug — On push/pull_request, inputs.disable_cpp_tests is empty so C++ tests run. On workflow_dispatch with disable_cpp_tests: true, C++ tests are correctly skipped.

  • ✅ Wrong filename bug fixed — Files are correctly named compile_and_test_with_conda_unix.yml / compile_and_test_with_conda_win.yml and referenced correctly in build_with_conda.yml.

  • ✅ Debug Print cache key step removed.

  • python setup.py protoc --build-lib python added to standard test branch — Both the custom-pytest branch and the standard branch now call protoc before running tests.

  • cpp_tests_enabled dead input removed — Inner workflows now use only run_cpp_tests.

  • ✅ Broken Windows path sed regex fixed — Replaced with correct bash BASH_REMATCH approach.

  • cache_key required input issue resolved — Now inlined as conda-env- + platform directly in the workflow.

  • build.txt removed.

  • runneros rename applied consistently across all three workflow files.

  • Windows python_tests now has !failure() guardcompile_and_test_with_conda_win.yml python_tests job has always() && !cancelled() && !failure(), preventing wasted runs when compile fails.

  • Unix python_tests runs even when compile failsif: always() && !cancelled() (no !failure()) at compile_and_test_with_conda_unix.yml python_tests job. When compile fails, all 6 matrix jobs attempt artifact download and fail, wasting runner time. Add !failure() as done for Windows.

  • Unix cpp_tests runs even when compile fails — Same always() && !cancelled() problem at the cpp_tests job (no !failure() guard). Add !failure() as done for Windows.

  • CI_MONGO_HOST: mongodb will not resolve — MongoDB is installed as a binary daemon (not a Docker services: container), so the hostname mongodb is not resolvable. The daemon listens on localhost:27017. CI_MONGO_HOST should be set to localhost when install_mongodb is true.

  • ⚠️ linux_aarch64 hypothesis profile regressionlinux_aarch64 call in build_with_conda.yml does not pass hypothesis_profile, so the unix workflow defaults to dev. The original workflow used ci_linux for aarch64 (runs more examples). Add hypothesis_profile: ci_linux to the linux_aarch64 call site.

  • ⚠️ python/test.py still present — This 1-line developer scratch file (import arcticdb) should not be committed. G-D-Petrov flagged for deletion.

Code Quality

  • ✅ Excellent refactor — eliminates ~1,200 lines of duplication using workflow_call pattern
  • ✅ Compact inline YAML input declarations are readable
  • cmd /C call {0} shell correctly used for Windows MSVC steps
  • init-shell: bash cmd.exe correctly set for Windows conda env
  • ✅ Windows path conversion uses proper bash BASH_REMATCH regex matching
  • runneros rename applied consistently
  • ✅ Checkout comments about not using recursive submodules restored
  • ⚠️ All three modified/new workflow files are missing trailing newline at EOF (build_with_conda.yml line 98, compile_and_test_with_conda_unix.yml line 318, compile_and_test_with_conda_win.yml line 236). Run make lint to fix.
  • ⚠️ run_on_arm_mac workflow_dispatch opt-in removed — osx_arm64 now unconditionally runs on every workflow_dispatch trigger (previously was opt-in via run_on_arm_mac: false). Verify this is intentional.

Testing

  • ✅ CI-only change, no unit/integration test changes needed

Build & Dependencies

  • ✅ No new dependencies introduced

Security

  • ✅ No hardcoded credentials
  • ⚠️ compile_and_test_with_conda_unix.yml lacks an explicit permissions block (flagged by GitHub Advanced Security). build_with_conda.yml and compile_and_test_with_conda_win.yml correctly have permissions: contents: read.

PR Title & Description

  • ⚠️ PR description sections are still empty — no explanation of what the refactor does, why it was needed, or how it was tested
  • ⚠️ No labels applied

runner: ubuntu-22.04-arm
platform: linux_aarch64
preset: linux-conda-release
cache_key: conda-env-linux_aarch64
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like this cache_key can be constructed by with a simple conda-env-${{platform}}, can we remove it?

run:
shell: bash -l {0}
steps:
- name: Debug inputs
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need this step, these params can be seen in the job iteself

on:
workflow_call:
inputs:
runner: {required: true, type: string, description: GitHub runner to execute on}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description here is wrong, this parameter is used to specify the OS.
It might be better to also rename it to os

with:
runner: windows-latest
platform: win_64
preset: windows-cl-conda-release
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical bug: cache_key is a required input in compile_and_test_with_conda_win.yml but is never passed here.

compile_and_test_with_conda_win.yml declares:

cache_key: {required: true, type: string, description: Unique conda environment cache key per platform}

This call site omits cache_key, which will cause GitHub Actions to fail workflow validation with: "Required input 'cache_key' not provided". Add:

Suggested change
preset: windows-cl-conda-release
runner: windows-latest
platform: win_64
preset: windows-cl-conda-release
cache_key: conda-env-win_64
run_cpp_tests: ${{inputs.disable_cpp_tests != true}}

runner: {required: true, type: string, description: GitHub runner to execute on}
platform: {required: true, type: string, description: Platform identifier e.g. linux_64 or osx_arm64}
preset: {required: true, type: string, description: CMake preset name e.g. linux-conda-release}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cpp_tests_enabled input is declared but never set to false by any caller, making it a no-op guard.

No call site in build_with_conda.yml passes cpp_tests_enabled: false. The default is true, so the inputs.cpp_tests_enabled condition in the cpp_tests job if: block (line 93) is always true and never suppresses anything. Either:

  • Remove cpp_tests_enabled and rely solely on run_cpp_tests, or
  • Document which platforms should pass cpp_tests_enabled: false (e.g., Windows) and wire it up at the call sites.

This is a different input from run_cpp_tests — the distinction between "user requested to disable" vs "platform doesn't support it" is valid, but callers need to actually use it.


- name: Install ArcticDB from artifacts
run: |
if [ -d "cpp/out/${{inputs.preset}}-build" ] && (ls python/arcticdb_ext*.so 2>/dev/null | head -1 | grep -q .); then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Artifact detection for macOS may fail silently if *.so glob matches nothing.

The check ls python/arcticdb_ext*.so 2>/dev/null | head -1 | grep -q . relies on the .so extension. On macOS conda builds the extension is .so (not .dylib), so this should work. However, if the artifact download placed files in a subdirectory rather than directly under python/, this check will fail and the ARCTIC_CMAKE_PRESET=skip optimisation will be bypassed, causing a full (slow) rebuild. Consider adding a fallback:

Suggested change
if [ -d "cpp/out/${{inputs.preset}}-build" ] && (ls python/arcticdb_ext*.so 2>/dev/null | head -1 | grep -q .); then
if [ -d "cpp/out/${{inputs.preset}}-build" ] && (ls python/arcticdb_ext*.so python/arcticdb_ext*.pyd 2>/dev/null | head -1 | grep -q .); then

runner: ubuntu-22.04-arm
platform: linux_aarch64
preset: linux-conda-release
run_cpp_tests: ${{inputs.disable_cpp_tests != true}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linux_aarch64 does not pass hypothesis_profile, so the unix workflow falls back to the dev profile (via inputs.hypothesis_profile || 'dev' at unix workflow line 301). The original monolithic workflow used HYPOTHESIS_PROFILE: ci_linux for aarch64. The dev profile runs fewer hypothesis examples, making these tests less thorough than before.

Consider adding hypothesis_profile: ci_linux to match the linux_64 call.

Suggested change
run_cpp_tests: ${{inputs.disable_cpp_tests != true}}
run_cpp_tests: ${{inputs.disable_cpp_tests != true}}

build.txt Outdated
@@ -0,0 +1,871 @@
Using pip 24.2 from /turbo/pmarkovski/pyenvs/ArcticDb_VirtEnv/lib/python3.11/site-packages/pip (python 3.11)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidental commit: local build log should not be in the repository.

This file contains output from a local pip install run on a developer's machine (paths like /turbo/pmarkovski/) and has no place in the repository. It adds noise, leaks internal path information, and will conflict with others' work.

Please remove build.txt before merging (add it to .gitignore if needed to prevent future accidents).

uses: SimenB/github-actions-cpu-cores@v2.0.0
id: cpu-cores

- name: Print cache key
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug step should be removed before merge.

This step echoes the cache key on every CI run and adds noise to logs. The cache key (conda-env-${{ inputs.platform }}) is already visible in the setup-micromamba step output and in the workflow inputs. G-D-Petrov flagged the same pattern on the earlier "Debug inputs" step (#39).

Suggested change
- name: Print cache key

Petar Markovski (Sofia) added 2 commits March 24, 2026 16:40
@@ -0,0 +1 @@
import arcticdb No newline at end of file
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this file can be deleted

# ==================== JOB 1: COMPILE ====================
compile:
name: Compile (${{inputs.platform}})
if: |
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that you need this if

@markovskipetar markovskipetar changed the title refactor conda build for cpp tests Refactor Build with conda Mar 31, 2026
ARCTICDB_USING_CONDA: 1
COMMANDLINE: ${{inputs.run_commandline}}
ARCTICDB_PYTEST_ARGS: ${{inputs.run_custom_pytest_command}}
NODE_OPTIONS: --openssl-legacy-provider No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing newline at end of file.

Suggested change
NODE_OPTIONS: --openssl-legacy-provider
NODE_OPTIONS: --openssl-legacy-provider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants