-
Notifications
You must be signed in to change notification settings - Fork 1
Require non-empty measurements by default #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds validation to disallow empty measurements by default, improving data quality and security. Empty measurements can now only be allowed with an explicit configuration flag for development/testing purposes.
Key changes:
- Added
allowEmptyMeasurementsconfiguration parameter to control empty measurement validation - Implemented validation logic that rejects empty measurements maps unless explicitly allowed
- Updated CLI flags, environment variables, and documentation to support the new configuration
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ports/admin_handler.go | Added validation logic and configuration parameter for empty measurements |
| cmd/httpserver/main.go | Added CLI flag and environment variable support for allowing empty measurements |
| httpserver/e2e_test.go | Added comprehensive tests for empty measurement validation behavior |
| httpserver/handler_test.go | Updated constructor call to include new allowEmptyMeasurements parameter |
| docker/docker-compose.yaml | Added environment variable for local development convenience |
| go.mod | Moved golang.org/x/crypto from indirect to direct dependency |
| README.md | Updated documentation to reflect new validation behavior and removed empty measurement examples |
| Makefile | Updated development commands and removed empty measurement example from dev setup |
| AGENTS.md | Added development guidelines for database testing |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
f780a41 to
d1614d7
Compare
Disallow empty measurements by default, to avoid misconfiguration.
Empty measurements can be allowed (for local development) by running BuilderHub with
--allow-empty-measurements/ALLOW_EMPTY_MEASUREMENTS