Repository navigation
chore: Remove unused caching path from get_url_retrieve - #4663
Merged
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Follow-up to #4662. That PR moved schema-cache metadata handling into
cfnlint.schema.manager(viaget_url_metadata/save_metadata), deferring the ETag write until after a successful install. The manager is the only caller ofget_url_retrieveand no longer passescaching=True, so that branch is now dead code.Change
cachingparameter and the metadata-save branch fromget_url_retrieve— it's now just the retry-wrapped download.get_url_metadata: it returns updated metadata without persisting it, and returnsNonewhen the response has no ETag.get_url_retrieveitself 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 passedhelpers.py+manager.py: no issues