Skip to content

fix(ci): the BIM4LCA fetcher checks the files it has before asking the host (#766) - #791

Merged
DrunkOnJava merged 1 commit into
mainfrom
fix/bim4lca-check-files-first
Oct 18, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
fix/bim4lca-check-files-first

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

tools/ci/fetch-bim4lca.py checks the files already in its target directory before asking VTT's host for anything, so a cache-restored run never contacts the host (#766, follow-up to #789).

Motivation

The fetcher read the archive's central directory first, so every tier-two run asked VTT's host, even when the cache had restored all five files.

  • Host down: the four BIM4LCA targets skipped, though their files were in place.
  • Archive replaced on the host: every pull request would fail CI passed on a stale pin, with good files in hand.

Changes

  • Files in place are checked against their pins first. The host is asked only for those missing or wrong; when none are, the fetcher exits 0 without a request.
  • --pin mode is unchanged.
  • A stale pin's message names the pins file it was given, not always research/bim4lca-models.tsv (Measure passes research/bim4lca-measure.tsv).

Testing

  • Locally: a pins file whose archive URL cannot resolve, with one entry present and matching. The fetcher printed [ok] and exited 0 without a request. With the entry deleted, it went to the host and was still retrying when stopped.
  • This pull request's tier-two run (job 117746631014) restored main's cache and printed five [ok] lines and no [fetch], so it made no request to the host. The four targets ran and passed: column_node_z, column_cut_body, level_shared_elevation and level_parameters.

Breaking changes

None.


Note

Low Risk
CI fetch-script behavior only; no runtime product code, with clearer offline/cache-hit paths and a small error-message fix.

Overview
fetch-bim4lca.py now verifies cached files before touching the archive host, so tier-two CI can succeed when VTT is down or pins are stale but the restored cache already has valid models.

In normal fetch mode, the script walks pinned entries locally (size + sha256), prints [ok] for matches, and returns 0 immediately if nothing is missing—central_directory / range requests run only for gaps. --pin still hits the host up front to read the central directory. Stale-pin errors now tell you to re-pin the actual pins file passed on the CLI (e.g. bim4lca-measure.tsv), not a hardcoded path.

Reviewed by Cursor Bugbot for commit 1626e8d. Configure here.

…e host (#766)

fetch-bim4lca.py read the archive's central directory before looking at
target_dir, so every tier-two run asked VTT's host even when the cache had
restored all five files. With the host down the four targets skipped
though their files were there, and an archive replaced on the host would
have failed CI passed on every pull request with good files in hand. The
files in place are now checked against their pins first, and the host is
asked only for the ones missing or wrong. A stale pin's message names the
pins file it was given rather than always research/bim4lca-models.tsv.
@DrunkOnJava DrunkOnJava added area:corpus Work in the corpus area. type:ci Continuous integration or automation work. labels Oct 18, 2026
@DrunkOnJava
DrunkOnJava merged commit c427591 into main Oct 18, 2026
25 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/bim4lca-check-files-first branch October 18, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:corpus Work in the corpus area. type:ci Continuous integration or automation work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant