Repository navigation
keep: gate committed k8s/operator/crd.yaml against the generated CRD - #16
Open
chrischeng-c4 wants to merge 1 commit into
Open
chrischeng-c4 wants to merge 1 commit into
chrischeng-c4 wants to merge 1 commit into
Conversation
…CI (#14) - Assert that committed k8s/operator/crd.yaml is byte-equal to keep::operator::crd_yaml() with trailing-newline normalization in crates/keep/tests/operator.rs - Name exact regeneration command in assertion failure message - Regenerate k8s/operator/crd.yaml with measured drift (evictionPolicy, maxDiskBytes, maxmemory, spillThresholdBytes) - Run cargo test -p keep --features operator --test operator in keep-ci.yml gates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #14
Summary
committed_crd_matches_generatortest incrates/keep/tests/operator.rsasserting byte-equality between committedk8s/operator/crd.yamland the generator outputkeep::operator::crd_yaml(), usingcli_std::artifact::ensure_trailing_newline.cargo run -p keep --features operator -- k8s crd render --out k8s/operator/crd.yaml.k8s/operator/crd.yamlusing the exact command above. The newly added fields fromKeepSpecare:evictionPolicy: Memory eviction policy (KEEP_EVICTION_POLICY, defaultallkeys-lru)maxDiskBytes: Optional maximum disk quota for/data/blobs/(KEEP_MAX_DISK_BYTES)maxmemory: Optional explicit memory cap (KEEP_MAXMEMORY)spillThresholdBytes: Byte size threshold above whichBytespayloads spill to/data/blobs/(KEEP_SPILL_THRESHOLD_BYTES)cargo test --locked -p keep --features operator --test operatorto.github/workflows/keep-ci.ymlunder "Run Keep gates".k8s/operator/crd.yamlline (name: keeps.keep.dev->name: keeps-negative-control.keep.dev), verifiedcargo test --locked -p keep --features operator --test operatorfailed with the exact regeneration command in the failure output, and reverted before committing.Test Verification
cargo test --locked -p keep --features operator --test operator(6 tests passed, includingcommitted_crd_matches_generator,rustls_provider_install_is_idempotent,crd_is_openapi_compatible,crd_flattens_cluster_spec,render_emits_downward_api_statefulset,render_emits_backup_cronjob_when_configured)cargo fmt --all -- --checkk8s/operator/crd.yamlcausescommitted_crd_matches_generatorto fail with the exact regeneration command.keep-ci.ymlgates: fmt, clippy, tests, release contract).