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

add NetworkNeighborhood as a collection of NetworkNeighbors #107

Merged
merged 1 commit into from
Apr 14, 2024
Merged

Conversation

matthyx
Copy link
Contributor

@matthyx matthyx commented Apr 8, 2024

Type

enhancement


Description

  • Introduced NetworkNeighborhood as a new collection type for network communications, deprecating NetworkNeighbors.
  • Added NetworkNeighborhood to various parts of the codebase, including APIs, clientsets, informers, listers, and storage.
  • Implemented processors for deflating ApplicationProfile and NetworkNeighborhood data before saving.
  • Added tests and documentation for new changes.

Changes walkthrough

Relevant files
Enhancement
19 files
network_types.go
Introduce NetworkNeighborhood and Deprecate NetworkNeighbors

pkg/apis/softwarecomposition/network_types.go

  • Deprecated NetworkNeighborsList and NetworkNeighbors, use
    NetworkNeighborhoodList and NetworkNeighborhood instead.
  • Introduced NetworkNeighborhood, NetworkNeighborhoodList,
    NetworkNeighborhoodSpec, and NetworkNeighborhoodContainer to represent
    network communications for a specific workload.
  • Deprecated DNS in NetworkNeighbor, use DNSNames instead.
  • Added String() method to NetworkPort for better string representation.

  • +42/-1   
    network_types.go
    Introduce NetworkNeighborhood Types in v1beta1                     

    pkg/apis/softwarecomposition/v1beta1/network_types.go

  • Deprecated NetworkNeighborsList and NetworkNeighbors, use
    NetworkNeighborhoodList and NetworkNeighborhood instead.
  • Introduced NetworkNeighborhood, NetworkNeighborhoodList,
    NetworkNeighborhoodSpec, and NetworkNeighborhoodContainer to represent
    network communications for a specific workload.
  • Deprecated DNS in NetworkNeighbor, use DNSNames instead.
  • +38/-1   
    zz_generated.conversion.go
    Generate Conversion Functions for NetworkNeighborhood       

    pkg/apis/softwarecomposition/v1beta1/zz_generated.conversion.go

  • Added conversion functions for NetworkNeighborhood,
    NetworkNeighborhoodList, NetworkNeighborhoodSpec, and
    NetworkNeighborhoodContainer.
  • +140/-0 
    zz_generated.deepcopy.go
    Generate DeepCopy Functions for NetworkNeighborhood           

    pkg/apis/softwarecomposition/v1beta1/zz_generated.deepcopy.go

  • Generated deep copy functions for NetworkNeighborhood,
    NetworkNeighborhoodList, and NetworkNeighborhoodSpec.
  • +133/-0 
    zz_generated.deepcopy.go
    Generate DeepCopy Functions for NetworkNeighborhood           

    pkg/apis/softwarecomposition/zz_generated.deepcopy.go

  • Generated deep copy functions for NetworkNeighborhood,
    NetworkNeighborhoodList, and NetworkNeighborhoodSpec.
  • +133/-0 
    cleanup.go
    Add Cleanup Handler for NetworkNeighborhoods                         

    pkg/cleanup/cleanup.go

    • Added cleanup handler for networkneighborhoods.
    +1/-0     
    generated_expansion.go
    Add NetworkNeighborhoodExpansion Interface                             

    pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/generated_expansion.go

    • Added NetworkNeighborhoodExpansion interface.
    +2/-0     
    networkneighborhood.go
    Implement ClientSet for NetworkNeighborhood                           

    pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/networkneighborhood.go

    • Implemented clientset for NetworkNeighborhood.
    +178/-0 
    softwarecomposition_client.go
    Add NetworkNeighborhoods to SoftwareComposition Client     

    pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/softwarecomposition_client.go

    • Added NetworkNeighborhoods to the SoftwareComposition client.
    +5/-0     
    generic.go
    Add Informer for NetworkNeighborhood                                         

    pkg/generated/informers/externalversions/generic.go

    • Added informer for NetworkNeighborhood.
    +2/-0     
    interface.go
    Add NetworkNeighborhoods Informer Interface                           

    pkg/generated/informers/externalversions/softwarecomposition/v1beta1/interface.go

    • Added NetworkNeighborhoods informer interface.
    +7/-0     
    networkneighborhood.go
    Implement NetworkNeighborhood Informer                                     

    pkg/generated/informers/externalversions/softwarecomposition/v1beta1/networkneighborhood.go

    • Implemented NetworkNeighborhood informer.
    +90/-0   
    expansion_generated.go
    Add NetworkNeighborhood Lister Expansion Interfaces           

    pkg/generated/listers/softwarecomposition/v1beta1/expansion_generated.go

  • Added NetworkNeighborhoodListerExpansion and
    NetworkNeighborhoodNamespaceListerExpansion interfaces.
  • +8/-0     
    networkneighborhood.go
    Implement Lister for NetworkNeighborhood                                 

    pkg/generated/listers/softwarecomposition/v1beta1/networkneighborhood.go

    • Implemented lister for NetworkNeighborhood.
    +99/-0   
    applicationprofile_processor.go
    Implement PreSave Processor for ApplicationProfile             

    pkg/registry/file/applicationprofile_processor.go

  • Implemented PreSave processor for ApplicationProfile to deflate data.
  • +54/-0   
    networkneighborhood_processor.go
    Implement PreSave Processor for NetworkNeighborhood           

    pkg/registry/file/networkneighborhood_processor.go

  • Implemented PreSave processor for NetworkNeighborhood to deflate data.

  • +76/-0   
    processor.go
    Refactor Processors to Dedicated Files                                     

    pkg/registry/file/processor.go

    • Removed specific processors, now using dedicated files.
    +1/-49   
    etcd.go
    Add REST Storage for NetworkNeighborhood                                 

    pkg/registry/softwarecomposition/networkneighborhood/etcd.go

    • Added REST storage for NetworkNeighborhood.
    +56/-0   
    strategy.go
    Implement Strategy for NetworkNeighborhood                             

    pkg/registry/softwarecomposition/networkneighborhood/strategy.go

  • Implemented strategy for NetworkNeighborhood including validation and
    update preparation.
  • +129/-0 
    Miscellaneous
    3 files
    networkpolicy.go
    Add FIXME for NetworkNeighborhood Transition                         

    pkg/apis/softwarecomposition/networkpolicy/networkpolicy.go

    • Added FIXME comments to switch to NetworkNeighborhood.
    +2/-0     
    types.go
    Add FIXME Comments for Sorting                                                     

    pkg/apis/softwarecomposition/types.go

  • Added FIXME comments regarding sorting of environment variables and
    flags.
  • +4/-2     
    networkpolicy.go
    Add FIXME for NetworkNeighborhood Transition in v1beta1   

    pkg/apis/softwarecomposition/v1beta1/networkpolicy/networkpolicy.go

    • Added FIXME comments to switch to NetworkNeighborhood.
    +2/-0     
    Configuration changes
    4 files
    register.go
    Register NetworkNeighborhood Types                                             

    pkg/apis/softwarecomposition/register.go

  • Registered NetworkNeighborhood and NetworkNeighborhoodList with the
    scheme.
  • +2/-0     
    register.go
    Register NetworkNeighborhood Types in v1beta1                       

    pkg/apis/softwarecomposition/v1beta1/register.go

  • Registered NetworkNeighborhood and NetworkNeighborhoodList with the
    scheme in v1beta1.
  • +2/-0     
    apiserver.go
    Register NetworkNeighborhood Storage with API Server         

    pkg/apiserver/apiserver.go

  • Added networkNeighborhoodStorageImpl and registered
    networkneighborhood storage with the API server.
  • +3/-0     
    .dockerignore
    Add .dockerignore File                                                                     

    .dockerignore

  • Added .dockerignore file to exclude directories from Docker context.
  • +3/-0     
    Tests
    5 files
    fake_networkneighborhood.go
    Implement Fake ClientSet for NetworkNeighborhood                 

    pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_networkneighborhood.go

    • Added fake clientset implementation for NetworkNeighborhood.
    +129/-0 
    fake_softwarecomposition_client.go
    Add NetworkNeighborhoods to Fake SoftwareComposition Client

    pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_softwarecomposition_client.go

  • Added NetworkNeighborhoods to the fake SoftwareComposition client.
  • +4/-0     
    applicationprofile_processor_test.go
    Add Tests for ApplicationProfileProcessor                               

    pkg/registry/file/applicationprofile_processor_test.go

    • Added tests for ApplicationProfileProcessor.
    +3/-0     
    networkneighborhood_processor_test.go
    Add Tests for NetworkNeighborhoodProcessor                             

    pkg/registry/file/networkneighborhood_processor_test.go

    • Added tests for NetworkNeighborhoodProcessor.
    +119/-0 
    strategy_test.go
    Add Tests for NetworkNeighborhoodStrategy                               

    pkg/registry/softwarecomposition/networkneighborhood/strategy_test.go

    • Added tests for NetworkNeighborhoodStrategy.
    +92/-0   
    Documentation
    2 files
    zz_generated.openapi.go
    Generate OpenAPI Definitions for NetworkNeighborhood         

    pkg/generated/openapi/zz_generated.openapi.go

  • Generated OpenAPI definitions for NetworkNeighborhood,
    NetworkNeighborhoodList, NetworkNeighborhoodSpec, and
    NetworkNeighborhoodContainer.
  • +245/-3 
    01-example.yaml
    Add Example YAML for NetworkNeighborhood                                 

    artifacts/networkneighborhood/01-example.yaml

    • Added example YAML for NetworkNeighborhood.
    +42/-0   

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link

    github-actions bot commented Apr 8, 2024

    Summary:

    • License scan: failure
    • Credentials scan: failure
    • Vulnerabilities scan: failure
    • Unit test: success
    • Go linting: success

    Copy link

    github-actions bot commented Apr 9, 2024

    Summary:

    • License scan: failure
    • Credentials scan: failure
    • Vulnerabilities scan: failure
    • Unit test: success
    • Go linting: success

    Copy link

    Summary:

    • License scan: failure
    • Credentials scan: failure
    • Vulnerabilities scan: failure
    • Unit test: success
    • Go linting: success

    @matthyx matthyx force-pushed the nnv2 branch 2 times, most recently from d23792d to 9a1d2d8 Compare April 11, 2024 13:18
    Copy link

    Summary:

    • License scan: failure
    • Credentials scan: failure
    • Vulnerabilities scan: failure
    • Unit test: success
    • Go linting: success

    Copy link

    Summary:

    • License scan: failure
    • Credentials scan: failure
    • Vulnerabilities scan: failure
    • Unit test: success
    • Go linting: success

    Copy link

    Summary:

    • License scan: failure
    • Credentials scan: failure
    • Vulnerabilities scan: failure
    • Unit test: success
    • Go linting: success

    @matthyx matthyx requested a review from dwertent April 12, 2024 12:56
    @matthyx matthyx marked this pull request as ready for review April 12, 2024 12:57
    @codiumai-pr-agent-free codiumai-pr-agent-free bot added the enhancement New feature or request label Apr 12, 2024
    Copy link

    PR Description updated to latest commit (82a0123)

    Copy link

    PR Review

    ⏱️ Estimated effort to review [1-5]

    4, because the PR introduces a significant new feature with multiple files across the codebase, including API changes, storage implementations, and tests. The complexity of the changes, especially around the new NetworkNeighborhood type and its integration, requires a thorough review to ensure compatibility, performance, and maintainability. Additionally, the deprecation of NetworkNeighbors in favor of NetworkNeighborhood necessitates careful consideration of backward compatibility and migration paths.

    🧪 Relevant tests

    Yes

    🔍 Possible issues

    Possible Bug: The transition logic in PrepareForUpdate within pkg/registry/softwarecomposition/networkneighborhood/strategy.go might not correctly handle all edge cases related to annotation updates. Specifically, the logic for handling changes in completion and status annotations could lead to unexpected behavior if not thoroughly tested.

    Performance Concern: The implementation of deflateNetworkNeighbors in pkg/registry/file/networkneighborhood_processor.go could potentially lead to performance issues with a large number of network neighbors due to the use of nested loops and set operations. Consider optimizing this function to handle large datasets more efficiently.

    Deprecation Handling: The PR deprecates NetworkNeighbors in favor of NetworkNeighborhood. It's crucial to ensure that existing clients relying on NetworkNeighbors are not adversely affected and that there's a clear migration path to NetworkNeighborhood.

    🔒 Security concerns

    No


    ✨ Review tool usage guide:

    Overview:
    The review tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be added by configuring the tool.

    The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.

    • When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:
    /review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
    
    [pr_reviewer]
    some_config1=...
    some_config2=...
    

    See the review usage page for a comprehensive guide on using this tool.

    Copy link

    PR Code Suggestions

    CategorySuggestions                                                                                                                                                       
    Possible issue
    Remove misleading default value for array field.

    Consider removing the default value for "dnsNames" as it is an array type. Providing a
    default value for an array field, especially an empty string, can be misleading because
    the field expects an array, not a string.

    pkg/generated/openapi/zz_generated.openapi.go [3668]

    -Default: "",
    +Default: nil,
     
    Remove misleading default maps for complex object references.

    For the metadata and spec properties in
    schema_pkg_apis_softwarecomposition_v1beta1_NetworkNeighborhood, consider not setting a
    default map since these are references to other objects. Setting a default map could be
    misleading as it suggests that the object can be instantiated with empty defaults, which
    is not the case for complex types.

    pkg/generated/openapi/zz_generated.openapi.go [3744-3751]

    -Default: map[string]interface{}{},
    +Default: nil,
     
    Remove default value for required string field.

    For the NetworkNeighborhoodContainer schema, consider removing the default value for the
    "name" property. A default empty string might not be meaningful and could lead to
    validation issues or confusion if the name is expected to be provided explicitly.

    pkg/generated/openapi/zz_generated.openapi.go [3771]

    -Default: "",
    +Default: nil,
     
    Add nil pointer checks before dereferencing in conversion functions.

    Consider checking for nil pointers before dereferencing them in the conversion functions
    to prevent potential nil pointer dereferences. This is particularly important when
    converting between types where the source or destination could potentially be nil.

    pkg/apis/softwarecomposition/v1beta1/zz_generated.conversion.go [782-818]

    -return Convert_v1beta1_NetworkNeighborhood_To_softwarecomposition_NetworkNeighborhood(a.(*NetworkNeighborhood), b.(*softwarecomposition.NetworkNeighborhood), scope)
    +aTyped, aOK := a.(*NetworkNeighborhood)
    +bTyped, bOK := b.(*softwarecomposition.NetworkNeighborhood)
    +if !aOK || !bOK {
    +    return errors.New("type assertion failed")
    +}
    +return Convert_v1beta1_NetworkNeighborhood_To_softwarecomposition_NetworkNeighborhood(aTyped, bTyped, scope)
     
    Add nil check before copying DNSNames to avoid potential nil pointer dereference.

    To avoid potential nil pointer dereferences, add a nil check for in.DNSNames before
    copying its contents. This ensures that the code does not panic if in.DNSNames is nil.

    pkg/apis/softwarecomposition/v1beta1/zz_generated.deepcopy.go [1929-1932]

     if in.DNSNames != nil {
         in, out := &in.DNSNames, &out.DNSNames
    -    *out = make([]string, len(*in))
    -    copy(*out, *in)
    +    if *in != nil {
    +        *out = make([]string, len(*in))
    +        copy(*out, *in)
    +    }
     }
     
    Enhancement
    Update required fields to exclude deprecated items.

    Update the "Required" field for
    schema_pkg_apis_softwarecomposition_v1beta1_NetworkNeighbor to remove "dnsNames" if it is
    truly deprecated and not required. This ensures the schema accurately reflects required
    fields.

    pkg/generated/openapi/zz_generated.openapi.go [3713]

    -Required: []string{"identifier", "type", "dns", "dnsNames", "ports", "podSelector", "namespaceSelector", "ipAddress"},
    +Required: []string{"identifier", "type", "dns", "ports", "podSelector", "namespaceSelector", "ipAddress"},
     
    Rename properties for clarity and consistency.

    For consistency and clarity, consider renaming the "matchLabels" and "matchExpressions"
    properties in schema_pkg_apis_softwarecomposition_v1beta1_NetworkNeighborhoodSpec to
    follow a naming convention that clearly indicates their purpose and relation to label
    selection.

    pkg/generated/openapi/zz_generated.openapi.go [3866-3884]

    -"matchLabels": {
    -"matchExpressions": {
    +"selectorMatchLabels": {
    +"selectorMatchExpressions": {
     
    Wrap errors in conversion functions for better context.

    For better error handling, consider wrapping the error returned by the conversion
    functions to provide more context about the failure.

    pkg/apis/softwarecomposition/v1beta1/zz_generated.conversion.go [812-818]

    -return Convert_v1beta1_NetworkNeighborhoodSpec_To_softwarecomposition_NetworkNeighborhoodSpec(a.(*NetworkNeighborhoodSpec), b.(*softwarecomposition.NetworkNeighborhoodSpec), scope)
    +err := Convert_v1beta1_NetworkNeighborhoodSpec_To_softwarecomposition_NetworkNeighborhoodSpec(a.(*NetworkNeighborhoodSpec), b.(*softwarecomposition.NetworkNeighborhoodSpec), scope)
    +if err != nil {
    +    return fmt.Errorf("error converting NetworkNeighborhoodSpec: %w", err)
    +}
    +return nil
     
    Deduplicate ports in test data to match expected output.

    Consider deduplicating the ports in InitContainers and EphemeralContainers to match the
    expected want structure. This will ensure that the test accurately reflects the behavior
    of deduplicating ports for the same identifier, as seen in the want section for
    EphemeralContainers and InitContainers.

    pkg/registry/file/networkneighborhood_processor_test.go [42-43]

    -{Identifier: "a", Ports: []softwarecomposition.NetworkPort{{Name: "80"}}},
     {Identifier: "a", Ports: []softwarecomposition.NetworkPort{{Name: "80"}}},
     
    Ensure object is modified as expected after PreSave.

    It's recommended to verify not just the absence of errors with assert.NoError, but also to
    ensure that the object has been modified as expected after PreSave is called. This can be
    done by comparing the object against the want struct to ensure all fields are correctly
    updated.

    pkg/registry/file/networkneighborhood_processor_test.go [115]

     tt.wantErr(t, a.PreSave(tt.object), fmt.Sprintf("PreSave(%v)", tt.object))
    +assert.Equal(t, tt.want, tt.object, "Expected object to match want after PreSave")
     
    Add test cases for expected errors to improve coverage.

    For better test coverage, consider adding more test cases to cover scenarios where errors
    are expected. This can help ensure that PreSave handles error conditions gracefully and as
    expected.

    pkg/registry/file/networkneighborhood_processor_test.go [109]

    -wantErr: assert.NoError,
    +wantErr: assert.Error,
     
    Add tests for edge cases to ensure robustness.

    To ensure the test suite remains robust and future-proof, consider adding tests that cover
    edge cases, such as empty NetworkNeighborhood objects, objects with missing fields, or
    objects with invalid data. This can help identify potential issues in the PreSave logic
    that may not be caught by the current test scenarios.

    pkg/registry/file/networkneighborhood_processor_test.go [15]

     tests := []struct {
    +    name: "Empty NetworkNeighborhood object",
    +    object: &softwarecomposition.NetworkNeighborhood{},
    +    want: &softwarecomposition.NetworkNeighborhood{},
    +    wantErr: assert.NoError,
     
    Maintainability
    Refactor repeated conversion function additions into a loop or method.

    To improve code readability and maintainability, consider refactoring the repeated pattern
    of adding conversion functions into a loop or a separate method that accepts parameters
    for the varying parts.

    pkg/apis/softwarecomposition/v1beta1/zz_generated.conversion.go [782-820]

    -if err := s.AddGeneratedConversionFunc((*NetworkNeighborhood)(nil), (*softwarecomposition.NetworkNeighborhood)(nil), func(a, b interface{}, scope conversion.Scope) error {
    -    return Convert_v1beta1_NetworkNeighborhood_To_softwarecomposition_NetworkNeighborhood(a.(*NetworkNeighborhood), b.(*softwarecomposition.NetworkNeighborhood), scope)
    -}); err != nil {
    -    return err
    +conversionFuncs := []struct{
    +    srcType interface{}
    +    dstType interface{}
    +    convertFunc func(interface{}, interface{}, conversion.Scope) error
    +}{
    +    {(*NetworkNeighborhood)(nil), (*softwarecomposition.NetworkNeighborhood)(nil), Convert_v1beta1_NetworkNeighborhood_To_softwarecomposition_NetworkNeighborhood},
    +    // Add other conversion functions here
    +}
    +for _, cf := range conversionFuncs {
    +    if err := s.AddGeneratedConversionFunc(cf.srcType, cf.dstType, func(a, b interface{}, scope conversion.Scope) error {
    +        return cf.convertFunc(a, b, scope)
    +    }); err != nil {
    +        return err
    +    }
     }
     
    Extract label matching logic into a separate method for clarity.

    For better maintainability and readability, consider extracting the logic for matching
    labels into a separate method. This can make the List method cleaner and easier to
    understand, especially when dealing with complex label matching logic.

    pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_networkneighborhood.go [62-70]

    -label, _, _ := testing.ExtractFromListOptions(opts)
    -if label == nil {
    -    label = labels.Everything()
    -}
    -list := &v1beta1.NetworkNeighborhoodList{ListMeta: obj.(*v1beta1.NetworkNeighborhoodList).ListMeta}
    -for _, item := range obj.(*v1beta1.NetworkNeighborhoodList).Items {
    -    if label.Matches(labels.Set(item.Labels)) {
    -        list.Items = append(list.Items, item)
    -    }
    +list, err := c.filterNetworkNeighborhoodsByLabel(obj.(*v1beta1.NetworkNeighborhoodList), opts)
    +if err != nil {
    +    return nil, err
     }
     
    Enhance test readability with more descriptive names.

    To improve test readability and maintainability, consider using table-driven tests with
    subtests for different scenarios. This approach is already used, but enhancing it with
    more descriptive test names and possibly breaking down complex test cases into simpler
    subtests could make it easier to understand and maintain.

    pkg/registry/file/networkneighborhood_processor_test.go [22]

    -name: "NetworkNeighborhood with initContainers and ephemeralContainers",
    +name: "Test NetworkNeighborhood with various container types",
     
    Best practice
    Replace unsafe.Pointer conversions with type-safe methods.

    Use type-safe conversions instead of unsafe.Pointer to convert slices of complex types.
    This enhances type safety and maintainability of the code.

    pkg/apis/softwarecomposition/v1beta1/zz_generated.conversion.go [3699]

    -out.DNSNames = *(*[]string)(unsafe.Pointer(&in.DNSNames))
    +out.DNSNames = make([]string, len(in.DNSNames))
    +copy(out.DNSNames, in.DNSNames)
     
    Use context.WithTimeout to manage request timeouts.

    To avoid potential resource leaks, consider using the context.WithTimeout for operations
    that should be bound by a specific duration, instead of manually setting the timeout on
    the request.

    pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/networkneighborhood.go [81-84]

    -var timeout time.Duration
    -if opts.TimeoutSeconds != nil {
    -    timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
    -}
    +ctxWithTimeout, cancel := context.WithTimeout(ctx, time.Duration(*opts.TimeoutSeconds)*time.Second)
    +defer cancel()
     
    Handle errors returned by the Invokes method.

    Consider handling the error returned by Invokes method to ensure that any issues during
    the invocation are properly handled or logged. This can help in debugging issues during
    testing.

    pkg/generated/clientset/versioned/typed/softwarecomposition/v1beta1/fake/fake_networkneighborhood.go [44-45]

     obj, err := c.Fake.
         Invokes(testing.NewGetAction(networkneighborhoodsResource, c.ns, name), &v1beta1.NetworkNeighborhood{})
    +if err != nil {
    +    return nil, err
    +}
     

    ✨ Improve tool usage guide:

    Overview:
    The improve tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.

    • When commenting, to edit configurations related to the improve tool (pr_code_suggestions section), use the following template:
    /improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
    
    [pr_code_suggestions]
    some_config1=...
    some_config2=...
    

    See the improve usage page for a comprehensive guide on using this tool.

    Copy link

    Summary:

    • License scan: failure
    • Credentials scan: failure
    • Vulnerabilities scan: failure
    • Unit test: success
    • Go linting: success

    @dwertent dwertent merged commit 69f8392 into main Apr 14, 2024
    6 of 9 checks passed
    @dwertent dwertent deleted the nnv2 branch April 14, 2024 08:07
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants