Removing surface_header_value validation#277
Merged
lucyking140 merged 4 commits intodatacommonsorg:masterfrom Oct 21, 2025
Merged
Removing surface_header_value validation#277lucyking140 merged 4 commits intodatacommonsorg:masterfrom
lucyking140 merged 4 commits intodatacommonsorg:masterfrom
Conversation
hqpho
reviewed
Oct 21, 2025
| This value is used in the DC usage logs in Mixer. | ||
| """ | ||
| default_message = "The surface header value should only to indicate a call made from Data Commons surfaces like the MCP server or DataGemma." | ||
| VALID_SURFACE_HEADER_VALUES = ["mcp", r"mcp-[\d\.]+", "datagemma"] No newline at end of file |
Collaborator
There was a problem hiding this comment.
Can we remove this constant entirely?
Contributor
Author
There was a problem hiding this comment.
ah yes, will do!
hqpho
reviewed
Oct 21, 2025
Collaborator
hqpho
left a comment
There was a problem hiding this comment.
LGTM! May also want to call out in the description the version bump for the past release as an unrelated change
hqpho
approved these changes
Oct 21, 2025
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.
Completes b/453012979
We originally validated that the incoming surface header was either in the form "mcp-<some version number" or "datagemma", to avoid public use of this field that is supposed to only identify data commons surfaces for mixer logs.
However, this makes it challenging to change the surface header or introduce new surfaces, and doesn't allow release candidate versions of the MCP server because the version number contains letters. I removed this validation entirely and will instead validate that the surface is an actual DC feature in my usage logs in mixer, where I can loosen validation without releasing a new PyPi package.
(also updates version bump because of a previous change)