BUILD: Move the on-premise engine to the 4.6 data file reader - #341
Conversation
Pearl release/2b writes data file version 4.6, with profile offsets and the profiles collection length in 8 byte units declared by the header's profilesOffsetShift field. A 4.5 engine rejects those files outright, and Pearl reads every export back through this package to validate it, so the engine has to move before 2b can produce anything. ip-graph-cxx is deliberately left where it is. The derived range IPs change is out of scope for 2b, and 4.6 keeps IpRangeStart and IpRangeEnd stored in profiles exactly as 4.5 does. This is the head of ip-intelligence-cxx#147, which forked before #149, so it does not carry the target IP address API added there. Nothing in this repository references it. Repoint at the merge commit once #147 lands.
The 4.6 reader returns INCORRECT_VERSION for any non zero profilesOffsetShift when built without FIFTYONE_DEGREES_LARGE_DATA_FILE_SUPPORT, and Pearl writes shift 3 into every file including Lite and ASN. So the option is now load bearing for every product rather than only for files over 4GB. Windows already passed it. The other platforms relied on ip-intelligence-cxx defaulting the option to ON, which holds only because that CMakeLists declares the option before common-cxx declares the same one OFF. Say it at the call site instead of depending on which scope wins.
Repoints from the PR head (923e6e3) to the merge commit for ip-intelligence-cxx #147, which brings src/common-cxx to 96c2a0f. The PR head had forked before #149, so pinning it dropped the target IP address API relative to main. The merge commit restores it: the whole delta from main's previous pin (0d4bfdf) is now C source in ipi.c, ipi.h and ipi_weighted_results.c plus the common-cxx bump, with no change to any .i or .hpp file, so the checked in SWIG output stays correct.
The 378 builder combinations hang the test host part-way through on both macOS runners. Blame's inactivity timeout then aborts the whole assembly, so Tests.Core publishes no results at all, and dotnet test still exits 0, so the job goes green with the assembly silently missing.
Broaden the macOS-only skip to an outright Ignore.
MaxPerformance and HighPerformance load the whole 7.7 GB data file into memory, and the macOS runners report under 5 GiB available. Every test on those profiles spends 14-37s thrashing; together they were 596s of the 733s the on-premise suite spent on macOS arm64, against ~1.8s per test on Ubuntu with 14.5 GiB. macOS is not a primary platform for the engine, so it now exercises only the profiles that stream from disk. Linux and Windows keep the full matrix - test discovery on Linux is unchanged at 128, 14 per profile.
Balanced still holds the data file in memory and still cost 137s across 10 tests on the macOS arm64 runner. Leave macOS with LowMemory, the only profile that streams from disk. Linux and Windows are unaffected: discovery there is still 128 tests, 14 per profile.
Independent review for the next cloud releaseThis change is a dependency of the next cloud release (51Degrees/cloud#293 takes the package bump), so it was reviewed again from the merged artifacts rather than from this PR's description. Focus was breaking changes and anything that could cause a real problem for customers or operations. Confirmed against the artifacts
Found
For the release decisionThe version numbering risk the PR body records deserves restating for the meeting. The first package built from this merge will be 4.5.121, and it rejects every 4.5 data file. Any consumer resolving a floating 4.5 version gets an engine that refuses the file they have, and any consumer staying put gets files they cannot read once their automatic update delivers a 4.6 file, with the leak above on every failed attempt. Both directions of the break arrive without a major or minor version signal. Produced with AI assistance under James Rosewell's direction and needs human review. |
Why
Pearl
release/2bmerges #1353, which writes IPI profile offsets and the profiles collection length in 8 byte units and declares data file version 4.6. A 4.5 engine rejects those files, and Pearl reads every export back throughFiftyOne.IpIntelligence.Engine.OnPremiseto validate it, so nothing on 2b can produce a data file until this package moves. This repository was the only one in the 4.6 transition without an owner, and it is the one Pearl actually consumes.What changed
FiftyOne.IpIntelligence.Engine.OnPremise/ip-intelligence-cxxmoves from0d4bfdf55712bef9dad3644cd030e4d030c3ea3eto923e6e3670b70d644f9c3c2ca966d89488948e1d, the head of ip-intelligence-cxx#147feature/combined-datafile-46, carryingsrc/common-cxxfdf5983296f21158f9f9d0dd6886f92df388f260(common-cxx#148).src/ip-graph-cxxis unchanged at5a9b63aebea6478d910ec818b84cb005e16ae9d5. The derived range IPs change is out of scope for 2b, and 4.6 keepsIpRangeStartandIpRangeEndstored in profiles exactly as 4.5.PreBuild.ps1now passes-DLargeDataFileSupport:BOOL=ONon the Linux and macOS path as well as Windows. The 4.6 reader returnsINCORRECT_VERSIONfor any non zeroprofilesOffsetShiftwhen built withoutFIFTYONE_DEGREES_LARGE_DATA_FILE_SUPPORT, and Pearl writes shift 3 into every file including Lite and ASN, so the option is load bearing for every product rather than only for files over 4GB. It was previously reaching the non-Windows build only becauseip-intelligence-cxx/CMakeLists.txtdeclares the optionONbeforecommon-cxx/CMakeLists.txtdeclares the same oneOFF.No managed or SWIG change is needed.
reservedtoprofilesOffsetShiftis a rename at the same offset in a#pragma pack(push, 1)struct that SWIG does not expose; the string does not appear anywhere inInterop/SwigorIpIntelligenceEngineSwig_csharp.cpp. The only.i/.hppdifference between the old and new submodule pins is the target IP address API from ip-intelligence-cxx#149, which nothing here references.Compatibility
This is a breaking change in both directions and it is not signalled by the package version. The engine reads 4.6 only: it rejects 4.5 files with
The data is an unsupported version, and a 4.5 engine rejects 4.6 files the same way. Package versions stay on 4.5.x because the data file version and the package version are not the same number, so the release needs to carry the warning that the version alone does not. Every consumer moves at the same time as its data files.How it was tested
Nothing in this repository triggers on
pull_request.pull-requests.ymlandpublish.ymlare bothworkflow_dispatchonly; the solepull_requestworkflow isutm-link-lint.yml, which lints links. So this PR gets no automated build or test, and the local runs below are the only verification.All runs on Ubuntu 24.04, x64, .NET 8/10.
Large data file support, on the built binary rather than inferred from CMake.
nm -Donbuild/linux/x64/Release/FiftyOne.IpIntelligence.Engine.OnPremise.Native.dllexportsfiftyoneDegreesCollectionCreateFromFileWithOffsetShiftandfiftyoneDegreesCollectionCreateFromMemoryWithOffsetShift. Both are inside#ifdef FIFTYONE_DEGREES_LARGE_DATA_FILE_SUPPORTincommon-cxx/collection.c, so their presence in the symbol table is the define.This repository's own tests, against the 4.6 Enterprise file now served by
IPI_DATA_FILE_URL. That file is 7.72 GB uncompressed and declares 4.6 withprofilesOffsetShift3, so it is also a direct exercise of the shifted offsets rather than only of the version check.FiftyOne.IpIntelligence.OnPremise.Testsmainatf8cfdae, 4.5 assetThe middle row is every test that loads a data file failing on
unsupported version, which is the 4.6 reader refusing a 4.5 file. With the 4.6 asset the branch matchesmainexactly.Reading back a file Pearl produces. A pre-release package
4.5.121-alpha.1was built from this branch (dotnet pack, Release, x64) along withFiftyOne.IpIntelligence.Sharedat the same version, dropped into Pearl'slocal-packages/, and the threePackageReferenceentries onPearl.AIB,Pearl.Joan.OSMandPearl.Usagerepointed at it, on branchtest/ipi-46-engine-validationoffrelease/2brather than onrelease/2bitself. A harness on that branch exports Lite, ASN and Enterprise through the productionExportProcessorIpipath, checks the written header declares 4.6 with offset shift 3, and checks the compressed output was completed:unsupported versionunsupported versionunsupported versionThe negative row matters because a rejected file is not loud:
ExportProcessorIpicatches it, logs, and skipsComplete, so the worker finishes having produced no file and recorded no failure.Open
mainpins today. Nothing here consumes it, but this will be repointed at the merge commit once FEAT: Property accessors have been regenerated to return non-weighted values for properties which do not need to be weighted. #147 lands.ip-intelligence-datastill commits51Degrees-IPIV4AsnIpiV41.ipiat 4.5. Nothing in this repository's on-premise tests reads it, butip-intelligence-dotnet-examplesshares the submodule and any consumer of that file needs a 4.6 version.Pearl.AIB,Pearl.Joan.OSM,Pearl.Usage, pinned 4.5.99) andip-intelligence-dotnet-examples(viaFiftyOne.IpIntelligence4.5.86).cloud,configuratorandWebsitedo not reference it.