Skip to content

Remove support for schemas that are loaded from a URL (breaking) - #412

Open
ATorrise wants to merge 4 commits into
mainfrom
fix/drop-schema-web-loading
Open

Remove support for schemas that are loaded from a URL (breaking)#412
ATorrise wants to merge 4 commits into
mainfrom
fix/drop-schema-web-loading

Conversation

@ATorrise

@ATorrise ATorrise commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What It Does
Removes support for loading a JSON schema from a remote http(s):// URL via a config file's $schema property.

  • validate_config_json (used during profile loading) now raises a ValueError if $schema is an http(s):// URL, telling the user to use a local file path instead.
  • ConfigFile.schema_list (used by get_env) now returns an empty list and logs/warns instead of making a network request for a remote $schema URL.

Only local schema files (absolute path, relative path, or file://) are supported now.

How to Test
run the new tests and make sure they pass

Review Checklist
I certify that I have:

  • updated the changelog
  • manually tested my changes
  • added/updated automated unit/integration tests
  • created/ran system tests (provide build number if applicable)
  • followed the contribution guidelines

Additional Comments
Breaking! Cases where $schema points at a remote url now fail instead of silently succeeding

Signed-off-by: ATorrise <ambertorrise@gmail.com>
@github-project-automation github-project-automation Bot moved this to New Issues in Zowe CLI Squad Aug 7, 2026
@zowe-robot zowe-robot moved this from New Issues to Review/QA in Zowe CLI Squad Aug 7, 2026
@ATorrise
ATorrise requested review from t1m0thyj and zFernand0 August 7, 2026 19:17
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.36%. Comparing base (91f8021) to head (c145921).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #412      +/-   ##
==========================================
+ Coverage   83.06%   83.36%   +0.29%     
==========================================
  Files          49       49              
  Lines        2982     2975       -7     
==========================================
+ Hits         2477     2480       +3     
+ Misses        505      495      -10     
Flag Coverage Δ
unittests 83.36% <100.00%> (+0.29%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Amber Torrise <112635587+ATorrise@users.noreply.github.com>
@ATorrise ATorrise changed the title Removed support for loading JSON schemas from remote URLs Removed support schemas that are loaded from a URL Aug 10, 2026
@ATorrise ATorrise changed the title Removed support schemas that are loaded from a URL Removed support schemas that are loaded from a URL (breaking) Aug 10, 2026
@ATorrise ATorrise changed the title Removed support schemas that are loaded from a URL (breaking) Remove support schemas that are loaded from a URL (breaking) Aug 10, 2026
@ATorrise ATorrise changed the title Remove support schemas that are loaded from a URL (breaking) Remove support for schemas that are loaded from a URL (breaking) Aug 10, 2026

@zFernand0 zFernand0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 😋

I do have one small request about raising the error.
Feel free to get other developer's opinion on this.

Comment thread CHANGELOG.md Outdated
return []
# remote schema loading is not supported
if not self.__suppress_config_file_warnings:
warnings.warn(f"Loading a JSON schema from a remote URL is not supported: {schema}")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We seem to be using this same string in multiple paces... wondering if we could move it somewhere else and reuse it.

if not self.__suppress_config_file_warnings:
warnings.warn(f"Loading a JSON schema from a remote URL is not supported: {schema}")
self.__logger.warning(f"Loading a JSON schema from a remote URL is not supported: {schema}")
return []

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be raising the error regardless.

Right now, the only place that's calling the schema_list function is inside the get_env function, which is only called when the user specifies that they want to override_with_env.

If we return an empty list here, the developer/user may not realize that their environment variables were not loaded because the schema comes from a URL. This leads to unexpected behavior.

Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
@zFernand0 zFernand0 self-assigned this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review/QA

Development

Successfully merging this pull request may close these issues.

3 participants