Skip to content

Conversation

@haircommander
Copy link
Member

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fix a panic when default_annotations are used

@openshift-ci openshift-ci bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Dec 20, 2024
@openshift-ci openshift-ci bot requested review from QiWang19 and hasan4791 December 20, 2024 18:21
@openshift-ci openshift-ci bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label Dec 20, 2024
@haircommander
Copy link
Member Author

/kind bug

@openshift-ci openshift-ci bot added kind/bug Categorizes issue or PR as related to a bug. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 20, 2024
@haircommander haircommander force-pushed the default_annotations-fix branch from 129a42b to 0fe2188 Compare December 20, 2024 18:26
Copy link
Contributor

@kannon92 kannon92 left a comment

Choose a reason for hiding this comment

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

Can we add a unit test to replicate the panic and make sure it is fixed?

@haircommander haircommander force-pushed the default_annotations-fix branch from 0fe2188 to 4093c1b Compare December 20, 2024 18:33
@haircommander
Copy link
Member Author

I have yet to reproduce the panic in integration tests unfortunately. I feel like it's worth getting a change out as saving the map in the sandbox and then editing it later would cause this, but I suspect it'll be tricky to hit the exact race we do in prod locally

@kannon92
Copy link
Contributor

I have yet to reproduce the panic in integration tests unfortunately. I feel like it's worth getting a change out as saving the map in the sandbox and then editing it later would cause this, but I suspect it'll be tricky to hit the exact race we do in prod locally

I still think a unit test would be sufficient to catch this. We have mocks for a reason.

@codecov
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 37.50000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 47.08%. Comparing base (b7f3c24) to head (997e4fb).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8867      +/-   ##
==========================================
- Coverage   47.09%   47.08%   -0.02%     
==========================================
  Files         154      154              
  Lines       22136    22138       +2     
==========================================
- Hits        10426    10424       -2     
- Misses      10642    10645       +3     
- Partials     1068     1069       +1     

@haircommander
Copy link
Member Author

I still think a unit test would be sufficient to catch this. We have mocks for a reason.

the mocks don't get to this point--we're not fully unit testing the sandbox creation process. That's part of the motivation of #8289

That said, I did reproduce with an integration test, and verify my fix seems to fix. I am trying to find a reasonable number of containers to create. It always seems to reproduce at 1000 and I think I caught it once at 100, but even that feels like a bit much so I'm inclined to not include a test

@kannon92
Copy link
Contributor

Given the revert it would be nice to have some kind of test (unit / integration / e2e) that would cover this. I guess a e2e test with that many containers may be out of the realm for origin?

hswong3i added a commit to alvistack/cri-o-cri-o that referenced this pull request Dec 21, 2024
    git clean -xdf
    go mod download
    go mod vendor
    tar zcvf ../cri-o_1.32.0.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp cri-o.spec ../cri-o_1.32.0-1.spec
    cp ../cri-o*1.32.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/cri-o-cri-o-1.32.0/
    rm -rf ../cri-o*1.32.0*.*

See cri-o#8867
See cri-o#8868

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
hswong3i added a commit to alvistack/cri-o-cri-o that referenced this pull request Dec 23, 2024
    git clean -xdf
    go mod download
    go mod vendor
    tar zcvf ../cri-o_1.32.0.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp cri-o.spec ../cri-o_1.32.0-1.spec
    cp ../cri-o*1.32.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/cri-o-cri-o-1.32.0/
    rm -rf ../cri-o*1.32.0*.*

See cri-o#8867
See cri-o#8868

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
@sohankunkerkar
Copy link
Member

/retest

1 similar comment
@haircommander
Copy link
Member Author

/retest

@sohankunkerkar
Copy link
Member

/retest

@haircommander haircommander force-pushed the default_annotations-fix branch from 4093c1b to 7eaad95 Compare January 2, 2025 21:55
@haircommander
Copy link
Member Author

okay I figured out a test. it doesn't catch the panic, but does catch the context for the panic (that we didn't deep copy a map).

@cri-o/cri-o-maintainers this should be ready PTAL

@haircommander haircommander force-pushed the default_annotations-fix branch from 7eaad95 to ce08447 Compare January 2, 2025 21:56
@haircommander haircommander force-pushed the default_annotations-fix branch from ce08447 to 997e4fb Compare January 2, 2025 22:23
hswong3i added a commit to alvistack/cri-o-cri-o that referenced this pull request Jan 3, 2025
    git clean -xdf
    go mod download
    go mod vendor
    tar zcvf ../cri-o_1.32.0.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp cri-o.spec ../cri-o_1.32.0-1.spec
    cp ../cri-o*1.32.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/cri-o-cri-o-1.32.0/
    rm -rf ../cri-o*1.32.0*.*

See cri-o#8867
See cri-o#8868

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
hswong3i added a commit to alvistack/cri-o-cri-o that referenced this pull request Jan 3, 2025
    git clean -xdf
    go mod download
    go mod vendor
    tar zcvf ../cri-o_1.32.0.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp cri-o.spec ../cri-o_1.32.0-1.spec
    cp ../cri-o*1.32.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/cri-o-cri-o-1.32.0/
    rm -rf ../cri-o*1.32.0*.*

See cri-o#8867
See cri-o#8868

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
@haircommander
Copy link
Member Author

/retest
quay flakes

Copy link
Member

@sohankunkerkar sohankunkerkar left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 3, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 3, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, sohankunkerkar

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [haircommander,sohankunkerkar]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sohankunkerkar
Copy link
Member

In fact, pull progress timeout should not timeout when set to 0 is a bit flaky too. We have a tracking issue for that: #8872

@openshift-merge-bot openshift-merge-bot bot merged commit cbb9d83 into cri-o:main Jan 3, 2025
63 of 70 checks passed
@sohankunkerkar
Copy link
Member

/cherry-pick release-1.31

@openshift-cherrypick-robot

@sohankunkerkar: new pull request created: #8885

In response to this:

/cherry-pick release-1.31

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@sohankunkerkar
Copy link
Member

/cherry-pick release-1.32

@openshift-cherrypick-robot

@sohankunkerkar: new pull request created: #8886

In response to this:

/cherry-pick release-1.32

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

hswong3i added a commit to alvistack/cri-o-cri-o that referenced this pull request Jan 11, 2025
    git clean -xdf
    go mod download
    go mod vendor
    tar zcvf ../cri-o_1.32.0.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp cri-o.spec ../cri-o_1.32.0-1.spec
    cp ../cri-o*1.32.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/cri-o-cri-o-1.32.0/
    rm -rf ../cri-o*1.32.0*.*

See cri-o#8867
See cri-o#8868
See cri-o#8902
See cri-o#8903

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
hswong3i added a commit to alvistack/ansible-role-cri_o that referenced this pull request Jan 11, 2025
hswong3i added a commit to alvistack/cri-o-cri-o that referenced this pull request Jan 18, 2025
    git clean -xdf
    go mod download
    go mod vendor
    tar zcvf ../cri-o_1.32.0.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp cri-o.spec ../cri-o_1.32.0-1.spec
    cp ../cri-o*1.32.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/cri-o-cri-o-1.32.0/
    rm -rf ../cri-o*1.32.0*.*

See cri-o#8867
See cri-o#8868
See cri-o#8902
See cri-o#8903

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants