Add a flag to force schema regeneration despite the dependency cache
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 74/100
Research direction
Start at the dependency update-cache command and trace where the recorded digest in schemas/.lock.json causes dependency schema regeneration to be skipped. Add the requested force behavior so all dependency schemas regenerate without deleting the lock file, and verify that the project’s own generated schemas remain unaffected.
Written by the indexing model from the issue text.
Description
What problem are you facing?
crossplane dependency update-cache skips regenerating schemas for any dependency whose recorded digest in schemas/.lock.json is unchanged. That's the right default, but it means there's no supported way to force regeneration when the dependency versions haven't changed.
I hit this after bumping my schema generator, which produced a different output style. My own XRD schemas picked up the new style on the next build because the project's own APIs are always regenerated, but my dependency schemas didn't, because their digests were unchanged. The two halves of my generated tree drifted apart and no flag would let me re-render the dependency half.
The only workaround I found is deleting schemas/.lock.json (or running clean-cache, which deletes the whole schemas directory) and regenerating. That works, but deleting state out from under the tool to trigger a rebuild is awkward, and clean-cache is heavier than needed since it also removes the project's own generated schemas.
How could Crossplane help solve your problem?
Add a flag to dependency update-cache to force regeneration despite the cache, e.g. --force. It would regenerate all dependency schemas regardless of whether their recorded digest is unchanged. This is useful any time the generators change rather than the dependency versions, where the digests are identical but the desired output differs.
- Dominant language
- Go
- Stars
- 19
- Forks
- 31
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 53
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from crossplane/cli
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
crossplane/cli#282 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
crossplane/cli#384 ·
-
crossplane/cli#379 · 1 assignee ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 68/100
crossplane/cli#370 · 1 reaction ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 28/100
crossplane/cli#369 ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
acceptance-tests phase-coding schema-coverage testing triaged
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100