Add examples for parity with ip-intelligence-dotnet-examples#96
Merged
Conversation
Mixed DD+IPI examples (GettingStartedMixed, GettingStartedWebMixed and their configs) intentionally reference device detection and are untouched. In pure IPI code and shared helpers: - OfflineProcessing: Javadoc evidence sample is now an IP address (server.client-ip), not User-Agent / Sec-CH-UA headers - MetadataOnPrem: evidence-filter demo uses query.client-ip instead of header.user-agent; local ddEngine renamed ipiEngine - HtmlContentHelper: removed the Accept-CH/Client-Hints browser warning and the doUachInfo() Client Hints explainer (both DD-only, rendered on pure IPI pages); fixed "HashEngine" comment - KeyHelper: resource-key guidance no longer mentions TAC / Native Model - Deleted orphaned tacCloud.xml (DD cloud config, referenced by nothing) - pom.xml: SuperResourceKey comment no longer mentions TAC/Native Model - .gitignore: dropped TAC-HashV41.hash(.gz) entries and added IPI files. - 51Degrees-Cloud-Test.xml: comment now lists IPI properties (RegisteredName/Owner/Country) instead of DD ones, fixing the "HardeareVendor" typo with it - Workflows: IpIntelligence secret input now fed from IP_INTELLIGENCE_KEY instead of DEVICE_DETECTION_KEY (matches ip-intelligence-python/-go) - Reworded DD-flavoured "detection" language across the pure-IPI examples to IP-Intelligence terms (processing/lookup): GettingStartedOnPrem (evidence described as an IP address, not HTTP headers), GettingStartedWebOnPrem, OfflineProcessing (detectionFile -> dataFileLocation), PerformanceBenchmark (comments only; the "Detections per second" output strings are parsed by ip-intelligence-java/ci/run-performance-tests.ps1 regexes and left unchanged - changing them needs a lockstep CI update), UpdateDataFile, README.md, and the "isMobile" property mention (code uses RegisteredName)
Brings the examples repo to parity with the .NET examples repository and cleans up after the device detection port. - Add the missing console and web examples for parity with ip-intelligence-dotnet-examples. - Remove device detection leftovers from the port. - Add tests for the three mixed examples that had none. - Make example tests fall back to the free data files so they run from a fresh clone. Tests prefer the enterprise file, then the ASN file from the data submodule, then the downloadable Lite file, and skip when none is available. The OfflineProcessing and PerformanceBenchmark examples need the RegisteredName property, which the ASN file does not contain, so their tests consider only the enterprise and Lite files. - Link the fetched Lite data file under the unpacked name the tests resolve (51Degrees-LiteV41.ipi), so the Lite fallback also works in CI and not only from a local download. - Fetch the free device detection Lite hash and link it where the mixed example tests look for it, so those tests run in CI instead of skipping.
Contributor
Author
|
Setting this to draft so it is not picked up by the overnight auto-merge over the weekend. This is a precaution after an unintended overnight merge last night; nothing here is believed to be broken. It will be marked ready for review when the team is back. |
Reconcile the DD-nomenclature cleanup with the dotnet-parity examples PR. PR #96 is largely additive; 10 files conflicted. Resolutions: - HtmlContentHelper.java: take their deletion (no references remain). - tacCloud.xml -> 51Degrees-CloudMixed.xml: keep their rename/repurpose. - MetadataOnPrem.java: theirs (`engine` local var). - GettingStartedWebOnPrem.java + GettingStartedOnPrem.java: theirs ("lookup" wording) - aligned both getting-started examples. - 51Degrees-Cloud-Test.xml: theirs (fuller IPI property list). - pom.xml: keep our 4.5.42 version bump; dropped the unused SuperResourceKey. - KeyHelper.java: kept our TAC/Native-Model cleanup; dropped the unused getOrSetSuperResourceKey helper. - .gitignore: superset - the repo/CI name (51Degrees-EnterpriseIpiV41.ipi) plus the distributor IPIV4 names plus device-detection-data/. - README.md: hybrid - their full example table, our wording on the two shared rows. Validated: no markers, no dangling refs, mvn test-compile passes.
Bring the merged dd-cleanup + dotnet-parity branch up to date with main (env-var alignment #92, web styling #97, UTM links #95). 5 conflicts: - DataFileHelper.java: union - kept PR#96 findAvailableDataFile + LITE/ASN constants AND main's IPI_PATH_ENV_VAR (used by getDataFileLocation). - KeyHelper.java: took main (re-adds getOrSetSuperResourceKey + env-var alignment). NOTE: this reverses the earlier "drop SuperResourceKey" since main now owns it (still unused, but main's code). - HtmlContentHelper.java: restored main's version. NOTE: reverses PR#96's deletion - the merged web examples (GettingStartedWebOnPrem, WebMixed) reference it again after the main merge. - GettingStartedOnPrem.java: hybrid - kept "lookup" wording, took main's UTM-tagged property-dictionary URL (UTM lint workflow on main). - 51Degrees-CloudMixed.xml: kept PR#96's repurposed mixed-cloud config. Validated: no markers, mvn test-compile passes.
Contributor
|
Merged in my rename changes from #94 |
Jamesr51d
approved these changes
Jun 16, 2026
Contributor
|
This currently fails with: Attached here since it's a bit hard to find in the actions UI. |
Contributor
|
To fix this it seems changes need to be made in ip-intelligence-java. I have raised a PR 51Degrees/ip-intelligence-java#129 |
Contributor
Contributor
so IPI cloud examples work
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
# Conflicts: # pom.xml
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
justadreamer
approved these changes
Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the examples repo to parity with the .NET examples repository, cleans up after the device detection port, and makes the example tests runnable from a fresh clone.
What changed
51Degrees-LiteV41.ipi), so the Lite fallback also works in CI and not only from a local download.Notes
Verification
Run locally against the free data files: the console and web suites pass, the mixed tests run (not skip) with the device detection hash present, and the data-file fallback resolves the ASN and Lite files as intended.