Make alert_explanation optional in AlertExplanationParams#2031
Make alert_explanation optional in AlertExplanationParams#2031
Conversation
Allow users to configure the action with only recommended_resolution by making alert_explanation an Optional field. The enricher now skips blocks for fields that are not provided and returns early if neither field is set. https://claude.ai/code/session_01NBPvBVC2yxLR27xuV5snLX
|
✅ Docker image ready for
Use this tag to pull the image for testing. 📋 Copy commandsgcloud auth configure-docker us-central1-docker.pkg.dev
docker pull us-central1-docker.pkg.dev/robusta-development/temporary-builds/robusta-runner:ae65fc8
docker tag us-central1-docker.pkg.dev/robusta-development/temporary-builds/robusta-runner:ae65fc8 me-west1-docker.pkg.dev/robusta-development/development/robusta-runner-dev:ae65fc8
docker push me-west1-docker.pkg.dev/robusta-development/development/robusta-runner-dev:ae65fc8Patch Helm values in one line: helm upgrade --install robusta robusta/robusta \
--reuse-values \
--set runner.image=me-west1-docker.pkg.dev/robusta-development/development/robusta-runner-dev:ae65fc8 |
|
Caution Review failedPull request was closed or merged during review WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can customize the high-level summary generated by CodeRabbit.Configure the |
Summary
Updated the
alert_explanation_enricherfunction to handle cases where the alert explanation is not provided, making it an optional parameter instead of required.Key Changes
alert_explanationfield type fromstrtoOptional[str]inAlertExplanationParamsalert_explanation_enricherto conditionally add the explanation block only whenalert_explanationis providedImplementation Details
alert_explanationandrecommended_resolutionare now truly optional, with the enrichment being skipped entirely if neither is providedhttps://claude.ai/code/session_01NBPvBVC2yxLR27xuV5snLX