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.
Type
enhancement, tests
Description
This PR focuses on moving the Network Policy generation to the
v1beta1
version. The main changes include:omitempty
to their JSON tags. These fields includePoliciesRef
inGeneratedNetworkPolicy
,Relevant
inVulnerabilityCounters
, andWorkloadVulnerabilitiesObj
inVulnerabilitiesComponents
.softwarecomposition
andnetworkpolicy
in several files to point to thev1beta1
version.networkpolicy_test.go
andgeneratednetworkpolicy_test.go
to reflect the updated import paths.PR changes walkthrough
4 files
network_types.go
pkg/apis/softwarecomposition/v1beta1/network_types.go
Made the
PoliciesRef
field in theGeneratedNetworkPolicy
struct optional by adding
omitempty
to its JSON tag.networkpolicy.go
pkg/apis/softwarecomposition/v1beta1/networkpolicy/networkpolicy.go
Updated the import path for
softwarecomposition
to pointto the
v1beta1
version.types.go
pkg/apis/softwarecomposition/v1beta1/types.go
Made the
Relevant
field in theVulnerabilityCounters
struct and the
WorkloadVulnerabilitiesObj
field in theVulnerabilitiesComponents
struct optional by addingomitempty
to their JSON tags.generatednetworkpolicy.go
pkg/registry/file/generatednetworkpolicy.go
Updated the import paths for
softwarecomposition
andnetworkpolicy
to point to thev1beta1
version.2 files
networkpolicy_test.go
pkg/apis/softwarecomposition/v1beta1/networkpolicy/networkpolicy_test.go
Updated the import path for
softwarecomposition
in thetest file to point to the
v1beta1
version.generatednetworkpolicy_test.go
pkg/registry/file/generatednetworkpolicy_test.go
Updated the import path for
softwarecomposition
in thetest file to point to the
v1beta1
version. Also, madechanges in the test cases to reflect the updated import
paths.
User description
Sorry, we do not accept changes directly against this repository. Please see
CONTRIBUTING.md for information on where and how to contribute instead.