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

fix closure variable in filtered factory #2884

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

ReToCode
Copy link
Member

@ReToCode ReToCode commented Nov 2, 2023

Changes

  • Copy the value of selector in withInformerFactory within the for loop to avoid issues in func()

/kind bug

Fixes #2883

/hold verifying this in Serving

@knative-prow knative-prow bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. 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 Nov 2, 2023
@knative-prow knative-prow bot requested review from aslom and krsna-m November 2, 2023 14:09
@knative-prow knative-prow bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 2, 2023
Copy link

codecov bot commented Nov 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a6c730f) 81.80% compared to head (57d3e7d) 81.85%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2884      +/-   ##
==========================================
+ Coverage   81.80%   81.85%   +0.05%     
==========================================
  Files         167      167              
  Lines       10231    10231              
==========================================
+ Hits         8369     8375       +6     
+ Misses       1614     1610       -4     
+ Partials      248      246       -2     

see 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ReToCode
Copy link
Member Author

ReToCode commented Nov 2, 2023

/unhold

@dprotaso PTAL.

@knative-prow knative-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 2, 2023
@skonto
Copy link
Contributor

skonto commented Nov 2, 2023

LGTM should not these generators have some unit tests?

@dprotaso
Copy link
Member

dprotaso commented Nov 2, 2023

/approve

LGTM should not these generators have some unit tests?

Ideally.

We should also be replacing this generated code with generics. But I think when we do that we should consider refactoring/tweaking some of the controller framework we built.

Copy link

knative-prow bot commented Nov 2, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, ReToCode

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:

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

@dprotaso
Copy link
Member

dprotaso commented Nov 2, 2023

/lgtm
/cherry-pick release-1.12

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Nov 2, 2023
@knative-prow-robot
Copy link
Contributor

@dprotaso: once the present PR merges, I will cherry-pick it on top of release-1.12 in a new PR and assign it to you.

In response to this:

/lgtm
/cherry-pick release-1.12

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.

@dprotaso
Copy link
Member

dprotaso commented Nov 2, 2023

/cherry-pick release-1.11

@knative-prow-robot
Copy link
Contributor

@dprotaso: once the present PR merges, I will cherry-pick it on top of release-1.11 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.11

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.

@knative-prow knative-prow bot merged commit fac3a4f into knative:main Nov 2, 2023
@knative-prow-robot
Copy link
Contributor

@dprotaso: new pull request created: #2885

In response to this:

/lgtm
/cherry-pick release-1.12

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.

@knative-prow-robot
Copy link
Contributor

@dprotaso: new pull request created: #2886

In response to this:

/cherry-pick release-1.11

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.

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. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using filteredInformers with more than one label causes to filters with the wrong LabelSelector
4 participants