-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Added trailing newline
- Loading branch information
commit 673070b304a406df3108b71d1574d104b335a5fc
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,4 @@ public function supports($metadata); | |
|
||
public function isFresh($metadata, $timestamp); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing docs for those 2 methods |
||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,4 @@ public function isFresh($metadata, $timestamp) | |
{ | ||
return $metadata->isFresh($timestamp); | ||
} | ||
} | ||
} |
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
2E2B
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.
Would it make sense to handle priorities at this point ?
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 think that there should not be more than one authoritative
MetadataValidator
per resource type and if there are more, they should not disagree about freshness.Also, in order to keep things simple, we decided against coming up with a full-fledged voting strategy like in the Security component.