-
Notifications
You must be signed in to change notification settings - Fork 514
Skip recipe validation for imperative recipes in assertRecipesConfigure() #6841
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
Merged
MBoegers
merged 12 commits into
main
from
mboegers/recipe-loading-skip-validation-for-imperative
Mar 4, 2026
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6d4d3f1
Skip recipe validation for imperative recipes in assertRecipesConfigu…
MBoegers 16f2126
Add tests for validateRecipe flag with optional-OR validation
MBoegers ff78507
Apply suggestion from Review
MBoegers 67fc0cb
Remove unused skipValidation variable
MBoegers 730f917
minimize surface by branching in Recipe information
MBoegers 2bb0941
Merge branch 'main' into mboegers/recipe-loading-skip-validation-for-…
MBoegers 2308912
Fix validation condition and update test to match
MBoegers addbe2a
clear test and complete coverage
MBoegers 22b9f2f
Merge remote-tracking branch 'origin/main' into mboegers/recipe-loadi…
MBoegers bcc994f
Test validation directly instead of expecting AssertionError from rew…
MBoegers 426975a
Merge remote-tracking branch 'origin/main' into mboegers/recipe-loadi…
MBoegers fd9f362
Merge branch 'main' into mboegers/recipe-loading-skip-validation-for-…
timtebeek 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
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
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.
Shouldn't this be
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.
My thinking here is we can only fall to validate not provided but required options.
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.
No, required options are fine, the validation fills them. Problematic is a recipe that contains at least one non required.
With
nonMatch(isRequired)we would allow recipes with only optional options.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.
isOptional or Predicat::not would make it a little easier to read
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.
Oh and the main problem here are custom validation methods, like or checking for two optional parameter.
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.
So the problem is the either/or nature of optional arguments that are both not filled here, do I understand that correctly?
Uh oh!
There was an error while loading. Please reload this page.
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.
Yes, that's the problem. You can find these recipes even in the core, f.ex. ChangeDependency.
Maybe the
Validated#oris the real problem, other recipes that use a similar structure work with if, f.e.o.o.docker.ChangeFromBut these would also fail for
RewriteTest#assertRecipesConfigure