fix: added mandatory check in the delete handler#900
Conversation
Changed Files
|
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 |
| .schema_name(&workspace_context.schema_name) | ||
| .get_result(&mut conn)?; | ||
|
|
||
| let is_mandatory = workspace_context |
There was a problem hiding this comment.
Checks are also needed in workspace handlers to verify if the given dimensions exists or not
Also, I think we should not take list of mandatory dimensions when we are creating a workspace as that cannot be validated at that time
There was a problem hiding this comment.
#[derive(Debug, Deserialize, Serialize)]
pub struct CreateWorkspaceRequest {
pub workspace_admin_email: String,
pub workspace_name: String,
pub workspace_status: Option<WorkspaceStatus>,
pub metrics: Option<Metrics>,
#[serde(default)]
pub allow_experiment_self_approval: bool,
#[serde(default = "default_true")]
pub auto_populate_control: bool,
#[serde(default)]
pub enable_context_validation: bool,
#[serde(default)]
pub enable_change_reason_validation: bool,
}
This request already doesn't have mandatory dimension. It is already take care of.
We can add the validation in the updateWorkspace api though , that is missing.
c4e4d2a to
a915f94
Compare
Problem
Describe the problem you are trying to solve here
Solution
Provide a brief summary of your solution so that reviewers can understand your code
Environment variable changes
What ENVs need to be added or changed
Pre-deployment activity
Things needed to be done before deploying this change (if any)
Post-deployment activity
Things needed to be done after deploying this change (if any)
API changes
Possible Issues in the future
Describe any possible issues that could occur because of this change
Summary by CodeRabbit
Release Notes