-
Notifications
You must be signed in to change notification settings - Fork 14
Unable to distinguish between CloudEvent input and legacy input #54
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
Comments
Another example of data loss in the other direction: the current proposal for Firebase RTDB and Firestore events does not include any CloudEvent mapping for the "params" part of the legacy event. |
I agree the "CloudEvent to CloudEvent" tests are not neccessary. We should update the test data so that we have
And remove the "CloudEvent to CloudEvent" tests so |
@hdp617: Great, thanks. I'm happy to adjust the data to match that - are you happy to make the changes in the framework itself? |
Yes, that would be great! Thank you. |
Also, I don't think we neccessarily need to remove the "CloudEvent to CloudEvent" tests. I'm concerned it might break other frameworks' workflows that depend on this. I can adjust the conformance tool to use the same json files for "CloudEvent to CloudEvent" tests. |
…vents" tests As issue #54, this allow modifying the CloudEvent "input" files without breaking the "CloudEvents to CloudEvents" tests.
This was fixed by #55. |
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to fix #49, and I don't think I can do so with the current conformance test framework - at least not terribly satisfactorily.
Currently I believe the Functions Framework assumes that the event representations are entirely interchangeable - in other words, that we can convert CloudEvent => Legacy => CloudEvent without data loss. This isn't always the case.
For example, the PubSub CloudEvent has a
subscription
field in its top-level data message. There's no equivalent of this in the legacy representation, so converters (e.g. in Functions Frameworks) just leave it out. However, it's appropriate to include it in the CloudEvent "input" file, so that the file accurately represents the CloudEvent. But if we have it in the input but not the output, we end up with the "CloudEvent to CloudEvent" tests failing.I'm not immediately convinced that we need "HTTP to HTTP" or "CloudEvent to CloudEvent" tests, to be honest. If we only talked about legacy to CloudEvent, and CloudEvent to legacy (so four files per event) then we'd be okay.
Assigning to @hdp617 as I assume @juliehockett no longer "owns" this project.
The text was updated successfully, but these errors were encountered: