-
Notifications
You must be signed in to change notification settings - Fork 30
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: Replace RestrictedEnqueueRequestForOwner with EnqueueRequestForOwner #1792
Merged
kyma-bot
merged 11 commits into
kyma-project:main
from
ruanxin:enqueue-kyma-based-on-manifest-state-change
Aug 26, 2024
Merged
fix: Replace RestrictedEnqueueRequestForOwner with EnqueueRequestForOwner #1792
kyma-bot
merged 11 commits into
kyma-project:main
from
ruanxin:enqueue-kyma-based-on-manifest-state-change
Aug 26, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kyma-bot
added
cla: yes
Indicates the PR's author has signed the CLA.
size/S
Denotes a PR that changes 10-29 lines, ignoring generated files.
labels
Aug 23, 2024
ruanxin
changed the title
debug RestrictedEnqueueRequestForOwner
fix: replace RestrictedEnqueueRequestForOwner with EnqueueRequestForOwner
Aug 23, 2024
kyma-bot
added
size/L
Denotes a PR that changes 100-499 lines, ignoring generated files.
and removed
size/S
Denotes a PR that changes 10-29 lines, ignoring generated files.
labels
Aug 23, 2024
ruanxin
force-pushed
the
enqueue-kyma-based-on-manifest-state-change
branch
from
August 23, 2024 12:50
6a8a43c
to
237446d
Compare
ruanxin
commented
Aug 23, 2024
// If the two match, create a Request for the objected referred to by | ||
// the OwnerReference. Use the Name from the OwnerReference and the Namespace from the | ||
// object in the event. | ||
if ref.Kind != e.groupKind.Kind || refGV.Group != e.groupKind.Group { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To reviewer:
this condition prevent following logic to enqueue related kyma CR, due to e.groupKind
is empty
here is some log based on this commit
{"level":"INFO","date":"2024-08-23T11:17:04.906351175Z","caller":"watch/restricted_enqueue_request_for_owner.go:162","msg":"RestrictedEnqueueRequestForOwner","context":{"groupKind.Kind":"","groupKind.Group":"","ref.Kind":"Kyma","refGV.Group":"operator.kyma-project.io"}}
ruanxin
changed the title
fix: replace RestrictedEnqueueRequestForOwner with EnqueueRequestForOwner
fix: Replace RestrictedEnqueueRequestForOwner with EnqueueRequestForOwner
Aug 23, 2024
ruanxin
force-pushed
the
enqueue-kyma-based-on-manifest-state-change
branch
from
August 26, 2024 09:53
34b1b01
to
3935693
Compare
ruanxin
force-pushed
the
enqueue-kyma-based-on-manifest-state-change
branch
from
August 26, 2024 12:28
a6f8dc5
to
70f60eb
Compare
lindnerby
reviewed
Aug 26, 2024
lindnerby
approved these changes
Aug 26, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
We have a bug in the current
RestrictedEnqueueRequestForOwner
implementation, check detail here.The reason why we previously introduced this customized
RestrictedEnqueueRequestForOwner
is because we want to limit kyma CR enqueue only triggered by update event which makes manifest CR state changes (we use SSA, which update manifest very frequently before). However, since we limited the SSA in this #1456, there is not necessary to have this customized version, we can directly use the nativeEnqueueRequestForOwner
to achieve the same goal.This PR also replaced
GenerationChangedPredicate
,LabelChangedPredicate
withResourceVersionChangedPredicate
so that all watched resources can trigger enqueue based on subresource changes. For example, Manifest CR status change can trigger owner kyma CR enqueue.Related issue(s)
#1762