Comments (2)
Uhh, except I guess this isn't the case? At least the two managers don't seem to be sharing the field.
I edited the E2E test like so:
diff --git a/test/e2e/apiextensions_test.go b/test/e2e/apiextensions_test.go
index b227e866..839b2128 100644
--- a/test/e2e/apiextensions_test.go
+++ b/test/e2e/apiextensions_test.go
@@ -189,11 +189,11 @@ func TestCompositionFunctions(t *testing.T) {
Assess("ClaimHasPatchedField",
funcs.ResourcesHaveFieldValueWithin(5*time.Minute, manifests, "claim.yaml", "status.coolerField", "I'M COOLER!"),
).
- WithTeardown("DeleteClaim", funcs.AllOf(
- funcs.DeleteResources(manifests, "claim.yaml"),
- funcs.ResourcesDeletedWithin(2*time.Minute, manifests, "claim.yaml"),
- )).
- WithTeardown("DeletePrerequisites", funcs.ResourcesDeletedAfterListedAreGone(3*time.Minute, manifests, "setup/*.yaml", nopList)).
+ // WithTeardown("DeleteClaim", funcs.AllOf(
+ // funcs.DeleteResources(manifests, "claim.yaml"),
+ // funcs.ResourcesDeletedWithin(2*time.Minute, manifests, "claim.yaml"),
+ // )).
+ // WithTeardown("DeletePrerequisites", funcs.ResourcesDeletedAfterListedAreGone(3*time.Minute, manifests, "setup/*.yaml", nopList)).
Feature(),
)
}
Then ran:
E2E_TEST_FLAGS="-test.v -v=4 -test.failfast -destroy-kind-cluster=false -test.run ^TestCompositionFunctions" make e2e
After about 20 minutes I see the following. Note that status.coolerField
is only managed by apiextensions.crossplane.io/composite
, not crossplane
. 🤔
[
{
"apiVersion": "nop.example.org/v1alpha1",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:spec": {
"f:resourceRefs": {}
}
},
"manager": "apiextensions.crossplane.io/composite",
"operation": "Apply",
"time": "2024-02-03T03:16:41Z"
},
{
"apiVersion": "nop.example.org/v1alpha1",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:status": {
"f:coolerField": {}
}
},
"manager": "apiextensions.crossplane.io/composite",
"operation": "Apply",
"subresource": "status",
"time": "2024-02-03T03:16:41Z"
},
{ [4/1993]
"apiVersion": "nop.example.org/v1alpha1",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:metadata": {
"f:finalizers": {
".": {},
"v:\"composite.apiextensions.crossplane.io\"": {}
},
"f:generateName": {},
"f:labels": {
".": {},
"f:crossplane.io/claim-name": {},
"f:crossplane.io/claim-namespace": {},
"f:crossplane.io/composite": {}
}
},
"f:spec": {
".": {},
"f:claimRef": {
".": {},
"f:apiVersion": {},
"f:kind": {},
"f:name": {},
"f:namespace": {}
},
"f:compositionRef": {
".": {},
"f:name": {}
},
"f:compositionRevisionRef": {
".": {},
"f:name": {}
},
"f:compositionUpdatePolicy": {},
"f:coolField": {}
}
},
"manager": "crossplane",
"operation": "Update",
"time": "2024-02-03T03:16:33Z"
},
{
"apiVersion": "nop.example.org/v1alpha1",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:status": {
".": {},
"f:conditions": {
".": {},
"k:{\"type\":\"Ready\"}": {
".": {},
"f:lastTransitionTime": {},
"f:reason": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"Synced\"}": {
".": {},
"f:lastTransitionTime": {},
"f:reason": {},
"f:status": {},
"f:type": {}
}
}
}
},
"manager": "crossplane",
"operation": "Update",
"subresource": "status",
"time": "2024-02-03T03:17:21Z"
}
]
Maybe an Update
operation doesn't become a manager of a pre-existing field created by an Apply
operation (by a different manager) even if it updates to the same value?
from crossplane.
AFAICT nothing is actually broken here.
I do think though that it might be worth updating the FunctionComposer
to just use Update
to update the XR's status. I don't think we're getting much from using SSA there.
from crossplane.
Related Issues (20)
- Cache `*Unstructured` objects HOT 4
- Cannot resolve package dependencies: missing dependencies: [xpkg.upbound.io/upbound/provider-family-aws] HOT 2
- Support Rendering Default Values from XRD in Crossplane CLI
- Validating Claims Against XRD Schema in Crossplane CLI During Render HOT 2
- Don't report error status for deleted resources in crossplane beta trace
- Add watch support to crossplane beta trace
- Cannot change the version of a composed resource in the default `Resources` mode HOT 2
- Promote `top` crossplane CLI subcommand to GA HOT 1
- Add more validation checks in `validate` command
- `validate` should handle Kubernetes validation libraries evolving over time
- protobuf-schemas step always failing on older release branches
- Promote `init` command to GA
- Can't patch from composed resource status to the environment HOT 2
- Add a `crossplane lint xrd.yaml` command HOT 2
- Function SDK Release Cadence & Version Compatibility HOT 1
- Crossplane fails to synchronize claims with XRs HOT 11
- Document requirements to make functions with `requirements` backward compatible
- Provide a Channel of Communication to the Claim HOT 1
- Function spec.package does not use cluster local image cache HOT 8
- Issue with capitalization in printcolumn names HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crossplane.