Repository navigation
Test location's built packages before a publish without the editable copies - #112
Merged
Merged
Conversation
…copies
The publish's Test job runs each package's tox pre-publish environment
against the packages just built, listed in package/pre-publish-requirements.txt.
location/tox.ini built that environment from {[testenv]deps}, which since the
packages started testing against this checkout also holds editable copies of
the pipeline packages. pip will not install a built and an editable copy of
the same package together, so location's pre-publish stopped with
ResolutionImpossible and every Test job of the publish failed.
The other products keep their test tools in a [common] section and build
pre-publish from that alone. location now does the same, and its py
environment is unchanged.
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.
Problem
The release merged into
mainas #67 (6b789d7), but its Publish run 43331052911 failed and pushed nothing to PyPI, so no Python package from that release is out. Package was skipped, and every Test job failed in the same place, for example Test - Ubuntu_Python_3.12. Location's toxpre-publishenvironment asked pip to install both the built packages and editable copies of the same pipeline packages, and pip refused.The pipeline, device detection and IP Intelligence
pre-publishenvironments passed in the same jobs.Cause
location/tox.ini builds
[testenv:pre-publish]from{[testenv]deps}. Since #41 (081386d),[testenv]depsalso holds editable copies of the pipeline packages from this checkout, so those copies reachedpre-publishtoo. Every other product keeps its test tools in a[common]section and buildspre-publishfrom{[common]deps}and the requirements file alone, for example fiftyone_devicedetection_cloud/tox.ini lines 4 to 7 and lines 34 to 38. Location is the onlytox.iniin the repository whosepre-publishtakes{[testenv]deps}.The pull request builds never run
pre-publish, which is why the release build of #67 was green. Common-ci's python/run-integration-tests.ps1 pickspyin a "Build and Test" job andpre-publishotherwise (line 50), and it writespackage/pre-publish-requirements.txtonly in the publish's Test job (line 18). Location's onlypre-publishset-up is thistox.ini, as location/ci/run-integration-tests.ps1 runs common-ci's script with-Packages ..Change
location/tox.ini now has the same
[common]section as the other products. Itspyenvironment takes{[common]deps}with the same editable copies as before, so the pull request builds are unchanged.pre-publishtakes{[common]deps}with the built packages from the requirements file, and nothing else. No package code changes.Publish dry runs, red then green
A dry run of this repository's Publish workflow (
gh workflow run publish.yml --ref <branch> -f dryrun=true) runs the same Configure, Build and Test jobs as the real publish. Its Package job runs withDryRunset, so nothing is uploaded to PyPI. Its Test job reaches the same step, "Run Integration Tests", which runstox -e pre-publishfor each product.On a branch, the Test job runs only the products changed since the merge base with
main(Get-AffectedProductsin ci/packages.ps1), whilst the publish onmainruns every product. So the fix has two green runs, one on this draft's head and one that runs every product asmaindoes.tmp/py-publish-redatrc822f9009 with no fixtmp/py-publish-green-allat df6e088f, the head plus one newline at the end of README.mdThe red run is the failure on
mainagain.rcat 822f900 has the same tree asmainat 6b789d7, so its Test job ran every product, asmaindoes. In each of the 15 Test jobs (Ubuntu, Windows and macOS, Python 3.10 to 3.14) sixpre-publishenvironments passed and location's failed with the sameResolutionImpossible, and the step ended "run-integration-tests failed for: location", for example Test - Ubuntu_Python_3.12.On this draft's head, location's
pre-publishinstallspytest-cov 'pytest>=6' -r ../../package/pre-publish-requirements.txtand passes in all 15 Test jobs, for example Test - Ubuntu_Python_3.12. README.md sits outside every product, so the run with that one extra newline tested all four products with the fix, and all sevenpre-publishenvironments passed in each of its 15 Test jobs, for example Test - Ubuntu_Python_3.12. That newline is only on the throwaway branch and is not part of this draft.Full build
Run 43344967076, started by
tools/pr-matrix.pyontmp/pr-matrix-112at f080942, which merges this head intorcat 822f900, finished with success. Configure printed "Left out 5 macOS entries", and all ten Build and Test jobs (Ubuntu and Windows, Python 3.10 to 3.14) passed, each loggingSetting 'PullRequestSha' to '7b195dbcd3255e67c20ba98ab4685cde865a6dfb', this draft's head. Those jobs run thepyenvironment, which this change leaves as it was.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 remains
rc.rcintomain, and a Publish onmainonce that merges. The release plan in the red dry run's Configure job moves patch numbers only (for examplefiftyone_location4.5.9 to 4.5.10), and the weekly release check reported "The weekly release rule is not enforced, as WEEKLY_RELEASES_FROM is not set."tmp/py-publish-redandtmp/py-publish-green-allare deleted once review has finished with these runs. Their runs stay readable after that.