-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
lhr.stackPacks doesn't make the proto round trip #8245
Comments
Preemptively closed this. This is a problem, but I don't know the obvious solution. Turning off |
That seems like the most reasonable thing we care about :) |
I mean, this was a test meant to catch when the LHR doesn't come back as expected when passed through the proto system. Seems like it's working cause that's what's happening here and it caught it :) It's working in LR right now because the only code touching it treats it as if it were optional. It's only a matter of time until someone writes code that doesn't do that. Seems like we need to do one of the following:
|
That would be less than ideal imo. We would lose all typing for stack-packs b/c they would just become
This would be okay, but just kinda just punting the issue? Good for a short term solution.
I think this is my preference, since this would allow the proto to be as descriptive as possible and still pass the tests. But would this make the js less accurate? |
Just throwing this out there again, do we really need the proto to exactly match js representation without any transformations? It seems like having it go through multiple data formats is an inevitable recipe to require some sort of transformations/normalizations, and if we're sacrificing the useful of having it in a particular format (i.e. if we neuter proto's useful by erasing the useful types it provides), then why bother with proto at all? It might as well be a string that just gets parsed exactly as JSON. Now that I've typed this all out I think I'm remembering that the answer here is that we have no ability to apply transformations to the JSON before it goes out into the world and so our PSI API customers would all need to be aware of these transformations in which case nevermind... |
We do have some very limited transformations we can do. And I mean very limited. Like renaming. Or, |
you'll see this if you run
yarn update:sample-json
on master.stackPacks
will be deleted and thennpx jest proto-test.js
will fail.Since CI only runs
yarn diff:sample-json
(just regenerating the original json, not the proto round-trip json), as long asstackPacks
was manually added tosample_v2_round_trip.json
, everything will be green on Travis :)@exterkamp were the proto changes in #7243 not sufficient to get this automatically in the round trip result? I haven't been able to get good insight into why
json_roundtrip_via_proto.py
is dropping it.The text was updated successfully, but these errors were encountered: