Skip to content

Test location's built packages before a publish without the editable copies - #112

Merged
jwrosewell merged 1 commit into
rcfrom
fix/location-pre-publish
Nov 13, 2026
Merged

jwrosewell merged 1 commit into
rcfrom
fix/location-pre-publish

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The release merged into main as #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 tox pre-publish environment asked pip to install both the built packages and editable copies of the same pipeline packages, and pip refused.

pre-publish: install_deps> python -I -m pip install pytest-cov 'pytest>=6' -e .../pipeline/fiftyone_pipeline_cloudrequestengine -e .../pipeline/fiftyone_pipeline_core ...
ERROR: Cannot install fiftyone-pipeline-cloudrequestengine 4.5.44 (from .../package/fiftyone_pipeline_cloudrequestengine-4.5.44.tar.gz) and fiftyone-pipeline-cloudrequestengine 4.5.44 (from editable .../pipeline/fiftyone_pipeline_cloudrequestengine) ...
ERROR: ResolutionImpossible
pre-publish: FAIL code 1
location: Cannot find path '.../location/.coverage' because it does not exist.
run-integration-tests failed for: location

The pipeline, device detection and IP Intelligence pre-publish environments passed in the same jobs.

Cause

location/tox.ini builds [testenv:pre-publish] from {[testenv]deps}. Since #41 (081386d), [testenv]deps also holds editable copies of the pipeline packages from this checkout, so those copies reached pre-publish too. Every other product keeps its test tools in a [common] section and builds pre-publish from {[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 only tox.ini in the repository whose pre-publish takes {[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 picks py in a "Build and Test" job and pre-publish otherwise (line 50), and it writes package/pre-publish-requirements.txt only in the publish's Test job (line 18). Location's only pre-publish set-up is this tox.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. Its py environment takes {[common]deps} with the same editable copies as before, so the pull request builds are unchanged. pre-publish takes {[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 with DryRun set, so nothing is uploaded to PyPI. Its Test job reaches the same step, "Run Integration Tests", which runs tox -e pre-publish for each product.

On a branch, the Test job runs only the products changed since the merge base with main (Get-AffectedProducts in ci/packages.ps1), whilst the publish on main runs every product. So the fix has two green runs, one on this draft's head and one that runs every product as main does.

Run Branch and commit Products tested Result
Red 43344482188, tmp/py-publish-red at rc 822f9009 with no fix all four failure. All 15 Test jobs failed for location only, Package skipped
Green, this head 43344492123, this draft's head 7b195dbc location success. All 15 Test jobs passed, Package passed with nothing uploaded
Green, every product 43348274102, tmp/py-publish-green-all at df6e088f, the head plus one newline at the end of README.md all four success. All 15 Test jobs passed, Package passed with nothing uploaded

The red run is the failure on main again. rc at 822f900 has the same tree as main at 6b789d7, so its Test job ran every product, as main does. In each of the 15 Test jobs (Ubuntu, Windows and macOS, Python 3.10 to 3.14) six pre-publish environments passed and location's failed with the same ResolutionImpossible, 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-publish installs pytest-cov 'pytest>=6' -r ../../package/pre-publish-requirements.txt and 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 seven pre-publish environments 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.py on tmp/pr-matrix-112 at f080942, which merges this head into rc at 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 logging Setting 'PullRequestSha' to '7b195dbcd3255e67c20ba98ab4685cde865a6dfb', this draft's head. Those jobs run the py environment, 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

  1. Review, then merge into rc.
  2. A release draft from rc into main, and a Publish on main once that merges. The release plan in the red dry run's Configure job moves patch numbers only (for example fiftyone_location 4.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."
  3. The throwaway branches tmp/py-publish-red and tmp/py-publish-green-all are deleted once review has finished with these runs. Their runs stay readable after that.

…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.
@jwrosewell
jwrosewell marked this pull request as ready for review November 13, 2026 03:59
@jwrosewell
jwrosewell merged commit 55e486a into rc Nov 13, 2026
38 checks passed
@jwrosewell
jwrosewell deleted the fix/location-pre-publish branch November 13, 2026 04:00
@jwrosewell jwrosewell mentioned this pull request Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant