Open
Conversation
Contributor
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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