Repository navigation
BUILD: Say when no staging test ran, and run the staging tests for the files they use - #278
Merged
Merged
Conversation
…e files they use pytest exits 5 when it selects no test, so the Cloud Human Confidence step stopped on that exit code with no message, and its check of the junit report for a run with no tests could never be reached. The step now writes "No staging test ran" when pytest exits 5, and the unreachable check is gone. The Pester stand-in for pytest now takes the exit code to give, and gives 5 in the case where no test ran. A new case checks that a failed test fails the step with pytest's own exit code. The workflow's pull_request paths now also cover the files the staging tests import, tests/live_cloud.py and example_utils.py, and the files the install step uses, the examples' pyproject.toml, ci/write-package-versions.ps1 and ci/packages.ps1. A pull request that changes only one of those now runs the staging tests as well.
cloud-human-confidence.yml runs for a pull request that changes one of its pull_request paths. A new case in ci/key-names.Tests.ps1 reads those paths and checks that each one without a wildcard is a file in the checkout. The paths now include ci/packages.json, which the install step reads through ci/write-package-versions.ps1.
jwrosewell
marked this pull request as ready for review
November 24, 2026 02:04
This was referenced Nov 24, 2026
Draft
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 follows #277, which moved the two Human Confidence source tests to the staging cloud and merged into rc as ebfffba. A review of #277 at its last head, cbf04fe, raised the points below, and #277 merged before they were made there.
What changes
.github/workflows/cloud-human-confidence.ymlstopped on that exit code with no message, so its check of the junit report for a run with no tests could never be reached. The step now writesNo staging test ranwhen pytest exits 5, and the unreachable check is gone. Inci/key-names.Tests.ps1the stand-in for pytest now takes the exit code to give, and gives 5 in the case where no test ran. A new case checks that a failed test fails the step with pytest's own exit code.pull_requestpaths now also cover the files the staging tests import,examples/tests/live_cloud.pyandexamples/src/fiftyone_pipeline_examples/example_utils.py, and the files the install step uses, the examples'pyproject.toml,ci/write-package-versions.ps1,ci/packages.ps1andci/packages.json. Before, a pull request that changed only one of those did not run the staging tests.ci/key-names.Tests.ps1, under "The cloud tests", reads the workflow'spull_requestpaths and checks that each one without a wildcard is a file in the checkout.What #271 and #274 need
#271 (head 8357555) and #274 (head 34ea559, stacked on #271's branch) each conflict with rc in
pipeline/fiftyone_pipeline_cloudrequestengine/examples/tests/test_cloud_humanconfidence_web.pyand nowhere else, checked withgit merge-treeagainst rc at ebfffba. #277 merged first, so when they are brought up to date with rc they must do the following. This pull request does not touch their branches.naming_the_propertiesreturns, merged with Human Confidence web example in client side and server side modes #271's change to that fixture to match an address ending in?. Human Confidence web example in client side and server side modes #271'stest_passive_level_comes_from_the_cloudandtest_a_basic_key_gets_a_passive_levelcan stay beside them on production, because they accept Unknown and check no source.test_cloud_humanconfidence_web_offline.pycalls the Basic test directly to check its skip message. On rc it callstest_a_basic_key_gets_no_source, and in Human Confidence web example in client side and server side modes #271 and FIX: Redeem a sealed Human Confidence value in the cloud request engine #274 it callstest_a_basic_key_gets_a_passive_level, so after the merge it must call one that still exists.staging, and run on a client built from the staging names, every test that reaches the Human Confidence redeem or expects HumanConfidenceSource. Those are the License Key test while it posts a value to the cloud (to/redeemin Human Confidence web example in client side and server side modes #271, and throughpost_unsealedto/activein FIX: Redeem a sealed Human Confidence value in the cloud request engine #274), FIX: Redeem a sealed Human Confidence value in the cloud request engine #274'stest_a_value_that_does_not_redeem_gives_active_low, and both tests in FIX: Redeem a sealed Human Confidence value in the cloud request engine #274'spipeline/fiftyone_pipeline_cloudrequestengine/tests/test_human_confidence_live.py. Against production these expect a source that the production cloud does not serve yet.test_a_request_without_a_sealed_value_gives_a_passive_level, the package test that expects the source Passive, do all of these.stagingand register the marker inpipeline/fiftyone_pipeline_cloudrequestengine/tests/conftest.py, whosepytest_configureregisters onlylive.CLOUD_STAGING_ENDPOINT(ascloud_endpoint) andRESOURCE_KEY_BESPOKE_STAGING, never from_51DEGREES_CLOUD_ENDPOINTor a default address, and skip naming the variable when either is not set.requested_propertiesofderived.humanconfidence,derived.humanconfidencesource. The staging Bespoke key'saccessiblepropertieslists HumanConfidence underderivedand not HumanConfidenceSource. Through rc's engine with that key and no requested properties, the staging cloud'sderivedheld onlyhumanconfidence, and with the two properties named it heldhumanconfidencesourceas well, so without them the test fails on staging. The example tests name the same two properties throughnaming_the_properties._51DEGREES_LICENSE_KEY_BESPOKE. The class it is in skips without that License Key, the passive call needs none, and the workflow sets no License Key and fails on a skipped test.-m stagingrun ofpipeline/fiftyone_pipeline_cloudrequestengine/teststo.github/workflows/cloud-human-confidence.yml, with the same checks for an empty name, a skipped test and a run that selects no test, and add that folder to the workflow'spull_requestpaths. This pull request does not add that run now, because that folder has no staging test yet and pytest exits 5 when it selects none, so the run would fail every time.test_a_sealed_value_that_does_not_redeem_gives_low_and_activein the package file and the two example tests in item 3. Until that is decided they cannot run in the staging workflow.If #274 merges before this pull request, this one is brought up to date with it and the exit code 5 check goes into each run of the step.
How it was checked
Run locally on Windows with Python 3.12 in a virtual environment, with the packages installed editable after
ci/write-package-versions.ps1. The names were set in the process environment only.pipeline/fiftyone_pipeline_cloudrequestengine/exampleswithCLOUD_STAGING_ENDPOINT,RESOURCE_KEY_BESPOKE_STAGINGand_51DEGREES_RESOURCE_KEY_BASICset,python -m pytest -m staging -v -rsgave 2 passed, 112 deselected.no tests ran, and the step wrote::error::No staging test ran.and exited 1.ci/key-names.Tests.ps1andci/check-environment-variable-names.Tests.ps1gave 227 passed, 0 failed, with all 7 cases of the Cloud Human Confidence step passing../ci/check-environment-variable-names.ps1passed.ci/*.Tests.ps1together gave 446 passed and 1 failed. The failure isThe integration test step as common-ci runs itinci/common-ci-options.Tests.ps1, which lays out a common-ci checkout that has its ownpythonfolder and puts this repository inside it under its folder name. The local clone's folder is namedpython, so./python/ci/run-integration-tests.ps1was not found. That file is unchanged here, and on GitHub the checkout folder is named51degrees-python.accessiblepropertiesand two requests through rc's engine with that key, one with no requested properties and one naming the two properties, as described there.ci/key-names.Tests.ps1alone, Pester 6.2.0 on Windows, at the second commit: 148 passed, 0 failed. Withci/packages.jsonwritten under another name in the workflow, the new case failed, and it passes on the real file.