-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Introduce MetadataValidators to test arbitrary metadata for freshness. #15692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
60b4089
Introduce MetadataValidators to test arbitrary metadata for freshness.
bnw 673070b
Added trailing newline
bnw ab39129
Added new parameter to interface
bnw 9546be9
Renamed ResourceValidator to ResourceInterfaceValidator
bnw 0342b73
Added missing import
bnw 7aee891
Correcting classname after renaming
bnw df526c0
Added ConfigCachePass to framework
bnw 2555d5a
Fixed UnitTests
bnw 4145dc0
Bugfix
bnw 2e49fb2
Better name
bnw d0f1e2d
Fix test
mpdude 3f9424f
Add docblock
mpdude b8bb60a
Fix tests while keeping ConfigCacheFactory unchanged (from a client p…
mpdude 2fac8f3
Hello Fabbot
mpdude 1b62130
Forgot import statement
mpdude b16d9de
The new ConfigCachePass is required
mpdude 97a2cd0
Bump deps
mpdude aae0a78
Avoid changing the interface
mpdude 024aa8c
Also validate this method in the interface
mpdude d617943
Rename ResourceInterfaceValidator to ResourceValidator as suggested o…
mpdude 8907a21
Oh Fabbot
mpdude e471890
Add a note why the ResourceInterface::__toString method is important …
mpdude e9fd197
Remove totally broken test
mpdude 53ad659
Rewrite ConfigCacheTest because it made many assumptions about how th…
mpdude 594529c
Fix ConfigCache and improve docblock
mpdude 32426ce
If I had to pay just $0.02 for every Fabbot complaint, Fabien would b…
mpdude f3470e3
Document deprecation in the CHANGELOG file
mpdude 7739878
Some more tweaks to the ConfigCacheTest
mpdude f9c48a0
Remove unused import
mpdude c0f416d
Continue with next resource, not next validator
mpdude 00b4efb
Add a shortcut for when we don't have any validators (might be in prod)
mpdude 23a4464
Create a new ValidatorConfigCache class and pass metadata validators …
mpdude caf6bf1
Fabbot
mpdude 37c96e1
This is not relevant for this PR
mpdude 7bc5ba2
Tweaks as suggested on GH
mpdude f5add4c
Implement the plan(TM)
mpdude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Avoid changing the interface
- Loading branch information
commit aae0a78e8776c2cbd60bc534549a390010640a2d
There are no files selected for viewing
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
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
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
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
passing validators to
isValid
looks weird to me. Validators should be passed in the constructor IMO (which means we can also keepisFresh
btw)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to move the validators to the constructor of a new ValidatorConfigCache class. That way, we can keep the interface without deprecations.
ConfigCache is a subclass and behaves as previously, switching between dev and prod mode and validating ResourceInterface instances only.