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

ctms.to_vendor() could not convert unknown data #1012

Open
robhudson opened this issue Apr 13, 2023 · 2 comments · Fixed by #1019
Open

ctms.to_vendor() could not convert unknown data #1012

robhudson opened this issue Apr 13, 2023 · 2 comments · Fixed by #1019
Assignees

Comments

@robhudson
Copy link
Contributor

After the is_waitlist changes, we're seeing some sentry errors for unknown data for "fpn_country".

https://mozilla.sentry.io/issues/4087704376/?project=6260602&query=is%3Aunresolved&referrer=issue-stream&stream_index=0

@leplatrem
Copy link
Contributor

The following data is posted:

email: [Filtered]
format: H
fpn_country: br
lang: en
newsletters: guardian-vpn-waitlist
source_url: https://www.mozilla.org/en-US/products/vpn/invite/

When the slug guardian-vpn is sent, we should consume fpn_* fields.

Same as relay-vpn-bundle and relay-phone-masking slugs, which should consume relay_* fields.

The piece of code responsible of "converting" data is this one:

# Specific cases for legacy waitlists:
new_fields = {
"relay_country": "relay_geo",
"fpn_country": "vpn_geo",
"fpn_platform": "vpn_platform",
}
# Turn flat fields into a dict.
fields = {}
for name, raw_value in data.items():
if name in new_fields:
consumed_key = name
name = new_fields[name]

This is a bug, and I don't find appropriate tests in test_ctms.py. We can fix this. Please assign the issue to me.

@robhudson
Copy link
Contributor Author

We deployed the change and are still seeing these warnings come through in Sentry.

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 a pull request may close this issue.

2 participants