Skip to content
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

fix: new errors in conformance tests #103

Merged
merged 9 commits into from
Aug 23, 2021
Merged

Conversation

bshaffer
Copy link
Collaborator

No description provided.

@matthewrobertson
Copy link
Member

matthewrobertson commented Jul 12, 2021

I think there are probably two issues that need to be corrected in the cloud event conversion logic:

  1. For Firebase RTDB you need to extract the source location from the legacy "domain" field as described here. Here is the analogous PR in Ruby
  2. For pubsub, you need to include the messageId and publishTime in the message object included in the CE data payload as described here. Here is the analogous PR in Ruby

@bshaffer bshaffer changed the title attempt to fix firebase errors in conformance tests fix: new errors in conformance tests Jul 13, 2021
src/Context.php Outdated Show resolved Hide resolved
src/LegacyEventMapper.php Outdated Show resolved Hide resolved
}
$location = 'us-central1';
if ($domain !== 'firebaseio.com') {
preg_match('#^([\w-]+)\.firebasedatabase\.app$#', $domain, $locationMatches);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are actually more lenient than this in other languages as we aren't sure that firebasedatabase.app will be the only domain possible. You can basically match everything up to the first dot.

We weakened the regex in the Ruby FF after the original PR I pointed you to

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bshaffer and others added 4 commits July 15, 2021 12:27
Co-authored-by: David Supplee <dwsupplee@gmail.com>
Co-authored-by: David Supplee <dwsupplee@gmail.com>
…m/functions-framework-php into fix-conformance-tests
Copy link
Member

@matthewrobertson matthewrobertson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants