Repository navigation
BUILD: Call the staging cloud from the cloud tests until production has the release - #299
Draft
jwrosewell wants to merge 1 commit into
Draft
jwrosewell wants to merge 1 commit into
jwrosewell wants to merge 1 commit into
Conversation
…as the release The device detection cloud test test_available_properties reads the property list from the day's data file, which now holds ServiceWorkers. The production cloud does not offer that property yet, so the test fails with "Property: serviceworkers is not present in the results". ci/run-integration-tests.ps1 now gives every cloud test the staging cloud when CLOUD_STAGING_ENDPOINT is set, as _51DEGREES_CLOUD_ENDPOINT, and puts that name back afterwards, also when the step fails, because common-ci runs the later steps in the same process. It says which cloud the tests call. The tests keep _51DEGREES_RESOURCE_KEY_BESPOKE, which the staging cloud knows and which carries every product they ask for. RESOURCE_KEY_BESPOKE_STAGING carries no hardware product on the staging cloud, so with it the TAC and native model lookup example tests fail with "The resource key in _51DEGREES_RESOURCE_KEY_BESPOKE does not include HardwarePlatform.Profiles, which the TAC lookup needs." ci/key-names.Tests.ps1 checks the switch with the name set and not set, that the endpoint is put back after the step, when it fails and when it was not set before, that the Bespoke key is left as it is, and that no other CI script reads CLOUD_STAGING_ENDPOINT and none reads RESOURCE_KEY_BESPOKE_STAGING. AGENTS.md and pipeline/ci/README.md say the same.
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.
Why
The device detection cloud test
test_available_propertiesreads its property list from the header of the day's data file, which now holds ServiceWorkers. The production cloud does not offer ServiceWorkers yet, so the test fails withException: Property: serviceworkers is not present in the results.(an example from today). The cloud release that adds the property reaches the staging cloud first, so the cloud integration tests call the staging cloud until production has that release.What changes
ci/run-integration-tests.ps1, the integration test step that common-ci calls in the Build and Test jobs of its pull request and publish workflows, gives every cloud test the staging cloud whenCLOUD_STAGING_ENDPOINTis set, as_51DEGREES_CLOUD_ENDPOINT. That covers the device detection, IP Intelligence, location and pipeline cloud tests, because they all read that name. It puts the name back afterwards, also when the step fails, because common-ci runs the later steps in the same process, and it says which cloud the tests call._51DEGREES_RESOURCE_KEY_BESPOKE, which the staging cloud knows and which carries every product they ask for.RESOURCE_KEY_BESPOKE_STAGINGcarries no hardware product on the staging cloud, so with it the TAC and native model lookup example tests fail withThe resource key in _51DEGREES_RESOURCE_KEY_BESPOKE does not include HardwarePlatform.Profiles, which the TAC lookup needs.It also lacksIsGdprand the sevenGeoNameIdproperties of the IP product (ContinentGeoNameId,CountryGeoNameId,CountyGeoNameId,RegisteredCountryGeoNameId,StateGeoNameId,StateGeoNameIdsGeographicalandTownGeoNameId), which the Bespoke key carries.ci/key-names.Tests.ps1checks the switch with the name set and not set, that the endpoint is put back after the step, when it fails and when it was not set before, that the Bespoke key is left as it is, and that no other CI script readsCLOUD_STAGING_ENDPOINTand none readsRESOURCE_KEY_BESPOKE_STAGING. The existing checks that only the Cloud Human Confidence and Cloud 51Did workflows give the staging names are unchanged.AGENTS.mdandpipeline/ci/README.mdsay the same.What is still missing before the tests call staging in CI
CLOUD_STAGING_ENDPOINTdoes not reach the Build and Test jobs today, so until it does this change only printsCLOUD_STAGING_ENDPOINT is not set, so the cloud tests call the cloud _51DEGREES_CLOUD_ENDPOINT names.and the tests run against production as they do now.common-ci's main (b372b34) exports to those jobs only
_51DEGREES_names, its own CI secrets and the secrets a repository lists in its ownci/ci-secrets.psd1.CLOUD_STAGING_ENDPOINTis an organization variable, not a secret, andsteps/export-secrets.ps1stops the job when a listed name is not one of the job's secrets, so the variable cannot be listed either. This morning's rc build exported_51DEGREES_CLOUD_ENDPOINTand no other variable. common-ci needs a way for a repository to name an organization variable its scripts read, asci/ci-secrets.psd1names a secret.Proof
In the CI script tests of this pull request, 519 tests passed on Ubuntu and on Windows, the five new ones among them, and the environment variable name check passed.
Each new test was also run against three broken versions of the script, and each version made at least two of the new tests fail. The three versions were the script as it is on rc, the script without the step that puts the endpoint back, and the script with the staging key given to the tests.
Local runs on 1 December 2026, with the header of that day's TAC CSV, which lists ServiceWorkers, as
tests/51Degrees.csv, and the packages installed from this branch:fiftyone_devicedetection_cloud/tests/test_properties.pytest_available_propertiesfails,serviceworkers is not present in the results, as in CIfiftyone_devicedetection_cloud/teststest_available_properties, the same wayfiftyone_devicedetection_examples/tests/test_cloudexamples.pyfiftyone_devicedetection_examples/tests/test_cloudexamples.pyRESOURCE_KEY_BESPOKE_STAGINGHardwarePlatform.Profilesfiftyone_devicedetection_examples/tests -k cloudlocation/testsfiftyone_pipeline_cloudrequestengine/testsfiftyone_pipeline_cloudrequestengine/examples/testsstagingskipped, as they do in the shared integration testsThe IP Intelligence example tests were not run locally, as they need the on-premise package built.
What is still to come is
test_available_propertiespassing against the staging cloud once it has the release. At 15:08 UTC on 1 December 2026 the staging cloud still answered as4.4.57-rc.6, and neither Bespoke key's device product listed ServiceWorkers.How to undo
Revert the commit. Once the production cloud has the release, the same lines come out by hand: the staging block in
ci/run-integration-tests.ps1, theThe root run-integration-tests.ps1block and the staging check underThe CI scriptsinci/key-names.Tests.ps1, and the staging paragraphs inAGENTS.mdandpipeline/ci/README.md.No version changes.