-
Notifications
You must be signed in to change notification settings - Fork 1
Description
What happened?
When using crossplane-diff
in directory mode (i.e. pointing to a directory of rendered XR files), most resources fail with Function runtime startup
errors. However, running the same individual files one by one succeeds consistently.
Example directory: xr-epd
Namespace: vgtrace
Command (failing):
crossplane-diff diff -n vgtrace xr-epd
Command (succeeds for same resource):
crossplane-diff diff -n vgtrace xr-epd/vgtrace-queue.yaml
Errors observed (summarized from logs/screenshot):
cannot start Function 'function-go-templating': open /var/run/docker.sock: connect: no such file or directory
context deadline exceeded
This seems to affect several XRs only when invoked together (directory mode), but they succeed individually — even immediately after failing as part of the bulk run.
How can we reproduce it?
-
Split rendered XRs into a directory, each file containing one CompositeResource (e.g.,
xr-epd/*.yaml
with oneXSQSQueue
each). -
Ensure the
function-go-templating
function is installed and uses a runtime that cold-starts (e.g., Docker). -
Run:
crossplane-diff diff -n vgtrace xr-epd
-
Observe multiple function startup errors and
unable to process
messages. -
Immediately pick one of the "failing" files and run it individually:
crossplane-diff diff -n vgtrace xr-epd/<failing-file>.yaml
-
It succeeds.
Hypothesis: Directory mode triggers many simultaneous function invocations. If these functions are not already warm (e.g., Docker containers cold-starting), this causes startup delays and timeouts, leading to false negatives. Individual execution avoids the concurrency problem.
What environment did it happen in?
Crossplane version: v2.0