Skip to content

Need a licence key only for the updates that download - #136

Merged
jwrosewell merged 5 commits into
rcfrom
fix/licence-key-only-for-downloads
Nov 15, 2026
Merged

jwrosewell merged 5 commits into
rcfrom
fix/licence-key-only-for-downloads

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

The file system watcher needs no licence key, as the data update specification says, but both on-premise engines refused to build with no licence_keys whatever their settings, and an empty key turned the downloads off without saying so. An engine now builds with no key unless it is asked to download from the Distributor, and then refuses with a message naming the options to turn off.

This reverses an earlier behaviour of these packages, where giving no licence key also stopped the file system watcher from running.

Problem

DeviceDetectionOnPremise and IpIntelligenceOnPremise raised "licence key is required" whenever licence_keys was not given (devicedetection_onpremise.py lines 165 and 166 at 6ad5ae2d, ipintelligence_onpremise.py lines 134 and 135), even with auto_update and update_on_start off and only the file system watcher on, and both pipeline builders pass their settings straight to the engine, so the builder route refused too. With licence_keys="", the engine turned auto_update and update_on_start off and built, whatever update URL was given.

What the specification says

data-updates.md lines 107 to 109 at 706de1f0:

A License Key is needed only for the two mechanisms that download, which are polling and the update on start-up. The file system watcher needs no License Key.

Line 392, the License key row of the defaults table: "required before the Engine builds with autoUpdate or updateOnStartup on, because the Distributor serves nothing without one. The build fails with a configuration error that names the option to turn off. A configuration may say that no key is required, for an update source that serves the file without one. The file system watcher downloads nothing and needs no key".

What changed

  1. 4c8ae68d adds test_licence_key_rule.py to both on-premise packages: no key is needed when nothing downloads, nor with the engine's defaults, nor by the pipeline builder's defaults, nor for an update URL other than the Distributor's, and a download asked for with no key is refused with a message naming the option. test_ipintelligence.py's test_missing_licence_key, which expected the refusal with no key, is removed, and test_a_download_with_no_key_is_refused_naming_the_option covers the refusal now.
  2. 8ba46b39 makes each engine refuse to build only when auto_update or update_on_start is on with the Distributor's address and no key is given, naming the options that need one, and otherwise build with no key. The Distributor's address is the constant DISTRIBUTOR_URL, and the docstrings of the engines and builders say when a key is needed.
  3. 8fe7b6b1 adds test_watcher_without_licence_key.py to both packages: with no key and the watcher on, the engine builds with its data file watched, and a replaced (Device Detection) or touched (IP Intelligence) file is reloaded and reported as AUTO_UPDATE_SUCCESS, after which the Pipeline still processes.
  4. 5a1cb583 and 0238cf6b say what the watcher tests' wait is, a guard that stops a test waiting for ever and that a reload must finish within, and no longer claim it was set from runners' reload times.

Before you upgrade

  • An on-premise engine builds with no licence_keys when auto_update and update_on_start are off, which they are by default, where it refused to build. Its file system watcher runs with no key.
  • An engine with auto_update or update_on_start on, the Distributor's update URL and no key, an empty string included, now refuses to build with a message naming those options, where an empty string turned them off without saying so. Turn them off, or give a key.
  • An update URL other than the Distributor's needs no key.

How it was verified

  • Red, full build 43616255908 on 4c8ae68, the licence key rule tests alone on rc cf904f8. Each job printed "8 failed, 78 passed" for on-premise Device Detection and "8 failed, 57 passed" for on-premise IP Intelligence. In each package all five tests of test_licence_key_rule.py failed, three outright (test_no_key_is_needed_with_the_engine_defaults, test_the_pipeline_builder_needs_no_key_by_default and test_an_update_url_other_than_the_distributor_needs_no_key) and two in their subtests (test_a_download_with_no_key_is_refused_naming_the_option and test_no_key_is_needed_when_nothing_downloads).
  • The watcher tests of 8fe7b6b build the engine with no key in the same way, so on rc they stop at the same refusal before the watcher is reached. They were written after the fix and have no red run of their own.
  • Green, full build 43662483256 on the head 0238cf6, from rc 1190974, is green. Its ten Build and Test jobs, Python 3.10 to 3.14 on Ubuntu and Windows, each passed, with test_licence_key_rule.py (5 tests) and test_watcher_without_licence_key.py (2 tests) passing in both packages in each job. The 11 Setting 'PullRequestSha' lines all name 0238cf6, and Configure printed "Left out 5 macOS entries". macOS was left out of this draft's full build under the 9 November decision. The rc head is built with macOS before it merges into main.
  • Earlier builds: 43655768797 on 8fe7b6b was green, and 43660826243 on 0238cf6 failed in Configure, where the data repository's download of the free Lite file failed before any build job.

What it releases

fiftyone_devicedetection_onpremise and fiftyone_ipintelligence_onpremise and their dependants, which Monday's release plan releases already.

What remains

Nothing.

data-updates.md lines 107 to 109 and 392 say a licence key is needed only
for polling (auto_update) and the update on start-up, and that the build
fails naming the option to turn off when either is on with no key. The
tests build the Device Detection and IP Intelligence engines with no key
and nothing that downloads, with the engine defaults, with each option on
and no key, through the pipeline builder with no key, and with an update
URL other than the Distributor. The IP Intelligence test that asserted a
missing key is always refused goes, as the new tests replace it.
An on-premise engine refused to build when no licence_keys was passed,
whatever its settings, and with an empty key it turned auto_update and
update_on_start off without saying so, even for an update URL other than
the Distributor. data-updates.md lines 107 to 109 and 392 say a key is
needed only by polling and the update on start-up, which download from the
Distributor, and that the build then fails with a configuration error
naming the option to turn off.

Both engines now build with no key unless auto_update or update_on_start
is on with the Distributor's address, and then refuse naming those
options, as .NET does. The file system watcher needs no key, and an update
URL other than the Distributor needs none either.
@jwrosewell
jwrosewell marked this pull request as ready for review November 15, 2026 03:01
@jwrosewell
jwrosewell merged commit 2586565 into rc Nov 15, 2026
3 checks passed
@jwrosewell
jwrosewell deleted the fix/licence-key-only-for-downloads branch November 15, 2026 03:01
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.

1 participant