crossplane / crossplane/cli

`crossplane dependency update-cache` does not add XRD types into `schemas/` (inconsistent with `crossplane project build`)

Open
#215 1 comment 3 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
19
Forks
31
Avg merge
3d 4h
Merged PRs (30d)
52

Description

### What happened?

After running `crossplane dependency update-cache`, `schemas/.lock.json` does not include entries for XRD schemas defined under `apis/`. Only running `crossplane project build` updates the lock file and adds a `fs://apis` key with the generated schemas.

This makes the two commands inconsistent: one partially updates the cache/lock file, the other fully updates it. In practice this breaks the local dev loop — since `update-cache` doesn't pick up XRD changes, a full `project build` is required after every schema edit just to regenerate the schemas needed to keep developing a function.

I expected `update-cache` to update the lock file and the schema types consistently, including XRD schema entries, without requiring a full `build`.

### How can we reproduce it?

1. `crossplane project init my-project`
2. Add dependencies to `crossplane-project.yaml`
3. Add an XRD definition to `apis/`
4. `crossplane dependency update-cache`
5. Inspect `schemas/` — the lock file does not contain the `fs://apis` key, and no schemas were generated for it
6. `crossplane project build`
7. Inspect `schemas/` again — the lock file now contains `fs://apis`, and the schemas have been generated

### What environment did it happen in?

* Crossplane CLI version: 2.4.0
* Platform: linux/amd64

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.