Update _do_enforcements from base_planning_svc.py#2577
Merged
Conversation
updating _do_enforcements so it test all the list of requirments of a module and not only the first one
|
This issue is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 5 days |
clenk
approved these changes
Aug 4, 2022
Contributor
There was a problem hiding this comment.
This is a good change. It allows requirements that use the same module to be specified in the yaml like
requirements:
- plugins.stockpile.app.requirements.basic:
- source: foo
edge: has_bar
target: fizz
- source: fizz
edge: has_buzz
target: fooinstead of
requirements:
- plugins.stockpile.app.requirements.basic:
- source: foo
edge: has_bar
target: fizz
- plugins.stockpile.app.requirements.basic:
- source: fizz
edge: has_buzz
target: fooI tested with both yaml styles before and after the proposed change, and confirmed that the change works as expected.
I do not think the test errors/warnings are related to the changes in this PR as they are also present on other PRs.
mkultraWasHere
approved these changes
Aug 8, 2022
Contributor
mkultraWasHere
left a comment
There was a problem hiding this comment.
Looks good @pierregi
Contributor
|
Yea its the CI pipeline complaining bc the PR is from an external branch. |
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.
Description
Update
_do_enforcementsso it does enforcement for all the items on the list of requirements of every module and not only on the first one of each module.On the ability file,
relationship_matchis a list but, on_do_enforcementsonly the first item is tested. With this modification all of the list will be tested one relationship by one.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
I self tested running ability with requirements with multiple relationship_match.
Checklist: