Skip to content

feat: primary resource caching for followup reconciliation(s) #2761

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 41 commits into from
Apr 29, 2025

Conversation

csviri
Copy link
Collaborator

@csviri csviri commented Apr 11, 2025

It provides facilities to cache the primary resource for follow-up reconciliations, thus ensuring that the reconciler always handles the up-to-date primary.

Later, we might extend this to the resource part, not just status (in terms of utils, cache already supports that) - now the utility methods focus on status.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 11, 2025
@csviri csviri changed the title support reconciler feat: resource cache Apr 11, 2025
@csviri csviri linked an issue Apr 11, 2025 that may be closed by this pull request
@csviri csviri changed the title feat: resource cache [WIP] feat: resource cache Apr 11, 2025
@csviri csviri changed the title [WIP] feat: resource cache [WIP] feat: primary resource caching Apr 14, 2025
@csviri csviri force-pushed the support-reconciler branch from 9019eb9 to f8b6dc6 Compare April 14, 2025 10:13
@csviri csviri marked this pull request as ready for review April 15, 2025 12:11
@openshift-ci openshift-ci bot requested review from metacosm and xstefank April 15, 2025 12:11
@csviri csviri changed the title [WIP] feat: primary resource caching feat: primary resource caching Apr 15, 2025
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 15, 2025
@csviri csviri changed the title feat: primary resource caching feat: primary resource caching for followup reconciliation Apr 15, 2025
csviri added 8 commits April 15, 2025 14:18
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
@csviri csviri force-pushed the support-reconciler branch from 19dd31c to 3b99f78 Compare April 15, 2025 12:18
@csviri csviri changed the title feat: primary resource caching for followup reconciliation feat: primary resource caching for followup reconciliation(s) Apr 15, 2025
csviri added 2 commits April 15, 2025 14:21
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
csviri and others added 2 commits April 15, 2025 17:21
…tor/api/reconciler/PrimaryUpdateAndCacheUtils.java

Co-authored-by: Martin Stefanko <xstefank122@gmail.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
@csviri csviri requested a review from xstefank April 15, 2025 15:23
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
(P p, KubernetesClient c) -> c.resource(primary).updateStatus());
}

public static <P extends HasMetadata> P patchAndCacheStatus(
Copy link
Contributor

Choose a reason for hiding this comment

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

Still would be nice to have a JavaDoc for this public method.

csviri and others added 9 commits April 25, 2025 09:56
…tor/api/reconciler/PrimaryUpdateAndCacheUtils.java

Co-authored-by: Antonio <122279781+afalhambra-hivemq@users.noreply.github.com>
…tor/api/reconciler/PrimaryUpdateAndCacheUtils.java

Co-authored-by: Antonio <122279781+afalhambra-hivemq@users.noreply.github.com>
Co-authored-by: Antonio <122279781+afalhambra-hivemq@users.noreply.github.com>
…tor/api/reconciler/PrimaryUpdateAndCacheUtils.java

Co-authored-by: Antonio <122279781+afalhambra-hivemq@users.noreply.github.com>
Co-authored-by: Antonio <122279781+afalhambra-hivemq@users.noreply.github.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
csviri added 2 commits April 25, 2025 12:58
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
@csviri
Copy link
Collaborator Author

csviri commented Apr 28, 2025

cc @gyfora

metacosm and others added 2 commits April 28, 2025 19:24
Co-authored-by: Antonio <122279781+afalhambra-hivemq@users.noreply.github.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
csviri added 3 commits April 29, 2025 13:34
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
@csviri csviri requested review from metacosm and xstefank April 29, 2025 11:43
@csviri csviri merged commit 2acb3f3 into main Apr 29, 2025
41 of 44 checks passed
@csviri csviri deleted the support-reconciler branch April 29, 2025 15:27
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Most updated CustomResource status must be passed in each reconciliation loop Support / showcase state management in status
4 participants