Repository navigation
Release candidate - #240
Merged
Merged
Conversation
…54) * Label a one-package release with its version, not its last character When the release plan holds one package, $plan.Version is a single string, Sort-Object hands it back as a string, and [-1] took its last character, so a plan releasing 4.5.3 alone gave the run the label 3, which the publish's version check refuses. The sort is now collected into an array first. * Test the publish label for a plan of one package, several packages and none
* DOC: Point at the one list of environment variable names AGENTS.md gains a section linking common-ci's list of environment variable names (environment-variables.md, made from environment-variables.json) at commit 18f9a570, and saying the list decides. Documentation only. * DOC: Link the list of environment variable names at d8a9c596 The list at that commit holds the names review found missing. * Keep one Releases section in AGENTS.md
Pull requests go to rc, so a 51Did change was first checked against the live cloud only when the release pull request into main opened.
Reviewed and approved at head 2e8d370. The pull request body says what changed and how it was tested.
Reviewed and approved at head 60b4036. The pull request body says what changed and how it was tested.
Step 1 of [common-ci#306](51Degrees/common-ci#306). The release plan in `ci/packages.ps1`, which works out which packages a publish releases and at which version, moved to common-ci as `steps/release-plan.ps1` in [common-ci#307](51Degrees/common-ci#307), and the rule that documentation, tests and examples do not count was added there by [common-ci#310](51Degrees/common-ci#310). Both reached common-ci's `main`, which the workflows here use, in common-ci's release of 12 November. This repository then uses the shared step in place of its own copy, so that the rule is written once for every package repository.
…les (#119) The Usage Sharing Element accepts no Evidence, and shares what it finds in the web request that the web integration adds as `server.http-request`, together with the Evidence given to the Pipeline (`found_evidence` in [`share_usage.py` lines 432 to 458 at 5b5a833](https://github.com/51Degrees/51degrees-python/blob/5b5a833239d435676a1ab0450be22bce0c0807a2/pipeline/fiftyone_pipeline_engines_fiftyone/src/fiftyone_pipeline_engines_fiftyone/share_usage.py#L432-L458)). `webevidence` in [`pipeline/fiftyone_pipeline_core/src/fiftyone_pipeline_core/web.py` line 139](https://github.com/51Degrees/51degrees-python/blob/5b5a833239d435676a1ab0450be22bce0c0807a2/pipeline/fiftyone_pipeline_core/src/fiftyone_pipeline_core/web.py#L139) adds it for every request it reads.
Each must end without an error, naming the environment variable to set and giving a tagged link to the page where a key is created.
Each examples package, location and the pipeline packages that hold examples gain test_find_out_more.py. It reads every example file and fails, naming the file, when the file has no Find out more section, meaning a list of links whose 51degrees.com addresses carry a utm_term starting with find-out-more and a utm_content naming that file, and a link to the product's folder in this repository. Where an example can stop early without a key, a data file or the network, the test also runs it to that end and checks the section is printed there. The existing tests that capture what an example prints, or the page a web example serves, now also check for the section. The device lines check of the TAC and native model lookups leaves out the section's links, which are indented as device lines are. These fail until the examples print the section, which the next commits add.
…letters (#120) `ShareUsage.found_evidence` merges the values of the web request, which the web integration adds as `server.http-request`, with every Evidence value in the Flow Data, so that a key found in both places is shared once with the Evidence value ([`share_usage.py` lines 432 to 458 at 32ffdcf](https://github.com/51Degrees/51degrees-python/blob/32ffdcf1205a5ce593fb55f5be733de5a18dffde/pipeline/fiftyone_pipeline_engines_fiftyone/src/fiftyone_pipeline_engines_fiftyone/share_usage.py#L432-L458)). It merged on the exact key. `webevidence` writes each header's key in lower case ([`web.py` line 91](https://github.com/51Degrees/51degrees-python/blob/32ffdcf1205a5ce593fb55f5be733de5a18dffde/pipeline/fiftyone_pipeline_core/src/fiftyone_pipeline_core/web.py#L91)), so a header an application added by hand in other letters, such as `header.User-Agent`, was found twice and both values were shared.
…s the Lite file (#124) [AGENTS.md](https://github.com/51Degrees/51degrees-python/blob/175ca4a/AGENTS.md) said the IP Intelligence on-premise `gettingstarted_console` "with no argument looks for the Asn file", shows registration values only once given the Lite file, and prints "This property is not present in the data file." for a property the file lacks. None of that is what the example does on `rc` at 175ca4a.
The creator context demo's exit message with no resource key named the environment variable only. It now gives a tagged link to the configuration page, where a resource key is created.
…gence cloud web example has none The IP Intelligence cloud web example logged nothing and raised an exception with no key. It now logs the message the cloud console examples log, with tagged links to the resource keys page and the configuration page, and returns.
…Find out more section The custom flow element example ends its page with the Build your own page, the Pipeline API documentation and this repository's pipeline folder. The usage sharing example prints the usage sharing documentation, the Pipeline API documentation and the pipeline folder last, and its expected output comment says the section follows. The 51Did example prints the 51Did page, its documentation, the 51Did inspector, the pipeline folder and the specifications repository after a successful run.
The mixed cloud console printed its section only after a run. Writing the section moves into GettingStartedConsole.print_find_out_more, which run still calls, and main now calls it too when there is no key and when the pipeline cannot be built, so each of the example's ends finishes with it.
Each example now lists its own links, the Device Detection page, the resource keys documentation and pricing for the cloud examples, the Device Detection page and where to ask about the Enterprise data file for the on-premise ones, then this repository's device-detection folder, and 51degrees-cxx where the example uses the native engine. ExampleUtils gains print_find_out_more, which writes the section in the form the mixed cloud console uses, a line of "=" then "Find out more:" then each label and link on a tab-indented line. The section is printed at every clean end. A cloud console prints it after its results, and from main when there is no resource key. An on-premise console prints it from main, so it follows the results or the message that no data file was found. The data file update example prints it whether it updated the file, had no licence key or was stopped before downloading. The CSV and profile metadata examples write it where their progress messages go, so JSON on standard output stays valid. The offline processing example prints it to the console, because its results go to a file. The web examples end their pages with the section and print it to the console when the server stops, and the cloud ones also when there is no resource key. The scripts, failuretomatch, performance and the getting started example in fiftyone_devicedetection, print it last.
Each example now lists its own links, the IP Intelligence page, the resource keys documentation and pricing for the cloud examples, the IP Intelligence page and where to ask about the Enterprise data file for the on-premise ones, then this repository's ip-intelligence folder, and 51degrees-cxx where the example uses the native engine. The mixed examples add the Device Detection page and folder. ExampleUtils gains print_find_out_more, which writes the section in the form the mixed cloud console uses, and get_find_out_more_html, which gives the same links as the end of a web example's page. Each console prints the section from main, which every clean end reaches, so it follows the results, the message that there is no resource key or no data file, the message that the data file lacks the properties the example needs, and the message that the device detection package is not installed. The data file update example prints it whether it updated the file, had no licence key or was stopped before downloading. The offline processing example writes its results as YAML on standard output, so it writes the section as YAML comments. The compare example's results go to a file, so it prints the section to the console. The web examples end their pages with the section. The on-premise one also prints it when the server stops. The cloud web example's handling of a missing resource key is left as it is, because another change replaces it.
Both cloud examples list the Geolocation page, the resource keys documentation, pricing and this repository's location folder. The getting started example prints the section last, after the result or after the message that there is no resource key. The web example prints it after that message, and ends its page with the same links. Its page is served by flask run, so there is no point at which the example could print the section when the server stops.
For [specifications#61](51Degrees/specifications#61), "Results and threads". [thread-safety.md, Element Data](https://github.com/51Degrees/specifications/blob/6570727d2af6967390d3c4fbec77b9cf0540d3f3/pipeline-specification/features/thread-safety.md#L59-L66), lines 59 to 66, says "Some Element Data writes into something it holds when it is read, such as an on-premise Engine's Aspect Data, which reads its values from native results that each read writes into. Such Element Data MUST let only one thread at a time read from its results, for example by holding a lock for each read". A native results instance is used by one thread at a time, because reading a value writes into it and the first read of a component can walk its graph.
The test of the location web example with no resource key failed to import it, because the web integration in fiftyone_pipeline_core imports Flask and location's test environment did not have it. The same lines are in the change that tests the examples no test ran.
The Find out more test runs location's web example with no resource key, and the example imports the web integration in fiftyone_pipeline_core, which imports Flask, which location's test environment did not have. The same four lines are in the changes that test the examples with no key and that test the examples no test ran.
…k out the reported IP address in one place (#129) Two smaller fixes from the list of deferred work for this release.
…eUtils, as the other IP Intelligence examples do
is_blank() follows .NET's Char.IsWhiteSpace, which is what the cloud checks. A blank value is dropped from the call and the page's transaction stays kept.
The derived property element now ignores a query.humanconfidence that is empty or only white space, using the same white space test as the Cloud Request Engine.
Adds _hidden() and uses it for verify and redeem error messages and bodies. Tests added.
Source after a redeem is whatever the cloud says (Passive/Active), we don't hardcode Active any more. Not redeemed -> Medium, no source. New HumanConfidenceClient in fiftyone_pipeline_did for hc/redeem outside a pipeline. No redirects followed anywhere we call the cloud. Example page always posts the sealed result back. 51Did client takes license_key, old licence_key kept with a deprecation warning. Live tests updated for the new sealing on staging. Co-authored-by: Ben Shillito <ben@51degrees.com>
jwrosewell
marked this pull request as draft
November 30, 2026 15:37
rc now has the cxx submodule and the SWIG wrappers generated again by #287, which give EngineHashSwig and EngineIpiSwig the static getPublishedTimeFromFile that get_date_published_from_file calls. Without them the free-threaded jobs at 1f4e47f raised "type object 'EngineHashSwig' has no attribute 'getPublishedTimeFromFile'" (and the same for EngineIpiSwig). The update service reports that as AUTO_UPDATE_UNKNOWN_ERROR, so both watcher tests failed. Free threading played no part, as those jobs run the tests with PYTHON_GIL=1 and are the only jobs that build the native modules on a pull request. The merge has no conflicts. The fiftyone_pipeline_engines tests pass on Python 3.14 apart from the ones that need the js_templates submodule.
Moves the cxx submodule from d25b009e to 163f9281, the head of 51degrees-cxx rc. That takes the fix for 51degrees-cxx issue 200, where a data file holding two header names that differ only in case left a component key without its header, and the first lookup then crashed.
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.
…rt (#289) Since #287 the Configure job of free-threaded-python.yml passed toJSON(secrets) to common-ci's prefetch_assets action. GitHub marks a workflow that hands every secret to a step as possibly malicious and holds each run for approval, as cloud-51did.yml already notes. Every run since then, on rc and on each pull request, has ended "action_required" with no jobs, so no free-threaded test has run since 25 November. The action is now handed '{}' as its secrets. The fetch reads only the data file license key, which already goes as license-key, and nothing the action exports from the secrets is used by the fetch. ci/free-threaded-python.Tests.ps1 gains a test that the workflow hands no step every secret. It fails against rc's workflow and passes here.
For the 4.6.2 release the cloud 51Did tests ask the staging cloud, as the Human Confidence tests already do. Workflows: - Cloud 51Did sets _51DEGREES_CLOUD_ENDPOINT from vars.CLOUD_STAGING_ENDPOINT in both steps, and fails, naming each one, when a key, the license key or the endpoint is empty. - Cloud Human Confidence sets _51DEGREES_LICENSE_KEY from secrets._51DEGREES_LICENSE_KEY_BESPOKE, a License Key valid for Human Confidence, and requires it. Tests: - test_did_client_live: a page's call that requested HumanConfidence and was handed the browser tests gets no 51Did on its first answer. The browser creator context tests then make the 51Did with _51DEGREES_LICENSE_KEY_51DID alone, naming the 51Did Properties, and check the context from the same and from another browser as before. - test_cloud_humanconfidence_web: the example's passive call presents the Resource Key, which is the browser's route, so it gets a sealed result. A server's call with the License Key, requesting HumanConfidence with the visitor's ja4, h2 and client-ip, gets High, Medium or Low and the source Passive, and without those three gets no value and a reason. Unknown is no longer taken as a level.
…rkflows read The Cloud 51Did workflow now gives CLOUD_STAGING_ENDPOINT as _51DEGREES_CLOUD_ENDPOINT, and the Cloud Human Confidence step requires _51DEGREES_LICENSE_KEY, so the key name tests allow the first and give the step the second.
TEST: Run the 51Did and Human Confidence cloud tests against staging
FIX: Load an updated data file only when it was published later
…iles BUILD: Name each fetched data file before the Python tests run
BUILD: Build against cxx 163f9281
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.
…it is Step 1 of the web example asks the cloud with the Resource Key alone, which is the browser's route, so the cloud seals HumanConfidence. The page still printed that sealed text in the Human Confidence column as if it were a level. The page now shows a level when it gets one and otherwise says it got a sealed value, and the row and comments say which key the call uses. Only a License Key valid for Human Confidence with the visitor's ja4, h2 and client-ip gets a level on the first call, and this example doesn't make that call. The example also pointed to a readme.md beside it that doesn't exist, so that line is gone. Tests cover both.
…human-confidence Send the sealed result and transaction, and read status and Human Confidence, in the 51Did client
Publish runs the whole test matrix again before it uploads, and uploads only when that run passes. A skip-tests input, off by default, passes through to the shared publish workflow so a release whose tests have already run on its release pull request can be uploaded without running them a second time.
BUILD: Let Publish skip the tests its release pull request ran
Since element data started going back to a pool on close, a reference kept after the flow data closed, for example in Flask g or for logging after the with block, could read the next visitor's results with no error. Before pooling, the same read raised that the results had been closed. Element data given back to a pool is now closed for reading, and the pool hands the next request a copy rather than the same object. So a kept reference raises when read and never sees another request's values, and the pool still saves making new instances. Device detection and IP intelligence give their old results closed message, and the other pooled types raise a new one in core saying the flow data has closed. Tests keep a reference, close, process a second request, and check the old reference raises while the new flow data reads its own values, for the core elements, the engines and both on-premise packages. The core readme now says a read after close raises.
…close BUG: Refuse a read of pooled element data after its flow data closes
jwrosewell
marked this pull request as ready for review
December 1, 2026 07:13
This was referenced Dec 1, 2026
Merged
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.
This pull request releases
rcintomainas 4.6.2. Every package this repository publishes moves to 4.6.2. It's the first 4.6 release. The six pipeline packages had 4.6.0 and 4.6.1 uploaded to PyPI in September 2026 and then yanked, so those two numbers aren't used.The cloud available properties test may fail in this pull request's checks, because the CI resource key doesn't yet include the new ServiceWorkers property.
Breaking changes
_51DEGREES_environment variable names are read. The old names are ignored (Stop reading the deprecated environment variable names #251).pickleandcopy.deepcopyrefuse it (Hold a built Pipeline's elements in collections that cannot be changed #184).FlowData.datais no longer a dict. Useflowdata.data.copy()for one (Keep a Flow Data's Element Data in a linked list, added with no lock #250).process()raises (Refuse writes to a finished Flow Data and to finished Element Data #247).ValueError. It also shares fewer cookies and query values than before (Share every query value by default, and no cookie but 51D_ ones #201, Share only 51D_ and listed query parameters when no list is given #218, Run usage sharing last and refuse a Pipeline that puts it elsewhere #245, Give the released missing property messages again, and share a parameter only when it starts with 51D_ or the Pipeline uses it #246).CloudRequestException(Discover the cloud Properties and Evidence keys when the Cloud Request Engine is built #147). Cloud requests time out after 2 seconds unlesstimeout_secondsis set (Give the cloud request engine's requests a timeout #177). Thecloudkey is deprecated in favor ofcloud-response(Read the cloud request engine's data under cloud-response #178).update_from_memoryraisesDataUpdateExceptionwhen the refresh fails, where it used to log it (Give the result of an update from memory to its caller alone #169). The engine cache key changed (Make the engine cache key the same for any evidence order or key case #182).Main changes
Thread safety
A Flow Data and its results aren't thread safe. Before this release it wasn't defined. Now the caller has to coordinate any use of one Flow Data or its results from more than one thread, for reads as well as writes (#241, #244). The on-premise packages are tested on free-threaded Python 3.13t and 3.14t (#243).
Warnings
The native code of the on-premise packages builds with
-Wall -Wextraon GCC and Clang and/W4on MSVC (#279). Warnings are errors only when_51DEGREES_WARNINGS_AS_ERRORSis true, which our own CI sets. A customer's build shows the warnings and doesn't fail on them.Closes #11. Closes #18. Closes #51. Closes #105. Closes #149. Closes #150. Closes #155. Closes #156. Closes #157. Closes #159. Closes #160. Closes #161. Closes #162. Closes #163. Closes #166. Closes #170. Closes #171. Closes #280.
All pull requests in this release
Every pull request merged into
rcafter the last release, #114, which mergedrcintomainat 2026-11-13 06:22:25 UTC, listed from GitHub's own data atrcd79e0e6. Each entry gives the number, title and merge date, the folders it changed with their file counts in brackets, and the test files it changed with their test counts.Show the list
144 pull requests merged into rc after 2026-11-13T06:22:25Z, oldest first.