crossplane-contrib / crossplane-contrib/function-extra-resources
function overrides the whole context (key) instead of inserting new (`into`) keys
- Dominant language
- Go
- Stars
- 33
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
### What happened?
The function overrides all previous runs instead of adding new keys to the context.
In the case below, I would expect the 2nd run to simply add `obj-1` into the context, and leave `obj-0` be, so that both `obj-0` and `obj-1` are present at the end.
### How can we reproduce it?
```yaml
- step: first
functionRef:
name: crossplane-contrib-function-extra-resources
input:
apiVersion: extra-resources.fn.crossplane.io/v1beta1
kind: Input
spec:
policy:
resolution: Required # these are required
extraResources:
- into: obj-0
# ...
- step: second
functionRef:
name: crossplane-contrib-function-extra-resources
input:
apiVersion: extra-resources.fn.crossplane.io/v1beta1
kind: Input
spec:
policy:
resolution: Optional # these are optional
extraResources:
- into: obj-1
# ...
```
### Suggested solution
Load the potentially existing context and insert the new (`into`) keys. No need to deep-merge.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.