Repository navigation
Need a licence key only for the updates that download - #136
Merged
Merged
Conversation
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.
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.
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_keyswhatever 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
DeviceDetectionOnPremiseandIpIntelligenceOnPremiseraised "licence key is required" wheneverlicence_keyswas not given (devicedetection_onpremise.pylines 165 and 166 at 6ad5ae2d,ipintelligence_onpremise.pylines 134 and 135), even withauto_updateandupdate_on_startoff and only the file system watcher on, and both pipeline builders pass their settings straight to the engine, so the builder route refused too. Withlicence_keys="", the engine turnedauto_updateandupdate_on_startoff and built, whatever update URL was given.What the specification says
data-updates.md lines 107 to 109 at 706de1f0:
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
4c8ae68daddstest_licence_key_rule.pyto 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'stest_missing_licence_key, which expected the refusal with no key, is removed, andtest_a_download_with_no_key_is_refused_naming_the_optioncovers the refusal now.8ba46b39makes each engine refuse to build only whenauto_updateorupdate_on_startis 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 constantDISTRIBUTOR_URL, and the docstrings of the engines and builders say when a key is needed.8fe7b6b1addstest_watcher_without_licence_key.pyto 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 asAUTO_UPDATE_SUCCESS, after which the Pipeline still processes.5a1cb583and0238cf6bsay 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
licence_keyswhenauto_updateandupdate_on_startare off, which they are by default, where it refused to build. Its file system watcher runs with no key.auto_updateorupdate_on_starton, 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.How it was verified
rccf904f8. 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 oftest_licence_key_rule.pyfailed, three outright (test_no_key_is_needed_with_the_engine_defaults,test_the_pipeline_builder_needs_no_key_by_defaultandtest_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_optionandtest_no_key_is_needed_when_nothing_downloads).rcthey stop at the same refusal before the watcher is reached. They were written after the fix and have no red run of their own.rc1190974, is green. Its ten Build and Test jobs, Python 3.10 to 3.14 on Ubuntu and Windows, each passed, withtest_licence_key_rule.py(5 tests) andtest_watcher_without_licence_key.py(2 tests) passing in both packages in each job. The 11Setting '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.What it releases
fiftyone_devicedetection_onpremiseandfiftyone_ipintelligence_onpremiseand their dependants, which Monday's release plan releases already.What remains
Nothing.