Skip to content

Accept None ConfigStore nodes and skip hydra-core bridge in plugin scan - #87

Merged
python-templates-automerge[bot] merged 2 commits into
mainfrom
store-none-node
Nov 10, 2026
Merged

python-templates-automerge[bot] merged 2 commits into
mainfrom
store-none-node

Conversation

@timkpaine

Copy link
Copy Markdown
Member

Description

Two gaps found while running lerna without hydra-core (nbprint in Pyodide, and ccflow with Point72/ccflow#182):

  • ConfigStore.store(node=None) raised ValueError: Input cfg is not an OmegaConf config object on omegaconf 2.4, where OmegaConf.structured(None) returns None instead of a None-valued DictConfig. hydra-core accepts node=None, and lerna's own hydra-core bridge plugin calls it that way.
  • Lerna's plugin scanner imported hydra_plugins.lerna, the bridge that lets hydra-core find plugins registered for lerna. Lerna reads those entry points itself, and without hydra-core installed every scan printed Error importing 'hydra_plugins.lerna'. The scanner now skips it.

Both new tests pass on omegaconf 2.3 with hydra-core and on omegaconf 2.4 without it, and each fails with its fix reverted. The rest of the suite matches main locally.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup
  • CI / build configuration
  • Other (describe below)

Checklist

  • Linting passes (make lint)
  • Tests pass (make test)
  • New tests added for new functionality
  • Documentation updated (if applicable)
  • Changelog / version bump (if applicable)

hydra-core accepts node=None, and lerna's hydra-core bridge plugin relies on it. With omegaconf 2.4, OmegaConf.structured(None) returns None rather than a None-valued DictConfig, so passing it to to_container raised ValueError.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
hydra_plugins.lerna exists so hydra-core can find plugins registered for lerna. Lerna reads those entry points itself, and importing the bridge without hydra-core installed printed an import error on every plugin scan.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

3 329 tests  +2   3 117 ✅ +2   3m 44s ⏱️ - 2m 18s
    2 suites ±0     212 💤 ±0 
    2 files   ±0       0 ❌ ±0 

Results for commit c0db9cd. ± Comparison against base commit 93ad701.

@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lerna/core/plugins.py 66.66% 1 Missing ⚠️
Files with missing lines Coverage Δ
lerna/core/config_store.py 52.67% <100.00%> (ø)
lerna/tests/test_config_repository.py 100.00% <100.00%> (ø)
lerna/tests/test_plugin_interface.py 97.89% <100.00%> (+0.27%) ⬆️
lerna/core/plugins.py 56.46% <66.66%> (+0.13%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timkpaine timkpaine added the tag: automerge Automatically merge this PR when status checks pass label Nov 10, 2026
@python-templates-automerge
python-templates-automerge Bot merged commit 1c722d4 into main Nov 10, 2026
7 checks passed
@python-templates-automerge
python-templates-automerge Bot deleted the store-none-node branch November 10, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tag: automerge Automatically merge this PR when status checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant