Skip to content

Commit

Permalink
Add TODOs for other external clients.
Browse files Browse the repository at this point in the history
Signed-off-by: Cem Mergenci <[email protected]>
  • Loading branch information
mergenci committed Jan 30, 2025
1 parent 2f967cf commit ffee480
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller/external.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@ func (e *external) Observe(ctx context.Context, mg xpresource.Managed) (managed.
if e.eventHandler != nil {
e.eventHandler.Forget(rateLimiterStatus, mg.GetName())
}

// TODO(cem): Consider skipping diff calculation (planning) to avoid
// potential config validation errors in the import path. See
// https://github.com/crossplane/upjet/pull/461
plan, err := e.workspace.Plan(ctx)
if err != nil {
return managed.ExternalObservation{}, errors.Wrap(err, errPlan)
Expand Down
3 changes: 3 additions & 0 deletions pkg/controller/external_tfpluginfw.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ func (n *terraformPluginFrameworkExternalClient) Observe(ctx context.Context, mg
}
}

// TODO(cem): Consider skipping diff calculation to avoid potential config
// validation errors in the import path. See
// https://github.com/crossplane/upjet/pull/461
planResponse, hasDiff, err := n.getDiffPlanResponse(ctx, tfStateValue)
if err != nil {
return managed.ExternalObservation{}, errors.Wrap(err, "cannot calculate diff")
Expand Down

0 comments on commit ffee480

Please sign in to comment.