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

[v0.11] - Change ImageScanCommit in GitRepo spec to a pointer (#3302) #3308

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

0xavi0
Copy link
Contributor

@0xavi0 0xavi0 commented Feb 6, 2025

As ImageScanCommit is an optional field inside the GitRepo spec this PR changes it to be a pointer.

Not doing so means that the veru first time the GitRepo is stored in the cluster default values will be created and generation will be incresed, which means a double polling for the GitRepo when it is created.

The first time the GitRepo is polled because the LastPollingTime is not set. The second time it is polled because of the generation change mentioned above.

Aside from double polling in a short period of time this PR also tries to prevent an extra reconciler call that is not needed.

Backport of #3302

As ImageScanCommit is an optional field inside the GitRepo spec this PR changes it to be a pointer.

Not doing so means that the veru first time the `GitRepo` is stored in the cluster default values will be created
and generation will be incresed, which means a double polling for the `GitRepo` when it is created.

The first time the `GitRepo` is polled because the `LastPollingTime` is not set.
The second time it is polled because of the generation change mentioned above.

Aside from double polling in a short period of time this PR also tries to prevent an extra reconciler call that is not needed.

Signed-off-by: Xavi Garcia <xavi.garcia@suse.com>
@0xavi0 0xavi0 self-assigned this Feb 6, 2025
@0xavi0 0xavi0 marked this pull request as ready for review February 6, 2025 14:59
@0xavi0 0xavi0 requested a review from a team as a code owner February 6, 2025 14:59
@0xavi0 0xavi0 merged commit 047ed94 into rancher:release/v0.11 Feb 10, 2025
12 checks passed
@kkaempf kkaempf added this to the v2.10.3 milestone Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants