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
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/registry/porch/background.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.

case watch.Deleted:
klog.Infof("Repository deleted: %s:%s", repository.ObjectMeta.Namespace, repository.ObjectMeta.Name)
var repoList configapi.RepositoryList
Expand Down
Loading