Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: omit empty Digest in Artifact #1031

Merged
merged 1 commit into from
Feb 16, 2023
Merged

api: omit empty Digest in Artifact #1031

merged 1 commit into from
Feb 16, 2023

Commits on Feb 16, 2023

  1. api: omit empty Digest in Artifact

    While we initially decided against it, this otherwise causes the regexp
    validator to error on an empty field when it goes through a YAML -> JSON
    encode loop (even when marked with `+optional`).
    
    This is not actually a viable path the controller could take, as the
    controller trying to update the Artifact with an older version of the
    API package would omit the `Digest` field (because it does not exist
    in that version), while a newer version of the controller would always
    include the field (because we produce it for all kinds). While in cases
    where the controller would be backed by a Persistent Volume (and a
    partial status update is made), the validation rule would not be
    triggered because the field is not part of the patch.
    
    However, for sake of correctness, we still issue a patch.
    
    Signed-off-by: Hidde Beydals <hello@hidde.co>
    hiddeco committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    440f1d5 View commit details
    Browse the repository at this point in the history