Skip to content

fix(ci): exclude the versioning test sets and upgrade maps from the dataset compliance pathspec - #350

Open
sakanni wants to merge 2 commits into
developfrom
internal-tickets-#43-ExcludeVersioningUpgradeMaps
Open

fix(ci): exclude the versioning test sets and upgrade maps from the dataset compliance pathspec#350
sakanni wants to merge 2 commits into
developfrom
internal-tickets-#43-ExcludeVersioningUpgradeMaps

Conversation

@sakanni

@sakanni sakanni commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

ci-dataset-compliance asserts that every file it selects deserialises into a BH.oM.Data.Library.Dataset. Two shapes in scope are not Dataset documents, and this repository holds one of them.

Measured with git ls-files against this checkout:

pathspec files
:(icase)*datasets*.json 80
+ :(exclude,icase)*Versioning_Test/Datasets/* 0
+ :(exclude,glob,icase)**/Versioning_[0-9]*.json 0

All 80 are under .ci/code/Versioning_Test/Datasets. Nothing else in this repository matches the selector, so nothing legitimate is lost.

Measured behaviour of the runner, for the record: DatasetComplianceRunner built from CI_Toolkit develop exits 1 on .ci/code/Versioning_Test/Datasets/9.2/Objects.json with Dataset file did not deserialise into a BH.oM.Data.Library.Dataset object successfully, and exits 0 on a genuine library dataset in the same environment.

Why there are two exclusions

The first token covers this repository's test corpus: JSON Lines of oM objects whose filenames are Objects.json, Methods.json and Adapters.json. The filename carries no signal, so only a path exclusion reaches them.

The second token covers a different shape, and it is not for this repository's benefit. BHoM versioning upgrade maps are named Versioning_<version-without-the-dot>.json and hold {"Dataset":{"ToNew":..,"ToOld":..}}, read by BHoM_Engine Versioning_Engine/Query/DatasetToNewPaths.cs. They carry no _t and can never be Dataset documents. Swept over 309 repositories on their default branches: 15 such files in 11 repositories, each at a project root next to its .csproj. None is currently selected, because the base selector needs a datasets substring in the path. The exception is a repository whose project folder supplies that substring, which is the *_Datasets repositories, and one such file is failing on an open pull request today.

This repository holds zero files of that shape, so the second token is a no-op here. It is included so the pathspec does not diverge from the template.

Both :(glob) and the [0-9] gate are load-bearing, and each is pinned by an assertion in the CI_Toolkit pull request:

  • A bare :(exclude,icase)*Versioning_*.json reads as a filename rule but is not one. Without :(glob) the * crosses /, so it drops every .json under any directory containing Versioning_, including this repository's test corpus and any real dataset under a Versioning_Engine folder.
  • Without :(glob) the trailing * also crosses /, so a directory named Versioning_<digits> would take its whole contents out of scope.
  • Without [0-9] the token would drop a genuine dataset named Versioning_Rules.json. Gating on the current BHoM version instead does not work: repositories keep the map for whatever version they last needed one at, and six of the 15 are Versioning_33.json.

Why this repository needs its own edit

The identical change is in BHoM/CI_Toolkit templates/BHoM/ci-beta.yml and templates/BHE/ci-beta.yml (that pull request also carries the fixtures and assertions that pin it). Per BHoM/internal-tickets#39 nothing propagates a template change to onboarded repositories, so the template edit fixes no repository and this one is what takes effect here.

The patterns: value here is character-for-character the same as the template's, so the two cannot drift on the thing that determines behaviour. The surrounding comment is deliberately shorter than the template's: the fuller derivation, including which element of the token each control run pins, is kept in CI_Toolkit next to the assertions that prove it.

What this does not fix

Measured over the same 309 repositories: on default branches the second token removes nothing, because no upgrade map currently sits in a selected path on any default branch. Its effect is on pull requests, and the one live instance is in another repository that holds its own copy of this workflow and has no pull request open against it. This pull request does not clear that failure. The route that would clear it without a per-repository edit is to have ci-compliance append the dataset exclusions itself, which is a separate change and not proposed here.

What CI did and did not check

  • ci-dataset-compliance will self-skip on this pull request. It changes one workflow file, which the dataset pathspec does not match, so the job reports success having examined nothing. That is expected and is not evidence the change works. The evidence is the git ls-files measurement above and the fixture assertions in the CI_Toolkit pull request, which go from 83 to 92 and include control runs confirming each element of the new token is independently required.
  • ci-versioning is expected to be red, per BHoM/internal-tickets#34, on every pull request against this repository and for reasons unrelated to this change.

Refs BHoM/internal-tickets#36, BHoM/internal-tickets#43.


Supersedes #349, which was closed as a side effect of renaming this branch to the documented convention. Same head commit, 867150f. The only content lost was BHoMBot check-queue chatter; there were no reviews.

… pathspec

ci-dataset-compliance asserts that every file it selects deserialises into a
BH.oM.Data.Library.Dataset. This repository's versioning test sets match the
selector but are JSON Lines of oM objects, so all 80 fail by design.

Measured against this checkout:
  :(icase)*datasets*.json                                              80 files
  ... :(exclude,icase)*Versioning_Test/Datasets/*                        0 files

The same one-line change is in BHoM/CI_Toolkit templates/BHoM/ci-beta.yml and
templates/BHE/ci-beta.yml. Per BHoM/internal-tickets#39 nothing propagates a
template change to onboarded repositories, so this repository needs its own
edit. After both land, this file remains byte-identical to its template.

Refs BHoM/internal-tickets#36
…athspec

ci-dataset-compliance asserts that every file it selects deserialises into a
BH.oM.Data.Library.Dataset. Versioning_<digits>.json are versioning upgrade
maps holding {"Dataset":{"ToNew":..,"ToOld":..}} and can never be Dataset
documents, so add a filename-anchored exclusion alongside the existing
Versioning_Test/Datasets path exclusion.

:(glob) keeps the token a filename match. Without it both wildcards cross '/',
so the exclusion would also drop real datasets under any directory containing
Versioning_. The ** anchor keeps it depth-agnostic and the [0-9] gate keeps a
genuine dataset named Versioning_Rules.json in scope.

This repository holds no file of that shape, so the token is a no-op here and
is carried so the pathspec does not diverge from CI_Toolkit's templates. The
surrounding comment is condensed; the fuller derivation and the assertions
that pin each element of the token live in CI_Toolkit.

Refs BHoM/internal-tickets#36, BHoM/internal-tickets#43.
@sakanni

sakanni commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@BHoMBot check required

@bhombot-ci

bhombot-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown

@sakanni to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

There are 23 requests in the queue ahead of you.

@bhombot-ci

bhombot-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown

@sakanni to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

There are 24 requests in the queue ahead of you.

@bhombot-ci

bhombot-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown

The check installer has already been run previously and recorded as a successful check. This check has not been run again at this time.

@sakanni

sakanni commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@BHoMBot check copyright-compliance

@bhombot-ci

bhombot-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown

@sakanni to confirm, the following actions are now queued:

  • check copyright-compliance

There are 24 requests in the queue ahead of you.

@sakanni sakanni added type:feature New capability or enhancement and removed type:bug Error or unexpected behaviour labels Sep 9, 2026
sakanni added a commit to BuroHappoldEngineeringSandbox/Versioning_Toolkit that referenced this pull request Sep 10, 2026
Sandbox venue only. Keeps ci-dataset-compliance from going red on the
versioning test sets, so guard-validation PRs here are not confused by
unrelated failures. Mirrors the open upstream PR exactly; drop this commit
if a later fork sync brings the same change from upstream.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New capability or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant