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

Strategy to record logical files but skip scanning them #308

Merged
merged 25 commits into from
Jun 1, 2023

Conversation

dennis-behm
Copy link
Member

There are multiple artifacts which don't need to be scanned - for instance XML, JCL, PROCS and others. However, users would like to record them as a logical file to be able to use it in impact analysis, see also #200 .

Summary of changes:

  • This PR changes the behaviour of dbb-zappbuild: rather then always scanning with the default DependencyScanner, it requires the user to provide a mapping to determine the scanner. It uses the existing build property dbb.scannerMapping which was used to override the scanner for ZUnitConfiguration files, but always used the DependencyScanner as a default.

  • At the same time, it reorganises the build-conf and introduces a new properties file defaultApplicationSettings.properties to define default application configurations. To preserve backward compatibility and not to break existing pipelines, a default dbb.scannerMapping is define in the new default application settings file.

  • It removes the additional ScannerUtilities.groovy from the list of utilities, because it was only used for backward compatibility reasons. DBB 2.0 includes the ZUnitConfigScanner.

drbruce-git and others added 3 commits October 17, 2022 15:19
@M-DLB
Copy link
Member

M-DLB commented Jan 13, 2023

Hi @dennis-behm - This looks good to me, just to confirm, why do you also define the dbb.scannerMapping = DependencyScanner in file.properties? If it's defined in build-conf/defaultApplicationSettings.properties, that should be sufficient, no?

@dennis-behm
Copy link
Member Author

Hi @dennis-behm - This looks good to me, just to confirm, why do you also define the dbb.scannerMapping = DependencyScanner in file.properties? If it's defined in build-conf/defaultApplicationSettings.properties, that should be sufficient, no?

@M-DLB - I kept in both places. The definition in build-conf/defaultApplicationSettings.properties would be indeed sufficient. I specifically inserted it in build-conf to preserve backward compatibility.
Maybe some applications have some specific requirements and need to define it in file.properties. Lets comment the definition in file.properties out and put in a reference to the defaults being defined in build-conf/defaultApplicationSettings.properties. How does that sound to you?

200_skipscanning_signed

Conflicts:
	build-conf/build.properties


Signed-off-by: Dennis Behm <[email protected]>
@M-DLB
Copy link
Member

M-DLB commented Jan 16, 2023

@dennis-behm Sounds good yes, it makes sense keep it commented in file.properties in case of any override needed.

@dennis-behm dennis-behm marked this pull request as draft March 15, 2023 16:30
@dennis-behm
Copy link
Member Author

Based on a discussion with @drbruce-git , I am going to change the implementation to use the DependencyScannerRegistry API

Signed-off-by: Dennis Behm <[email protected]>
Signed-off-by: Dennis Behm <[email protected]>
@dennis-behm dennis-behm marked this pull request as ready for review March 29, 2023 10:10
@dennis-behm
Copy link
Member Author

@drbruce-git, please review the changes of this implementation. It is now moved to the DependencyScannerRegistry API of DBB.

Signed-off-by: Dennis Behm <[email protected]>
Signed-off-by: Dennis Behm <[email protected]>
Copy link
Member

@M-DLB M-DLB left a comment

Choose a reason for hiding this comment

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

Thanks @dennis-behm - Would you be able to implement the suggested changes, especially about avoiding the JSON format :)
Thank you!

utilities/ImpactUtilities.groovy Outdated Show resolved Hide resolved
build.groovy Outdated Show resolved Hide resolved
utilities/DependencyScannerUtilities.groovy Outdated Show resolved Hide resolved
samples/application-conf/file.properties Outdated Show resolved Hide resolved
200_skipscanning_signed

Conflicts:
	utilities/BuildUtilities.groovy
Signed-off-by: Dennis Behm <[email protected]>
Copy link
Member

@M-DLB M-DLB left a comment

Choose a reason for hiding this comment

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

@dennis-behm Can you please check my comments on putting the script mappings into the default zAppBuild property file?

samples/application-conf/file.properties Show resolved Hide resolved
utilities/BuildUtilities.groovy Outdated Show resolved Hide resolved
build.groovy Outdated Show resolved Hide resolved
Copy link
Member

@M-DLB M-DLB left a comment

Choose a reason for hiding this comment

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

All OK to me. Thanks @dennis-behm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants