Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@elezar
Copy link
Contributor

@elezar elezar commented Sep 22, 2022

What type of PR is this?

/kind feature

What this PR does / why we need it:

This feature extends the work done for #6056 to allow for complete updates of the runtime configuration. The previous work limited the changes to the runtimes config to adding runtimes and updating the default runtime. These changes allow the complete crio.runtime.runtimes table to be updated on reload.

This was originally discussed in #6036.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Allow `crio.runtime.runtimes` configuration to be updated on reload.

@openshift-ci openshift-ci bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Sep 22, 2022
@openshift-ci openshift-ci bot requested review from QiWang19 and wgahnagl September 22, 2022 14:14
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 22, 2022

Hi @elezar. Thanks for your PR.

I'm waiting for a cri-o member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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/test-infra repository.

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 22, 2022
@haircommander
Copy link
Member

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 22, 2022
}

// Equals checks whether to runtimes tables are equal.
func (r Runtimes) Equals(o Runtimes) bool {
Copy link
Member

Choose a reason for hiding this comment

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

we could use RuntimesEqual in pkg/config/template.go instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I have switched to this. One thing that I was concerned about was to ignore ordering in the RuntimeHandler members that are slices but this may be over engineering things at this stage.

Note that I call RuntimesEqual in reload.go directly instead of wrapping it here.

Copy link
Member

Choose a reason for hiding this comment

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

worst case, we get a false positive because the members are in a different order, and we reload the config. we'll spend some unnecessary cpu time, but it doesn't seem like a horrible case. I think the code succinct-ness is worth it

@haircommander
Copy link
Member

/lgtm
/approve
thank you @elezar !

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 29, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 29, 2022

[APPROVALNOTIFIER] This PR is APPROVED

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

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

The pull request process is described here

Details Needs approval from an approver in each of these files:

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 29, 2022
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 29, 2022
@haircommander
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 4, 2022
@codecov
Copy link

codecov bot commented Oct 4, 2022

Codecov Report

Merging #6248 (32e6520) into main (62d363f) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6248      +/-   ##
==========================================
- Coverage   43.70%   43.69%   -0.02%     
==========================================
  Files         122      122              
  Lines       13662    13659       -3     
==========================================
- Hits         5971     5968       -3     
  Misses       7046     7046              
  Partials      645      645              

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/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

3 participants