Skip to content

chore: Remove unused caching path from get_url_retrieve - #4663

Merged
kddejong merged 1 commit into
mainfrom
chore/remove-unused-get-url-retrieve-caching
Aug 28, 2026
Merged

kddejong merged 1 commit into
mainfrom
chore/remove-unused-get-url-retrieve-caching

Conversation

@kddejong

Copy link
Copy Markdown
Contributor

Context

Follow-up to #4662. That PR moved schema-cache metadata handling into cfnlint.schema.manager (via get_url_metadata/save_metadata), deferring the ETag write until after a successful install. The manager is the only caller of get_url_retrieve and no longer passes caching=True, so that branch is now dead code.

Change

  • Drop the caching parameter and the metadata-save branch from get_url_retrieve — it's now just the retry-wrapped download.
  • Replace the two obsolete cached-retrieve tests with direct coverage of get_url_metadata: it returns updated metadata without persisting it, and returns None when the response has no ETag.

get_url_retrieve itself is retained (the manager still uses it for the retry download); only the unused caching capability is removed.

Validation

  • test/unit/module/helpers/test_get_url_retrieve.py + test/unit/module/schema/test_manager.py: 48 passed
  • ruff check + format, isort: clean
  • mypy on helpers.py + manager.py: no issues

After #4662, cfnlint.schema.manager handles schema-cache metadata itself
via get_url_metadata/save_metadata, deferring the ETag write until after
a successful install. The manager is the only caller of get_url_retrieve
and no longer passes caching=True, leaving that branch dead.

Drop the caching parameter and its metadata handling so get_url_retrieve
is just the retry-wrapped download. Replace the obsolete cached-retrieve
tests with direct coverage of get_url_metadata (returns updated metadata
without persisting it, and returns None when no ETag is present).
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.62%. Comparing base (2393150) to head (4a4749e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4663      +/-   ##
==========================================
+ Coverage   94.61%   94.62%   +0.01%     
==========================================
  Files         432      432              
  Lines       15451    15448       -3     
  Branches     2996     2995       -1     
==========================================
- Hits        14619    14618       -1     
+ Misses        454      453       -1     
+ Partials      378      377       -1     
Flag Coverage Δ
unittests 94.62% <100.00%> (+0.01%) ⬆️

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.

@kddejong
kddejong merged commit de755aa into main Aug 28, 2026
29 checks passed
@kddejong
kddejong deleted the chore/remove-unused-get-url-retrieve-caching branch August 28, 2026 22:48
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