Skip to content

BUILD: Name each fetched data file before the Python tests run - #281

Merged
Rakesh51D merged 3 commits into
rcfrom
ci/examples-use-fetched-data-files
Nov 30, 2026
Merged

Rakesh51D merged 3 commits into
rcfrom
ci/examples-use-fetched-data-files

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Why

The IP Intelligence on-premise tests read the data file named in _51DEGREES_IPI_PATH, and the device detection web getting started example reads _51DEGREES_DD_PATH. In CI the IP Intelligence fetch script wrote its variable where the tests in the same step could not see it, and nothing named the device detection file. Each fetch script now names the file it has just fetched, in the process the tests run in.

What changes

  • ip-intelligence/ci/fetch-assets.ps1 sets _51DEGREES_IPI_PATH with $env: to the Lite data file it fetched, 51Degrees-LiteIpiV41.ipi. common-ci runs this script and the tests in one step, so the IP Intelligence on-premise tests read it. The IP Intelligence examples take the variable only when it names the file they ask for, 51Degrees-LiteV41.ipi, so they still find the Lite file through the link the script makes under that name in cxx/data/ip-intelligence.
  • device-detection/ci/fetch-assets.ps1 sets _51DEGREES_DD_PATH to the Lite data file it fetched, which the web getting started example reads. The examples that look for their file with find_file do not read the variable, and find the file through the link the script makes in cxx/data/device-detection.
  • ip-intelligence/ci/fetch-assets.ps1 also fetches the device detection Lite data file and links it into ip-intelligence/assets, where the mixed examples find it. It sets _51DEGREES_DD_PATH too, which no IP Intelligence example or test reads.
  • The free-threaded test step in .github/workflows/free-threaded-python.yml sets both variables to the Lite files it restores from its cache.
  • ci/key-names.Tests.ps1 and ci/free-threaded-python.Tests.ps1 check each of these.

What a person running the examples gets is unchanged.

Tests

  • ci/key-names.Tests.ps1 and ci/free-threaded-python.Tests.ps1 with Pester 5.7.1 on Windows all pass, and each new or changed test fails against the scripts as they were.
  • Every ci/*.Tests.ps1 on Windows: 453 passed, 0 failed, at the second commit, which names the Lite file. Its new test, that the script names the Lite file it fetched, failed at the first commit.
  • Not run: the GitHub Actions jobs, pytest, and the native builds.

Before this leaves draft

Not ready to merge until these are done.

  1. The Pull Requests run at this head, which has not run yet, so no check here runs the two fetch scripts under common-ci.
  2. The free-threaded run passes at this head. It did at the first commit, in run 45461790754, on Python 3.13t on Ubuntu, 3.14t on Ubuntu and 3.14t on Windows.
  3. Whether ip-intelligence/ci/fetch-assets.ps1 still fetches the Enterprise file (about 2.3 GB), as no test reads it now, or one test names it.

ip-intelligence/ci/fetch-assets.ps1 sets _51DEGREES_IPI_PATH to the
Enterprise data file it fetched, with $env:, so the tests that common-ci
runs in the same process read it. device-detection/ci/fetch-assets.ps1
sets _51DEGREES_DD_PATH to the Lite data file it fetched.

The IP Intelligence fetch script also fetches the device detection Lite
file, which the mixed examples use, and names it in _51DEGREES_DD_PATH,
so it is there when only IP Intelligence is tested. The free-threaded
test step sets both variables to the Lite files it restores from its
cache.

The key names and free-threaded Pester tests check each of these. What
a person running the examples gets is unchanged.
ip-intelligence/ci/fetch-assets.ps1 named the Enterprise data file in
_51DEGREES_IPI_PATH, and the tests and examples accept the free Lite
file, which the script already fetches. It now names the Lite file, and
a new test in ci/key-names.Tests.ps1 checks that it does. The test that
the script still asks common-ci for the Enterprise file stays, although
nothing reads that file now, and an example test comment that said CI
names the Enterprise file is corrected.
@jwrosewell jwrosewell mentioned this pull request Nov 25, 2026
rc moved the free-threaded workflow's data files from its own cache to
the assets common-ci fetches, and took out the test of the cached paths
and its Get-Paths helper. The test that each test job sets
_51DEGREES_DD_PATH and _51DEGREES_IPI_PATH before pytest runs now
checks that the variables are set after the step that puts the files
in place, rather than reading the cache paths.
@jwrosewell
jwrosewell marked this pull request as ready for review November 30, 2026 16:08
@Rakesh51D
Rakesh51D merged commit e4aa190 into rc Nov 30, 2026
5 checks passed
@Rakesh51D
Rakesh51D deleted the ci/examples-use-fetched-data-files branch November 30, 2026 17:59
@Rakesh51D

Copy link
Copy Markdown
Collaborator

Merged into rc for the 4.6.2 release. The only failing check is the cloud available properties test, which fails because the CI resource key does not yet include the new ServiceWorkers property. Pull Requests run 46470818602 tested this head, 878792d, and every other test there passed. This pull request and #290 both change ci/key-names.Tests.ps1, so the CI script tests were also run on rc with this merged in: the same tests pass as on rc alone, plus this pull request's own.

Rakesh51D added a commit that referenced this pull request Nov 30, 2026
Brings in #290, which runs the 51Did and Human Confidence cloud tests
against the staging cloud, and #281, #282 and #288.

Two test files conflicted, and both keep the tests rc runs on staging.

- pipeline/fiftyone_pipeline_did/tests/test_did_client_live.py: the
  browser creator context test names the 51Did Properties on the page's
  Resource Key call, as this branch does. Where that first answer carries
  no 51Did because the call requested HumanConfidence and was handed the
  browser tests, it asks with the licence key alone, as rc does. Any other
  answer without a 51Did still fails. The client test's own call is
  rc's, which gets its 51Did on staging.
- pipeline/fiftyone_pipeline_cloudrequestengine/examples/tests/
  test_cloud_humanconfidence_web.py: rc's tests, with is_sealed using the
  package's is_blank, so a blank value is never a sealed result.

Run locally on Python 3.12 with no keys: fiftyone_pipeline_did 343
passed and 8 skipped, the cloud request engine examples 99 passed and 32
skipped. The live and staging tests skip without keys, so the Cloud
51Did and Cloud Human Confidence checks prove them.
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