• Kubernetes Submit Queue's avatar
    Merge pull request #49491 from eparis/make-plus-append-is-bad · 23bb7654
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 49898, 49897, 49919, 48860, 49491)
    
    Fix usage a make(struct, len()) followed by append()
    
    A couple of places in the code we allocate with make() but then use
    append(), instead of copy() or direct assignment. This results in a
    slice with len() zero elements at the front followed by the expected
    data. The correct form for such usage is `make(struct, 0, len())`.
    
    I found these by running:
    ```
    $ git grep -EI -A7 'make\([^,]*, len\(' | grep 'append(' -B7 | grep -v vendor
    ```
    And then manually looking through the results. I'm sure something better
    could exist.
    
    **Release note**:
    ```release-note
    NONE
    ```
    23bb7654
Name
Last commit
Last update
..
e2e Loading commit data...
e2e_federation Loading commit data...
e2e_node Loading commit data...
fixtures Loading commit data...
images Loading commit data...
integration Loading commit data...
kubemark Loading commit data...
list Loading commit data...
soak Loading commit data...
utils Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
test_owners.csv Loading commit data...
test_owners.json Loading commit data...