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

Deprecate detect.project.codelocation.unmap property #1295

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ buildscript {

group = 'com.blackduck.integration'

version = '10.1.0-SIGQA2-SNAPSHOT'
version = '10.1.0-SIGQA4-andrian.IDETECT-3873'

apply plugin: 'com.blackduck.integration.solution'
apply plugin: 'org.springframework.boot'
Expand Down
1 change: 1 addition & 0 deletions documentation/src/main/markdown/currentreleasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Changed features

* npm version 1 package-lock.json and npm-shrinkwrap.json file parsing has been restored.
* The `detect.project.codelocation.unmap` property has been deprecated.

### Resolved issues

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1404,14 +1404,6 @@ private DetectProperties() {
.setCategory(DetectCategory.Advanced)
.build();

public static final BooleanProperty DETECT_PROJECT_CODELOCATION_UNMAP =
BooleanProperty.newBuilder("detect.project.codelocation.unmap", false)
.setInfo("Unmap All Other Scans for Project", DetectPropertyFromVersion.VERSION_4_0_0)
.setHelp("If set to true, unmaps all other scans mapped to the project version produced by the current run of Detect.")
.setGroups(DetectGroup.PROJECT, DetectGroup.PROJECT_SETTING)
.setCategory(DetectCategory.Advanced)
.build();

public static final NullableStringProperty DETECT_PROJECT_DESCRIPTION =
NullableStringProperty.newBuilder("detect.project.description")
.setInfo("Project Description", DetectPropertyFromVersion.VERSION_4_0_0)
Expand Down Expand Up @@ -1855,6 +1847,18 @@ private DetectProperties() {

//#region Deprecated Properties

public static final BooleanProperty DETECT_PROJECT_CODELOCATION_UNMAP =
BooleanProperty.newBuilder("detect.project.codelocation.unmap", false)
.setInfo("Unmap All Other Scans for Project", DetectPropertyFromVersion.VERSION_4_0_0)
.setHelp("If set to true, unmaps all other scans mapped to the project version produced by the current run of Detect.")
.setGroups(DetectGroup.PROJECT, DetectGroup.PROJECT_SETTING)
.setCategory(DetectCategory.Advanced)
.setDeprecated(
"This property has been deprecated.",
DetectMajorVersion.ELEVEN
Copy link
Contributor

@shantyk shantyk Nov 8, 2024

Choose a reason for hiding this comment

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

Assuming this is the pattern we follow for other deprecations (haven't personally done or reviewed an MR for a previous deprecation), but should this version be the version we deprecate or the version at which we will officially remove?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Assuming this is the pattern we follow for other deprecations (haven't personally done or reviewed an MR for a previous deprecation), but should this version be the version we deprecate or the version at which we will officially remove?

This refers to the version in which we will remove the property.
With this change, the following is part of Detect log output when a user attempts to use this property: This property has been deprecated. This property will be removed in 11.0.0..

Do you know if .setDeprecated() is used to populate https://documentation.blackduck.com/bundle/detect/page/properties/deprecated-properties.html?

I am pretty sure that the answer is "yes". I was trying to confirm by running release-qa but didn't have much luck.
I looked at GenerateDocsTask.java and it appears to grab values from a *-help.json file which is generated based on this list of properties.
@sig-cpotts mentioned that he might be able to confirm this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sig-cpotts confirmed this by generating the page on his end:

image

)
.build();

// Can't take in the DetectProperty<?> due to an illegal forward reference :(
private static String createTypeFilterHelpText(String exclusionTypePlural) {
return String.format("Set this value to indicate which %s Detect should exclude from the BOM.", exclusionTypePlural);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class DetectMajorVersion extends ProductMajorVersion {
public static final DetectMajorVersion EIGHT = new DetectMajorVersion(8);
public static final DetectMajorVersion NINE = new DetectMajorVersion(9);
public static final DetectMajorVersion TEN = new DetectMajorVersion(10);
public static final DetectMajorVersion ELEVEN = new DetectMajorVersion(11);

public DetectMajorVersion(Integer intValue) {
super(intValue);
Expand Down