Critical Annotations not updated when `LateInitialize` is not set
- Dominant language
- Go
- Stars
- 481
- Forks
- 131
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 11
Description
### What happened?
When using an upjet-based provider like the AzureAD provider, I can observe that critical annotations (`crossplane.io/external-name`) are not updated when `LateInitialize` is not set although that was introduced in https://github.com/crossplane/upjet/pull/224 here:
https://github.com/crossplane/upjet/blob/4c6bfc216d3bbccc7af63cd0f7a984985dd54987/pkg/controller/external.go#L252-L273
This leads to issues with non-deterministic names. I already filed a PR to address that in the crossplane-runtime (https://github.com/crossplane/crossplane-runtime/pull/850), but for the sake of completeness as there must be some bug also in upjet, here aswell.
### How can we reproduce it?
Apply the following group using the AzureAD provider:
```yaml
apiVersion: groups.azuread.upbound.io/v1beta2
kind: Group
metadata:
name: test-group-for-lateinit
spec:
deletionPolicy: Delete
forProvider:
description: Test group for late init
displayName: test-group
owners:
-
securityEnabled: true
managementPolicies:
- Observe
- Create
- Update
- Delete
providerConfigRef:
name: default
```
Then take a look at the annotations after the observe phase. It is missing the `crossplane.io/external-name` annotation.
Contributor guide
Assessment
This issue has not been assessed yet.