GoogleContainerTools / kpt-config-sync

Config Sync - used to sync Git, OCI and Helm charts to your clusters.
Apache License 2.0
229 stars 40 forks source link

Refactor reconciler status caching #1296

Closed karlkfi closed 1 week ago

karlkfi commented 1 week ago

Prior to this change, the reconcilerState in the parser package contained both status reported to the RSync and internal state used to keep track of progress.

With this change, the status persisted to the RSync is now under the ReconcilerStatus struct, under reconcilerState. This seperates the two different domains in preperation for adding more stage-specific caching for RSync spec, which is used to populate the RSync status.

ReconcilerStatus uses primarily public fields, because it helps distinguish between fields intended for external manipulation and fields that should only be manipulated by methods on the struct, even if the manipulator is in the same package. Hopefully, we can expand this convention in the future, but for now it's limited in scope to keep the size of this PR reviewable.

Blocks: https://github.com/GoogleContainerTools/kpt-config-sync/pull/1276

google-oss-prow[bot] commented 1 week ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sdowell

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: - ~~[OWNERS](https://github.com/GoogleContainerTools/kpt-config-sync/blob/main/OWNERS)~~ [sdowell] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment