Skip to content
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

Buildmutators filter removal #315

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlexBeggs
Copy link
Contributor

  • remove the key filtering from the ScenarioLoader outside of the BuildMutators
  • update existing BuildMutators to return NOOP when key doesn't exist in config, allowing the BuildMutators to be responsible for enabling/disabling functionality. This will allow BuildMutators to work with specific Build types (ie Bazel) or all of them depending on the configuration.

@AlexBeggs AlexBeggs force-pushed the buildmutators-filter-removal branch from c23a7ad to 637e955 Compare February 8, 2021 19:40
@@ -212,7 +212,6 @@ public ScenarioLoader(GradleBuildConfigurationReader gradleBuildConfigurationRea
String title = scenario.hasPath(TITLE) ? scenario.getString(TITLE) : null;

List<BuildMutator> mutators = BUILD_MUTATOR_CONFIGURATORS.entrySet().stream()
.filter(entry -> scenario.hasPath(entry.getKey()))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BuildMutators are responsible for returning BuildMutator.NOOP if they don't support this key during configuration. This centralizes the logic to the BuildMutator instead of in 2 places.

@lptr lptr added @execution internal Internal change labels Feb 8, 2021
@lptr lptr self-assigned this Feb 8, 2021
@AlexBeggs AlexBeggs force-pushed the buildmutators-filter-removal branch from 637e955 to c7db586 Compare February 8, 2021 19:45
- remove the key filtering from the ScenarioLoader outside of the BuildMutators
- update existing BuildMutators to return NOOP when key doesn't exist in config, allowing the BuildMutators to be responsible for enabling/disabling functionality. This will allow BuildMutators to work with specific Build types (ie Bazel) or all of them depending on the configuration.

Signed-off-by: Alex Beggs <sunyal@gmail.com>
@AlexBeggs AlexBeggs force-pushed the buildmutators-filter-removal branch from c7db586 to 91030d3 Compare February 9, 2021 19:00
@AlexBeggs
Copy link
Contributor Author

@lptr any word on this?

@lptr lptr removed the @execution label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Internal change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants