Skip to content

Conversation

@rakibhossainctr
Copy link

@rakibhossainctr rakibhossainctr commented Aug 11, 2025

What is this change?

Adds backend-side validation for runtime_assets in CheckConfig creation and update.
If any referenced asset does not exist in the namespace, the request will be rejected with a validation error.

Why is this change necessary?

Previously, Sensu allowed creating a CheckConfig with non-existent assets, leading to runtime execution failures that were only visible in logs.
This change improves usability by detecting missing or invalid assets during check creation/update, preventing avoidable runtime errors and debugging overhead.

Does your change need a Changelog entry?

Yes — this is a user-facing change in validation behavior for check creation/update.

Do you need clarification on anything?

No.

Were there any complications while making this change?

No major complications

Have you reviewed and updated the documentation for this change? Is new documentation required?

Yes

How did you verify this change?

Added unit tests for check creation/update with:

Verified via sensuctl create that creation fails with a clear error message when missing assets are referenced.

Is this change a patch?

No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add validation for missing runtime_assets in CheckConfig resources

3 participants