Skip to content

ci: retry rate-limited Conan downloads in the Windows jobs - #403

Merged
airween merged 2 commits into
masterfrom
fix/conan-download-retry
Oct 25, 2026
Merged

airween merged 2 commits into
masterfrom
fix/conan-download-retry

Conversation

@airween

@airween airween commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

what

  • Let Conan retry rate-limited downloads in the Windows jobs of test_new.yml and test.yml: 10 retries, 30 seconds apart, set in Conan's global.conf right after conan profile detect.
  • Run the Windows jobs of test_new.yml on windows-2022 instead of windows-2025 (see below).

why

The Windows jobs build libModSecurity's dependencies with Conan, and those without a prebuilt binary are built from source. The lmdb sources come from git.openldap.org, which answers CI runners with HTTP 429, and Conan gives up after its default 2 retries 5 seconds apart:

WARN: network: Error 429 downloading file https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.32/openldap-LMDB_0.9.32.tar.gz
ERROR: lmdb/0.9.32: Error in source() method, line 50

Since about 2026-10-22 this fails all three Windows jobs on most runs, including master (e.g. https://github.com/owasp-modsecurity/ModSecurity-nginx/actions/runs/40110043295), whatever the PR changes.

second commit: run the test_new.yml Windows jobs on windows-2022

With the retries in place, the windows-nginx-* jobs get past lmdb and fail one step later, on yajl:

CMake Error at reformatter/CMakeLists.txt:38 (GET_TARGET_PROPERTY):
  The LOCATION property may not be read from target "json_reformat".
ERROR: yajl/2.1.0: Error in build() method, line 53

windows-2025 is now the windows-2025-vs2026 image. Its MSVC is compiler.version=195, for which ConanCenter has no prebuilt binaries, so every dependency is built from source, with the "Visual Studio 18 2026" generator and CMake 4. yajl's CMakeLists.txt sets CMP0026 to OLD, which CMake 4 no longer supports (owasp-modsecurity/ModSecurity#3604). The 429s had been hiding this, because lmdb failed before yajl was built.

test.yml, libModSecurity's own Windows CI and its release workflow all run on windows-2022, where yajl comes as a prebuilt binary. test.yml's build-windows job passed on this PR. The second commit moves the test_new.yml Windows jobs to windows-2022 too, until libModSecurity builds with VS 2026 and CMake 4.

notes

  • The same setting fixed the same failure in libModSecurity's Windows release workflow (Win release ModSecurity#3702), where the retries absorbed 7-8 consecutive 429 responses per job.
  • Follows ci: retry pcre2/zlib/openssl downloads in build-windows #389, which added retries to the wget downloads of pcre2, zlib and OpenSSL in the step before; this one covers the dependencies Conan downloads.
  • lmdb is not even used by the default libModSecurity Windows build (WITH_LMDB is off), but build/win32/conanfile.txt always requires it. Making it optional there would remove the download altogether; that belongs in the ModSecurity repository.

AI disclosure:

Made with help of Claude Code, Opus 5.5.

Summary by CodeRabbit

  • Chores
    • Windows build workflows now retry dependency downloads up to 10 times, waiting 30 seconds between attempts. This provides additional attempts when a download is interrupted or temporarily unavailable, helping Windows builds proceed without requiring an immediate manual rerun.

The lmdb sources come from git.openldap.org, which answers CI runners with
HTTP 429; Conan gives up after its default 2 retries 5 seconds apart.
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b1290fc7-e727-4bce-8694-5491bc08810b
Commits

Reviewing files that changed from the base of the PR and between 51315a8 and 527688a.

Files selected for processing: 1
  • .github/workflows/test_new.yml

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

Both Windows CI workflows configure Conan to retry dependency downloads up to 10 times, with a 30-second wait between retries. The Windows job in test_new.yml changes from windows-2025 to windows-2022.

Changes: Windows Conan download retries

Layer / File(s) Summary
Select Windows runner
.github/workflows/test_new.yml
The Windows job changes its runner from windows-2025 to windows-2022.
Configure Conan download retries
.github/workflows/test.yml, .github/workflows/test_new.yml
Both workflows set Conan’s download retry count to 10 and the wait between retries to 30 seconds.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Possibly related issues

Possibly related PRs

Suggested reviewers: fzipi, easton97-jens

Merge Risk: Minimal · up to 52768

The workflows configure Conan retries correctly, and the Windows runner change has no demonstrated compatibility issue.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "ci: retry rate-limited Conan downloads in the Windows jobs" matches the main change. The PR adds a PowerShell step to the Windows jobs in test.yml and test_new.yml that configures Conan to …
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "ci: retry rate-limited Conan downloads in the Windows jobs" matches the main change. The PR adds a PowerShell step to the Windows jobs in test.yml and test_new.yml that configures Conan to retry downloads 10 times with 30 seconds between retries, which addresses HTTP 429 rate-limit failures. The title is specific and uses the conventional ci: prefix. The commit message about moving test_new.yml to windows-2022 is a secondary change that the title does not mention, which is acceptable because the title does not need to cover every detail.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

windows-2025 now ships Visual Studio 2026 and CMake 4. With MSVC 19.5x Conan
has no prebuilt binaries and builds yajl from source, whose configure step
fails on CMP0026 (owasp-modsecurity/ModSecurity#3604).
@sonarqubecloud

Copy link
Copy Markdown

@airween
airween merged commit 28bfa42 into master Oct 25, 2026
27 checks passed
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.

1 participant