Skip to content

Conversation

@ytsarev
Copy link
Member

@ytsarev ytsarev commented Aug 19, 2025

Description of your changes

  • Replace function-patch-and-transform with embedded KCL functions
  • Add intelligent resource ordering to prevent webhook race conditions
  • Implement conditional creation based on resource readiness status
  • Add VPC ID propagation to AWS Load Balancer Controller
  • Enhance resilience with extended timeouts and rollback limits
  • Migrate namespace from upbound-system to crossplane-system
  • Extend e2e tests with comprehensive platform stack validation
  • Remove composition selectors for simplified resource management

BREAKING CHANGE: XCluster API removes networkSelector field, changes namespace to crossplane-system

I have:

  • Read and followed Upbound's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR, as appropriate.

How has this code been tested

  • Composition tests
up test run tests/*
  ✓   Parsing tests
  ✓   Collecting resources
  ✓   Generating language schemas
  ✓   Checking dependencies
  ✓   Building functions
  ✓   Building configuration package
  ✓   Pushing embedded functions to local daemon
  ✓   Assert test-xcluster
SUCCESS:
SUCCESS: Tests Summary:
SUCCESS: ------------------
SUCCESS: Total Tests Executed: 1
SUCCESS: Passed tests:         1
SUCCESS: Failed tests:         0
  • E2E tests
up test run tests/* --e2e
...
   | 12:23:42 | apply | Assert Status Conditions | ASSERT    | RUN   | platform.upbound.io/v1alpha1/App @ default/test-cluster-e2e-ghost
    | 12:23:42 | apply | Assert Status Conditions | ASSERT    | DONE  | platform.upbound.io/v1alpha1/App @ default/test-cluster-e2e-ghost
    | 12:23:42 | apply | Assert Status Conditions | TRY       | END   |
    | 12:23:42 | apply | @chainsaw                | CLEANUP   | SKIP  |
=== NAME  chainsaw
    | 12:23:42 | chainsaw | @chainsaw | CLEANUP   | SKIP  |
--- PASS: chainsaw (0.00s)
    --- PASS: chainsaw/apply (404.27s)
PASS
2025/08/19 12:23:42 Tests Summary:
2025/08/19 12:23:42 - Passed: 1
2025/08/19 12:23:42 - Failed: 0
2025/08/19 12:23:42 - Skipped: 0
2025/08/19 12:23:42 Skipping test 01-update.yaml
2025/08/19 12:23:42 Skipping test 02-import.yaml
2025/08/19 12:23:42 Loading default configuration...
2025/08/19 12:23:42 - Using test file: 03-delete.yaml
2025/08/19 12:23:42 - ApplyTimeout 5s
2025/08/19 12:23:42 - AssertTimeout 30s
2025/08/19 12:23:42 - CleanupTimeout 30s
2025/08/19 12:23:42 - DeleteTimeout 15s
2025/08/19 12:23:42 - ErrorTimeout 30s
2025/08/19 12:23:42 - ExecTimeout 5s
2025/08/19 12:23:42 - Parallel 1
2025/08/19 12:23:42 Loading tests...
2025/08/19 12:23:42 - delete (/var/folders/sx/0tlfb9ys20bbqnszv3lw12m40000gn/T/e2etest-cluster603019324/case)
2025/08/19 12:23:42 Running tests...
=== RUN   chainsaw
=== PAUSE chainsaw
=== CONT  chainsaw
=== RUN   chainsaw/delete
=== PAUSE chainsaw/delete
=== CONT  chainsaw/delete
    | 12:23:42 | delete | @chainsaw        | CREATE    | OK    | v1/Namespace @ chainsaw-brave-honeybee
    | 12:23:42 | delete | Delete Resources | TRY       | BEGIN |
    | 12:23:42 | delete | Delete Resources | CMD       | RUN   |
        === COMMAND
        /bin/sh -c ${KUBECTL} delete cluster.aws.platformref.upbound.io/test-cluster-e2e --wait=false --namespace default --ignore-not-found
        ${KUBECTL} delete sqlinstance.aws.platform.upbound.io/test-cluster-e2e-db-mariadb --wait=false --namespace default --ignore-not-found
        ${KUBECTL} delete app.platform.upbound.io/test-cluster-e2e-ghost --wait=false --namespace default --ignore-not-found
    | 12:23:46 | delete | Delete Resources | SCRIPT    | LOG   |
        === STDOUT
        cluster.aws.platformref.upbound.io "test-cluster-e2e" deleted
        sqlinstance.aws.platform.upbound.io "test-cluster-e2e-db-mariadb" deleted
        app.platform.upbound.io "test-cluster-e2e-ghost" deleted
    | 12:23:46 | delete | Delete Resources | SCRIPT    | DONE  |
    | 12:23:46 | delete | Delete Resources | TRY       | END   |
    | 12:23:46 | delete | Assert Deletion  | TRY       | BEGIN |
    | 12:23:46 | delete | Assert Deletion  | CMD       | RUN   |
        === COMMAND
        /bin/sh -c ${KUBECTL} wait --namespace default --for=delete cluster.aws.platformref.upbound.io/test-cluster-e2e --timeout 2h0m0s
NAME                                 RESOURCE   SYNCED   READY   STATUS
Cluster/test-cluster-e2e (default)              True     False   Deleting
└─ XCluster/test-cluster-e2e-s6v5j              True     False   Deleting
NAME                                 RESOURCE   SYNCED   READY   STATUS
Cluster/test-cluster-e2e (default)              True     False   Deleting
└─ XCluster/test-cluster-e2e-s6v5j              True     False   Deleting
NAME                                 RESOURCE   SYNCED   READY   STATUS
Cluster/test-cluster-e2e (default)              True     False   Deleting
└─ XCluster/test-cluster-e2e-s6v5j              True     False   Deleting
NAME                                 RESOURCE   SYNCED   READY   STATUS
Cluster/test-cluster-e2e (default)              True     False   Deleting
└─ XCluster/test-cluster-e2e-s6v5j              True     False   Deleting
    | 12:41:16 | delete | Assert Deletion  | SCRIPT    | LOG   |
        === STDOUT
        cluster.aws.platformref.upbound.io/test-cluster-e2e condition met
        === STDERR
        W0819 12:41:14.445752   88395 reflector.go:462] vendor/k8s.io/client-go/tools/watch/informerwatcher.go:146: watch of *unstructured.Unstructured ended with: an error on the server ("unable to decode an event from the watch stream: http2: client connection lost") has prevented the request from succeeding
    | 12:41:16 | delete | Assert Deletion  | SCRIPT    | DONE  |
    | 12:41:16 | delete | Assert Deletion  | CMD       | RUN   |
        === COMMAND
        /bin/sh -c ${KUBECTL} wait --namespace default --for=delete sqlinstance.aws.platform.upbound.io/test-cluster-e2e-db-mariadb --timeout 2h0m0s
    | 12:41:17 | delete | Assert Deletion  | SCRIPT    | DONE  |
    | 12:41:17 | delete | Assert Deletion  | CMD       | RUN   |
        === COMMAND
        /bin/sh -c ${KUBECTL} wait --namespace default --for=delete app.platform.upbound.io/test-cluster-e2e-ghost --timeout 2h0m0s
    | 12:41:18 | delete | Assert Deletion  | SCRIPT    | DONE  |
    | 12:41:18 | delete | Assert Deletion  | TRY       | END   |
    | 12:41:18 | delete | @chainsaw        | CLEANUP   | SKIP  |
=== NAME  chainsaw
    | 12:41:18 | chainsaw | @chainsaw | CLEANUP   | SKIP  |
--- PASS: chainsaw (0.00s)
    --- PASS: chainsaw/delete (83.97s)
PASS
2025/08/19 12:41:18 Tests Summary:
2025/08/19 12:41:18 - Passed: 1
2025/08/19 12:41:18 - Failed: 0
2025/08/19 12:41:18 - Skipped: 0
SUCCESS:
SUCCESS: Tests Summary:
SUCCESS: ------------------
SUCCESS: Total Tests Executed: 1
SUCCESS: Passed tests:         1
SUCCESS: Failed tests:         0

Signed-off-by: Yury Tsarev <[email protected]>
Clean provisioning
Clean deletetion

Signed-off-by: Yury Tsarev <[email protected]>
Signed-off-by: Yury Tsarev <[email protected]>
Signed-off-by: Yury Tsarev <[email protected]>
@ytsarev ytsarev requested a review from a team as a code owner August 19, 2025 14:04
@ytsarev ytsarev changed the title feat!: migrate to upbound devx with embedded kcl functions feat!: migrate to upbound devex Aug 19, 2025
Reason is unpredictable Claim stuck:
crossplane/crossplane#6482

Signed-off-by: Yury Tsarev <[email protected]>
* Make vars immutable where they are
* Make readiness cheks for EKS and AWSLbcontroller safer avoiding
  accidental resource wipe in case of the status flip

Signed-off-by: Yury Tsarev <[email protected]>
* Originally XNetwork was failing for any non us-west-2 region given the
  default availability zones
* Fix it by providing proper az map and XNetwork config on XCluster function level

Signed-off-by: Yury Tsarev <[email protected]>
@ytsarev ytsarev requested a review from kaessert August 21, 2025 16:43
@ytsarev
Copy link
Member Author

ytsarev commented Aug 21, 2025

@kaessert, thank you so much for your careful review!

I have addressed all issues.

I also caught a bug where everything failed in the region other than us-west-2 with wrong availability zones coming from XNetwork. This is also fixed!

E2E test run in eu-central-1 below

        /bin/sh -c ${KUBECTL} wait --for=delete xapp.platform.upbound.io/test-cluster-e2e-ghost --timeout 2h0m0s
    | 18:40:03 | delete | Assert Deletion  | SCRIPT    | DONE  |
    | 18:40:03 | delete | Assert Deletion  | TRY       | END   |
    | 18:40:03 | delete | @chainsaw        | CLEANUP   | SKIP  |
=== NAME  chainsaw
    | 18:40:03 | chainsaw | @chainsaw | CLEANUP   | SKIP  |
--- PASS: chainsaw (0.00s)
    --- PASS: chainsaw/delete (6.36s)
PASS
2025/08/21 18:40:03 Tests Summary:
2025/08/21 18:40:03 - Passed: 1
2025/08/21 18:40:03 - Failed: 0
2025/08/21 18:40:03 - Skipped: 0
SUCCESS:
SUCCESS: Tests Summary:
SUCCESS: ------------------
SUCCESS: Total Tests Executed: 1
SUCCESS: Passed tests:         1
SUCCESS: Failed tests:         0

Copy link
Collaborator

@kaessert kaessert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great piece of work! LGTM

@ytsarev ytsarev merged commit afd30ba into upbound:main Aug 21, 2025
2 of 4 checks passed
@ytsarev ytsarev deleted the devex branch August 21, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants