Skip to content

Resolved Reference giving validation error #1342

@vijtrip2

Description

@vijtrip2

Describe the bug
There was a recent change in ACK runtime, where k8s resource metadata and spec get patched on the reconciler error inside HandleReconcilerError method.

This means that when there was a reference resolution error for one of the many references present in a resource, the already resolved references were getting patched inside etcd, which will lead to validation error on next reconciliation that both Ref and Id field should not be present.

Steps to reproduce
Execute apigatewayv2 e2e test for reference resolution

Solution
Do not include resolved references inside the resource returned from rm.ResolveReferences method unless all the references get successfully resolved.

Once all the references get successfully resolved, the retuned resource from rm.ResolveReference acts as the new desiredSpec in memory and does not present resolved references as merge candidate during PatchMetadataAndSpec method.

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions