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 for #736 Implement missing Modify event on the porch Repo Custom Resource #167

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mansoor17syed
Copy link

No description provided.

@mansoor17syed
Copy link
Author

Hi Team,

Based on the comments and changes here nephio-project/nephio#736 , I understand that we are not returning anything.
Could you clarify if the expectation is to simply fix this or to add changes that handle the update action for a CR?

Either way, I have raised an MR to address this by just returning it. I'm not entirely sure how effective this approach is, so I would appreciate it if you could review and share your feedback.

#167

nephio-project/nephio#736 (comment)

@@ -137,7 +137,7 @@ func (b *background) updateCache(ctx context.Context, event watch.EventType, rep
return b.cacheRepository(ctx, repository)
case watch.Modified:
klog.Infof("Repository modified: %s:%s", repository.ObjectMeta.Namespace, repository.ObjectMeta.Name)
// TODO: implement
return b.cacheRepository(ctx, repository)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return b.cacheRepository(ctx, repository)
var repoList configapi.RepositoryList
if err := b.coreClient.List(ctx, &repoList); err != nil {
return err
}
return b.cache.UpdateRepository(ctx, repository)

Copy link
Member

Choose a reason for hiding this comment

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

I think if we include a check on the core client to make sure that the repositories can still be listed (that is that the core client is still alive) then it would be good. See the code for the delete case, that is what they are doing there.

Copy link
Contributor

nephio-prow bot commented Jan 15, 2025

@mansoor17syed: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
presubmit-nephio-go-test 312a627 link true /test presubmit-nephio-go-test

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Copy link
Member

@liamfallon liamfallon left a comment

Choose a reason for hiding this comment

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

/approve

Copy link
Contributor

nephio-prow bot commented Jan 15, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liamfallon, mansoor17syed

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

@nephio-prow nephio-prow bot added the approved label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants