fix: allow string type for tables.id parameter with safe conversion#61
Draft
ZdenekSrotyr wants to merge 2 commits intomasterfrom
Draft
fix: allow string type for tables.id parameter with safe conversion#61ZdenekSrotyr wants to merge 2 commits intomasterfrom
ZdenekSrotyr wants to merge 2 commits intomasterfrom
Conversation
The id field in parameters.tables was defined as integerNode which strictly required an integer type. However, the UI or API may send this value as a string (e.g., "0" instead of 0), causing a validation error. This change converts the id field to use scalarNode with validation that: - Accepts integer values directly - Converts numeric strings to integers (e.g., "123" -> 123) - Throws an error for non-numeric strings to prevent silent failures This is consistent with how sheetId is already handled in the same config. Co-Authored-By: zdenek.srotyr@keboola.com <zdenek.srotyr@keboola.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: zdenek.srotyr@keboola.com <zdenek.srotyr@keboola.com>
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.
Summary
Fixes configuration validation error where
parameters.tables[].idwas strictly typed asintegerNode, causing failures when the UI/API sends the value as a string (e.g.,"0"instead of0).The
idfield now usesscalarNodewith custom validation that:"123"→123)This is consistent with how
sheetIdis already handled in the same configuration file.Triggered by: Datadog alert for
keboola.wr-google-sheetsshowingInvalid type for path "parameters.tables.0.id". Expected int, but got string.CI Status
401 Unauthorizedon token refresh)Review & Testing Checklist for Human
min(0)constraint was removed. Verify if negative IDs should be rejected (integer-1would now be accepted; string"-1"is rejected byctype_digit)"", float string"1.5", negative string"-1"- all should throw errorsRecommended Test Plan
"id": "0"(string) - should now work"id": 0(integer) - should still work"id": "abc"- should fail with clear errorNotes
ctype_digit()function only returns true for strings containing digits 0-9, so negative numbers as strings will be rejected