-
Notifications
You must be signed in to change notification settings - Fork 204
Compare image in the container registry and one in git #1246
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
Conversation
|
The following ISSUES will be created once got merged. If you want me to skip creating the issue, you can use Details1. Control not to reach the rate limitThis was created by todo plugin since "TODO:" was found in f411dd4 when #1246 was merged. cc: @nakabonne. |
|
/todo skip |
| err := repo.Pull(ctx, branch) | ||
| w.mu.Unlock() | ||
| if err != nil { | ||
| return nil, fmt.Errorf("failed to update repository branch: %w", err) |
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.
nit: "failed to get update from branch" or "failed to pull branch"
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.
Yup, you're right, thank you!
| } | ||
| // checkOutdated checks if the image defined in the given target is identical to the one in image provider. | ||
| func checkOutdated(ctx context.Context, target config.ImageWatcherTarget, repo git.Repo, provider imageprovider.Provider) (bool, error) { | ||
| if provider.Name() != target.Provider { |
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.
nit: could you add notes to clarify why do we treat this case as a not outdated image 🙏
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.
As you feel, it's unclear. gonna update them.
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.
Updated them.
The Run() spawns runners for each image provider, so the checkOutdated function is called in the context for image provider. We should ignore the targets for other providers.
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.
🙆
|
Nice 👍 |
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #1209
Does this PR introduce a user-facing change?: