Skip to content

Fix enabling fsspec disabling URL read mode and ActionJsonnet.parse failing with a Path - #1017

Merged
mauvilsa merged 1 commit into
mainfrom
fix-read-mode-and-jsonnet-path
Oct 16, 2026
Merged

mauvilsa merged 1 commit into
mainfrom
fix-read-mode-and-jsonnet-path

Conversation

@mauvilsa

Copy link
Copy Markdown
Owner

What does this PR do?

Fixes two bugs:

  • set_parsing_settings given only one of config_read_mode_urls_enabled or config_read_mode_fsspec_enabled silently disabled the other mode if it had been enabled earlier, e.g. enabling fsspec after URLs changed the read mode from fur to fsr. Now a setting that isn't given is left as it is.
  • ActionJsonnet.parse given a Path failed with TypeError: 'Path' object is not callable, because it still called Path like a function, which is no longer supported.

Fixing the first bug exposed tests that left URL or fsspec read mode enabled for the tests that ran after them. The patch_parsing_settings test helper now also restores the read mode, and the fsspec secrets fixture disables fsspec when it is done.

Before submitting

  • Did you read the contributing guideline?
  • If you used a coding agent, did you fully understand and validate all generated code and ensure it follows the contributing guidelines?
  • [n/a] Did you update the documentation? (readme and public docstrings)
  • Did you write unit tests such that there is 100% coverage on related code? (required for bug fixes and new features)
  • Did you verify that new and existing tests pass locally?
  • If this is a bug fix, did you verify that the tests fail without the code fix?
  • Did you make sure that all changes preserve backward compatibility?
  • Did you update the CHANGELOG including a pull request link? (not for typos, docs, test updates, or minor internal changes/refactors)

@mauvilsa mauvilsa added the bug Something isn't working label Oct 16, 2026
Comment thread jsonargparse_tests/test_jsonnet.py Dismissed
@mauvilsa
mauvilsa deployed to sonarcloud October 16, 2026 07:52 — with GitHub Actions Active
@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (908e7b9) to head (325aac6).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1017   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           27        27           
  Lines         9845      9844    -1     
=========================================
- Hits          9845      9844    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@sonarqubecloud

Copy link
Copy Markdown

@greptile-apps

greptile-apps Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect two bounded library workflows.

The fixes appear safe to merge, with a non-blocking cleanup improvement for the new regression test.

Findings

  1. P2 Failed test leaves modes enabled ▶

Summary

Fixes two parsing bugs:

  • Config read modes can be changed independently.
  • Jsonnet parsing accepts a Path object for its file input.

Adds regression tests and improves cleanup of read modes between tests. One non-blocking test-isolation issue remains: the new combined-mode test skips cleanup if an assertion fails.

Reviews (1) · Last reviewed commit: "Fix enabling fsspec disabling URL read m..." · Reviewed by Greptile

Comment thread jsonargparse_tests/test_optionals.py
@mauvilsa
mauvilsa merged commit d12f48f into main Oct 16, 2026
36 checks passed
@mauvilsa
mauvilsa deleted the fix-read-mode-and-jsonnet-path branch October 16, 2026 08:01

This branch was successfully deployed

1 active deployment
sonarcloud — 325aac60 Deployed Oct 16, 2026 by mauvilsa via sonarcloud #980
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants