(
store: &Store,
sandbox_id: &str,
chunk: &DraftChunkRecord,
)
| 3590 | } |
| 3591 | |
| 3592 | pub(super) async fn merge_chunk_into_policy( |
| 3593 | store: &Store, |
| 3594 | sandbox_id: &str, |
| 3595 | chunk: &DraftChunkRecord, |
| 3596 | ) -> Result<(i64, String), Status> { |
| 3597 | let rule = NetworkPolicyRule::decode(chunk.proposed_rule.as_slice()) |
| 3598 | .map_err(|e| Status::internal(format!("decode proposed_rule failed: {e}")))?; |
| 3599 | let operations = [PolicyMergeOp::AddRule { |
| 3600 | rule_name: chunk.rule_name.clone(), |
| 3601 | rule, |
| 3602 | }]; |
| 3603 | validate_merge_operations_for_server(&operations)?; |
| 3604 | apply_merge_operations_with_retry(store, sandbox_id, None, &operations).await |
| 3605 | } |
| 3606 | |
| 3607 | async fn remove_chunk_from_policy( |
| 3608 | state: &ServerState, |
no test coverage detected