-
Notifications
You must be signed in to change notification settings - Fork 570
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
[BUG] Launch plan fails to parse large integer #1282
Comments
Thank you for opening your first issue here! 🛠 |
@pmahindrakar-oss mind taking a look at this one? this is a valid int input on flyteconsole so i think the execConfig parsing might be breaking somewhere |
Hi @katrogan / @maximsmol , The json decoder decode the json numbers as float64
Now when Golang uses fmt.Sprintf(“%v”,v) on such values, it automatically converts %g
Also we are using fmt.Sprintf(“%v”,v) since the input parameter can be of any type and its converted from string representation here Let me know if you all agree or if theres a better way |
Since
There should by definition be no difference in behavior between equivalent notations for the same value The fact that strings are accepted for non-string types is a bug if anything and should probably trigger a type error |
I don't think we should be reading it as a string because Flyte is built around type-support and this breaks it, no? +1 to @maximsmol's suggestions, especially since the user-defined input itself isn't using a different or less conventional notation and we're failing due to go parsing quirks |
Thanks @maximsmol for the suggestion . I have implemented the same here flyteorg/flyteidl#202 Also @maximsmol for your suggestion on not allowing to pass it as string at all would require a custom unmarshaller where we compare the unmarshalled json field and check against the flyte object type which might not be trivial with current implementation but will explore more on it. What we currently have done is allow json to use it default unmarshalling and then enforce the flytes type system as a post step |
@pmahindrakar-oss / @maximsmol can we close this issue? |
Yes this is fixed in the latest release . |
Describe the bug
When running
flytectl create --admin.endpoint $ADMIN_URL --admin.insecure execution -p 1 -d development --execFile lp.yaml
using a launchplan with the number
8888888
as an integer parameter,Error: failed to parse integer value: strconv.ParseInt: parsing "8.888888e+06": invalid syntax
Expected behavior
Launch plan executes parses without an error
Additional context
To Reproduce
Workflow definition:
Launch plan:
Workaround
Replacing
"argInt": 8888888
with"argInt": "8888888"
Note
Smaller numbers (such as
888
) work fineP.S.
Not sure by which component this is caused - flyte, flyteadmin, or flytectl - so feel free to move this issue around to a different repo
The text was updated successfully, but these errors were encountered: