Skip to content

fix(ci): restore build & Install workflows and stabilize integration tests - #99

Merged
Matus Tomlein (matus-tomlein) merged 3 commits into
masterfrom
claude/ci-failures-e2578a
Jul 22, 2026
Merged

fix(ci): restore build & Install workflows and stabilize integration tests#99
Matus Tomlein (matus-tomlein) merged 3 commits into
masterfrom
claude/ci-failures-e2578a

Conversation

@matus-tomlein

Copy link
Copy Markdown
Contributor

Summary

  • Fixes the build and Install GitHub Actions workflows, which had been failing on every push to master.
  • Two independent root causes: deprecated GitHub Actions (hard-failed by GitHub) and CMake 4.x incompatibility in the dependency setup.
  • Also removes a long-standing source of CI flakiness by replacing fixed-sleep waits in the integration tests with a bounded poll loop (addresses Jira AISP-1546).

Changes

Deprecated GitHub Actions → current versions

  • actions/cache@v2v4 (v2 is auto-failed by GitHub — this was killing the build jobs in seconds)
  • actions/checkout@v2/v3v4, actions/setup-java@v1v4 (added required distribution: temurin), microsoft/setup-msbuild@v1.1v2
  • Replaced the removed ::set-output command with $GITHUB_OUTPUT in release.yml

CMake 4.x compatibility (the real build failure)

  • Bumped nlohmann/json to 3.12.0 (its first CMake-4-compatible release) in both the FetchContent pin (CMakeLists.txt) and examples/conanfile.py — they must agree because the installed CMake config does an EXACT version match
  • Replaced the removed FetchContent_Populate for the SQLite amalgamation with FetchContent_MakeAvailable + DOWNLOAD_EXTRACT_TIMESTAMP

Runner-environment fixes

  • Windows: replaced hardcoded msbuild .\snowplow.sln (which the new VS 2026 generator broke) with generator-agnostic cmake --build . --config Debug
  • Install: replaced the turtlebrowser/get-conan action (fails with PEP 668 externally-managed-environment) with pipx install conan

Integration test stability (AISP-1546)

  • Added Micro::wait_for_good_and_bad_count(expected_good, expected_bad, timeout=10s), which polls the existing /micro/all helper every 100ms until the expected counts are reached instead of racing Micro's async processing with a fixed sleep_for(1000ms)
  • Replaced the fixed waits at each assertion site; the intentional 500ms spacing between the two cookie-test events (for distinct collector timestamps) is kept and commented

Testing

  • Full test suite passes locally (629 assertions, 17 test cases) with CMake 4.4
  • Integration section verified against Snowplow Micro 1.1.2 — passes and now completes in ~0.3s instead of ~4.5s of fixed sleeps, while tolerating up to 10s on a slow runner
  • Both workflows green on this branch across the full matrix: build (linux/mac/windows) and Install (all 11 combinations)

Notes

  • The integration-test change implements the poll-until-count approach recommended in AISP-1546 (recurrence of CSTMR-1942); the /micro/all|good|bad Console endpoints are deliberately not used as they are unavailable with persistent storage.

🤖 Generated with Claude Code

The build and Install workflows were failing on two independent issues:

- Deprecated GitHub Actions caused hard failures. `actions/cache@v2` is
  auto-failed by GitHub; `actions/checkout@v2/v3`, `actions/setup-java@v1`,
  and `microsoft/setup-msbuild@v1.1` are deprecated. Bump to current major
  versions (checkout@v4, cache@v4, setup-java@v4 with required distribution,
  setup-msbuild@v2) and replace the removed `set-output` command with
  `$GITHUB_OUTPUT`.

- CMake 4.x rejects the pinned nlohmann/json (its CMakeLists declared
  cmake_minimum_required < 3.5) and no longer allows the deprecated
  `FetchContent_Populate`. Bump nlohmann/json to 3.12.0 (first CMake-4
  compatible release) in both the FetchContent pin and the Conan file so the
  EXACT version match in the installed config stays consistent, and switch the
  SQLite amalgamation to `FetchContent_MakeAvailable` with
  `DOWNLOAD_EXTRACT_TIMESTAMP`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two environment-driven failures surfaced once the workflows ran again on
current runners:

- Windows MSBuild failed with MSB1009 because it hardcoded `snowplow.sln`,
  but the newer Visual Studio 18 (2026) generator no longer produces a
  solution at that path. Replace the MSBuild invocation with the
  generator-agnostic `cmake --build . --config Debug`, which locates the
  solution regardless of name.

- The Install workflow's `turtlebrowser/get-conan` action runs
  `pip3 install`, which now fails with an externally-managed-environment
  (PEP 668) error on GitHub runners. Install Conan via `pipx install conan`
  instead; pipx is preinstalled on all hosted runners and isolates the venv.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…eeps

Micro processes events asynchronously, so a fixed `sleep_for(1000ms)` before
reading counts races it on slower or busier CI runners and causes intermittent
failures (AISP-1546; recurrence of CSTMR-1942). A prior sleep-duration
increase did not hold.

Add `Micro::wait_for_good_and_bad_count(expected_good, expected_bad, timeout)`,
which polls the existing `/micro/all` helper every 100ms until the expected
counts are reached or a 10s timeout elapses, then returns the last observed
counts. Callers keep asserting exact counts, so unexpected extra events are
still caught. Replace the fixed waits at each assertion site; the 500ms spacing
between the two cookie-test events is intentional (distinct collector
timestamps) and is kept and commented.

Verified locally against Snowplow Micro 1.1.2: integration section passes and
now completes in ~0.3s instead of ~4.5s of fixed sleeps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 22, 2026 11:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@wiz-2cefcfbd9e

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations 1 Low
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 1 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

@matus-tomlein
Matus Tomlein (matus-tomlein) merged commit 2bc41ae into master Jul 22, 2026
20 checks passed
@matus-tomlein
Matus Tomlein (matus-tomlein) deleted the claude/ci-failures-e2578a branch July 22, 2026 11:05
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.

2 participants