Skip to content

Add a flag to force schema regeneration despite the dependency cache #67

@negz

Description

@negz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions