Closed MackHalliday closed 2 months ago
Hey team! Please add your planning poker estimate with Zenhub @cris-oddball @EvanParish @k-macmillan @kalbfled @MackHalliday @mchlwellman
The query parameters are logged many times because they are part of the URL, but I'm not sure that I'm seeing the output of the dedicated logged call I wrote in the route handler. I will wrap this up in the morning.
I found the relevant logging statement. This is the HTTPie command I used to test endpoint:
http https://dev-api.va.gov/vanotify/ga4/open-email-tracking campaign==hi campaign_id==e774d2a6-4946-41b5-841a-7ac6a42d178b name==email_open source==vanotify medium==email content=='test/e774d2a6-4946-41b5-841a-7ac6a42d178b/e774d2a6-4946-41b5-841a-7ac6a42d178b'
You could also use cUrl or a browser to do the same thing.
PR Approved and merged, will deploy to Perf bu no farther until I discuss with the team about sending all 3 PRs up as a feature package to Prod instead of dripping them out.
awaiting second PR and putting this under automation.
Second PR approved and merged and sent via pipeline to Perf.
QA PASSED
campaign_id
not a UUID, expect 400, error message, and loggingname
is not 'email_open', expect 400, error message, and loggingsource
is not 'vanotify', expect 400, error message, and loggingmedium
is not 'email', expect 400, error message, and loggingcontent
is not a string comprised of string/uuid/uuid, , expect 400, error message, and loggingcampaign
is None, expect 400, error message, and loggingsince the route and query parameters are encoded as a string, not testing for strings that are not string, since it will be sent as a string anyway.
Putting the route under automation.
error response for the above test cases:
{
"errors": [
{
"error": "ValidationError",
"message": "'hello' is not a 'uuid'"
}
]
}
{
"errors": [
{
"error": "ValidationError",
"message": "'email_open' was expected"
}
]
}
{
"errors": [
{
"error": "ValidationError",
"message": "'vanotify' was expected"
}
]
}
{
"errors": [
{
"error": "ValidationError",
"message": "'email' was expected"
}
]
}
{
"errors": [
{
"error": "ValidationError",
"message": "'foo' does not match '^[^/]{1,255}/[0-9a-zA-Z-]{36}/[0-9a-zA-Z-]{36}$'"
}
]
}
{
"errors": [
{
"error": "ValidationError",
"message": "'foo/foo' does not match '^[^/]{1,255}/[0-9a-zA-Z-]{36}/[0-9a-zA-Z-]{36}$'"
}
]
}
{
"errors": [
{
"error": "ValidationError",
"message": "'foo/foo/bar' does not match '^[^/]{1,255}/[0-9a-zA-Z-]{36}/[0-9a-zA-Z-]{36}$'"
}
]
}
Writing automation, but closing this ticket since Evan, Dave and I decided to just go ahead and release this today rather than wait for the other two PRs that complete this feature. This will be a Minor version bump to 1.9.0 and then the next two PRs will be patch bumps to complete the feature.
This is definitely something we want to brainstorm as a team for the next time this happens.
User Story - Business Need
We need to create a GET endpoint to accept GET requests (pixel tracking) embedded in opened emails. This endpoint should extract the different values from the GET request. In a later user story, we'll use the extracted data and pass the data along to GA4. This user story focuses exclusively on creating the GET endpoint.
User Story(ies)
As a VA Notify Developer I want to create a GET endpoint that extracts information from the GET request embedded in an opened email So that we can capture the necessary data for tracking email opens.
Additional Info and Resources
Engineering Checklist
[x] Create GET endpoint to accept GET request from an open email
URL
[x] Blueprint created for ga4 route (no auth)
[x] Validate all query params using schema validation on the query parameters
[x] Unit tests for schema vaildation
[x] Ensure type validation as well e.g. each UUID field should be a valid UUID, content should be
<string <=255>/<uuid>/<uuid>
, etc.[x] Log the query string from the GET request
[x] Add any necessary error handling
Acceptance Criteria
204
status codeQA Considerations
Out of Scope