-
Notifications
You must be signed in to change notification settings - Fork 44
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
NCL-7985: Implement a global excludes to exclude specific builds from autobuilder #1160
base: main
Are you sure you want to change the base?
Conversation
5a0090e
to
897948d
Compare
@janinko fyi |
Sorry, I know you haven't been at the meetings so you missed some context to this ticket, I've updated it and added some extra details on the requirements. But in short, this global list should be in GitLab somewhere, rather than being configured on the build config side |
29c6760
to
8577914
Compare
8577914
to
f9173af
Compare
* | ||
* @param excludedGavs GAV to be excluded from the topLevelProjects. | ||
*/ | ||
public void removeProjects(String[] excludedGavs) { |
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.
why is there the method?
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.
Missed cleaning it up, will remove it.
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.
Fixed
Arrays.stream(excludedGavs) | ||
.iterator() | ||
.forEachRemaining(excludedGav -> dominoConfig.addExcludePattern(GACTVParser.parse(excludedGav))); |
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.
Arrays.stream(excludedGavs) | |
.iterator() | |
.forEachRemaining(excludedGav -> dominoConfig.addExcludePattern(GACTVParser.parse(excludedGav))); | |
Arrays.stream(excludedGavs) | |
.map(GACTVParser::parse) | |
.forEach(dominoConfig::addExcludePattern); |
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.
Changed the code.
@@ -55,6 +57,13 @@ public DependencyResolver(DependencyResolutionConfig dependencyResolutionConfig) | |||
|
|||
private void setupConfig(ProjectDependencyConfig.Mutable dominoConfig) { | |||
config.getExcludeArtifacts().stream().map(GACTVParser::parse).forEach(dominoConfig::addExcludePattern); | |||
DependencyExcluder dependencyExcluder = new DependencyExcluder(Config.instance().getActiveProfile().getDa()); |
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 creating new config class for Autobuilder would be better, then reusing a Dependency Analyzer config.
Also I wonder, if this config may be optional, so people not using autobuilder don't need it, but require it for the autobuilder.
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'll create the autobuild class. I've written a specific test to make sure builds don't break if the configuration is missing.
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.
Done. I've created a new config class for autobuild. It is optional and shouldn't fail if isn't informed. I've created a test case for this situation and it seems to work correctly.
…autobuilder.
Implements NCL-7985.
Checklist: