-
Notifications
You must be signed in to change notification settings - Fork 66
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
96247 add organization address validation to trexler file process job #20085
base: master
Are you sure you want to change the base?
96247 add organization address validation to trexler file process job #20085
Conversation
Generated by 🚫 Danger |
zip_code5, zip_code4 = get_value(row, column_map, 'OrganizationZipCode') | ||
|
||
{ | ||
poa: row[column_map['POA']], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some spots where this is expected to be labeled as 'id'
. I think the specs pass because the test json object has the id key instead of poa.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've converted all of them back to id
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, but I'd like @holdenhinkle to get eyes on it too since he's more familiar with the file processing
…to-trexler-file-process-job
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
class XlsxFileProcessor | ||
include SentryLogging | ||
|
||
US_STATES_TERRITORIES = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these are all true, is it better to just have an array of State abbreviations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that works for me!
end | ||
|
||
def log_error(message) | ||
log_message_to_sentry("QueueUpdates error: #{message}", :error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to log this to datadog instead? Then you could put a monitor in place to look for this log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LindseySaari Do you have a place in vets-api where you could point me to a good example of logging to datadog? I see some code referencing statsd and some for Datadog::Tracing
, but I'm not sure what you're looking for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LindseySaari would it work to investigate datadog integration in a future PR? We are waiting for this to merge before we expand the percentage of users exposed to our product launch.
# Logs an error to Sentry. | ||
# @param error [Exception] The error string to be logged. | ||
def log_error(error) | ||
log_message_to_sentry("Organizations::Update: #{error}", :error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do DD after we go to 50% on Monday.
@LindseySaari can you please approve this if we promise to circle back and update the logging? :-)
Note: Delete the description statements, complete each step. None are optional, but can be justified as to why they cannot be completed as written. Provide known gaps to testing that may raise the risk of merging to production.
Summary
va.gov-team-sensitive
repo.Related issue(s)
Testing done
Organizations::QueueUpdates
job. It will reach out, get the spreadsheet, and process the data.Screenshots
Note: Optional
What areas of the site does it impact?
(Describe what parts of the site are impacted andifcode touched other areas): Just the
representation_management
module.Acceptance criteria
Requested Feedback
(OPTIONAL)What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?