Hey Ryan--I found the issue preventing TIP from ingesting the Form 95 rawstatusreport entries: we parse raw_status_report.type_of_case to get 4 fields in financial_log table so it's expecting one of the two following formats:
case_type_retainer_code - client - co_counsel - source or case_type_retainer_code - client - source
I'm not sure of your workflow/purpose of Form 95, but I can edit the lambda to set those financial_log fields to be blank if they can't be extracted from the raw_status_report.type_of_case field
I can update the name to all four fields in LR, but can you make these strings out into log table:
Case Review%
And
Secondary Interview - Final
*Thread Reply:* I'm not sure I follow--what should I do with those two strings?
*Thread Reply:* Make those the same as Signed e-Sign% so they are put into the fin_log table.
*Thread Reply:* You can make it Secondary Interview - Final with no wildcard.
*Thread Reply:* Still not tracking--which table, which fields? And presumably you want me to make changes to the 271 entries from your SQL query (in raw_status_report)?
*Thread Reply:* Ah I'm with you, thanks
*Thread Reply:* Yep I'll make those changes right now
*Thread Reply:* You can see my "hack" method to get them in there now that I now it was the Case Type name:
*Thread Reply:* I run SQL every morning to change Case Reviews and Secondary Interviews to contain "Signed e-Sign" in rawstatustable, so this change is the big fix.
I added checks for those two additional current_status strings/patterns:
About to push code--FYI it will (try to) process 4588 rows from rawstatusreport
@Quint Underwood , sounds good. I’ll clean up dashboards after you confirm it’s run.
Changes just deployed so we should be good to go
I looked through the Lambda logs and didn't see anything obviously wrong, but I can do a deeper dive this evening if you guys haven't identified the root cause yet?
Man, I checked Camp Lejeune contracts active in Leadspedia and LDP Verticals table in DBMaster, and it all seems fine.
No fails in Zapier, let me check the data@ email and make sure they are getting put into Inbox and not somewhere else maybe?
*Thread Reply:* Yeah that would be good. If they are getting into the email, I'm guessing it's the Lambda that's causing issues...
*Thread Reply:* The TIP slack alerts was one of Devin's microservices so I don't know all of its (potential) quirks, but once we find the failure I can get it fixed
And regarding support contract--I can put together an ongoing support SOW and send it your way. I presume that's the best way to structure this?
Let me check one thing on this <#C03GKEAN2SD|camp-lejeune> issue
*Thread Reply:* ahh... glad it's solved then
How much time did you spend on the Lambda code change?
*Thread Reply:* Send me an invoice at $200 per hour made out to Tort Intake Professionals not Shield Legal.
We’ll confirm if I am wrong , cannot check until tomorrow
@Quint Underwood, sent it to Tony and Debbie to pay.
*Thread Reply:* Great, thanks Ryan--appreciate it
@Quint Underwood, open another invoice and let me know how long to get TIPGenerateFinLogPY311 to run on a 4 AM, 8:15 AM, 12:15 PM, and 3:15 PM each day please.
*Thread Reply:* Hey Ryan--will do. I'll take a look at it tonight & lyk if I have other questions
*Thread Reply:* Ty @Quint Underwood, for perspective.
*Thread Reply:* @Ryan Question here: you have 8:15PM, is that correct? Or do you mean 8:15AM?
So currently you manually run TIP-generate-fin-log, correct? (At some point in the day after the call reports & status reports have been processed)
I think the best strategy is to use AWS Step Functions to automatically run Generate Financial Log after the raw status report & raw call report have been processed. With this approach, you shouldn't be tied to any particular timing and the entire pipeline will run from beginning to end whenever call reports & status reports are uploaded to S3 bucket. So you should be able to freely adjust the report timing in your dialing software without changing things in AWS
I haven't used AWS Step Functions before, but I don't expect it to be too difficult. I'd say ~10 hours
I can also just add the 4x daily triggers you mentioned as we currently do with the daily leads report, should only be an hour or so (assuming I'm not overlooking something)
I prefer the easier and faster way, what’s the difference in the set up?
@Quint Underwood , but if the step functions is more robust, will be using this method probably for another six months to a year. Again, I’ll lean on you to make it the most stable and robust solution. I’m gonna bill the tip team for your hours.
@Quint Underwood Morning. Any ups as re in the lambda scheduling
Hey Ryan--so after thinking it over, let's keep it simple for now and just add static timers. If in the future your needs change dramatically, we can look into more robust options but this will be easier and faster for now
@Quint Underwood, also make sure the new PY311 with the added Status checks is being called on the 4AM as well, I noticed at 8AM it was brining in new stuff before I setup the LawRuler status / call report emails.
*Thread Reply:* The triggers are all on the same Py311 Generate financial log lambda, so it will be called at 4AM. If something's still not being processed correctly after we have the automated triggers in place, lmk and I can help debug it further?
I just enabled triggers for 4:00AM, 8:15AM, 12:15PM, 3:15PM
Since cron is UTC and daylight savings always shifts the triggers by 1 hour each direction, I created 4 additional triggers that are the same times but for daylight saving time. These are currently disabled
Here are the winter triggers (PST), currently ENABLED:
Can you send me a video on how to swap from login to update?
*Thread Reply:* I have a meeting in a few min so will record & send to you afterwards
Here are the summer triggers (PDT), currently DISABLED:
Here's a video showing how to activate/deactivate the triggers
*Thread Reply:* I'll watch soon but thank you @Quint Underwood
Hey Ryan--if it's all right with you, I'll send that latest invoice (so far, 2 hours @ $185) at the end of the month in case there's any more support between now and then. Cut down on the admin effort a little bit 🙂
@Quint Underwood, that sounds good to me. Thank you.
@Quint Underwood, before you send, got another update to Fin_Log
Want to call me real quick to discuss this change?
It's a fairly simple change @Quint Underwood, but easier to talk over...
Can you check the S3 to Raw Tables lambda logs? The 4AM LawRuler Call & Status report showed up, but it did not seems to get into the raw tables, until I manually did them this morning.
Not sure all the lambdas are firing when supposed to or if things timed out
Hey @Ryan I can check that later today
I pushed a fix for the issue you ran into yesterday morning, which is a new one--The LP Lead associated with a TIP lead was not actually a sold lead. So when we look up sold lead by LP Lead ID, we don't get anything back, which caused the issue.
Now it will check to make sure the associated LP Lead is actually marked as sold, otherwise the lambda will skip any Leadspedia API calls
The incorrect channel mappings? Yeah it did. I'll look into upgrading/consolidating some of the microservices on Sunday as I mentioned--mostly the Leadspedia/Slack ones (not morning financials in this case). I think some architectural changes would help things run faster and reduce the risk of human error in manual mapping stuff...
Brian should not make that mistake , he’s doing real SQL data engineering but our new data warehouse has n GCP has a lot of ways to send slacks
The "datastudio" DB is updating to new CA cert, doing others now
Actually I'll verify I can connect via PGadmin first before changing others
Ok, let me know when SL datastudio is done, I'll retry Fivetran and PGAdmin
I'm still running SQL in PGAdmin on SL datastudio's dbmaster
Fivetran re-config test worked @Quint Underwood
Running sync of pipeline now
Sweet I'll update others. AWS docs recommend updating the client certs first, but I think it's fine to disregard that in this case
Great, let me know when TIP DB is done, I can check Fivetran again.
All are finished updating certs, but TIP-LS-CORE is still doing some updating..
Nice, keep your phone close but that wasn't so hard.
Also FYI, noticed you have these unattached static IPs. Unattached static IPs cost money ($0.005/hour), attached static IPs do not cost anything. Math comes out to $7.20/month for both combined
Any reason to keep them or should I delete them?
Think we are good, I'll let you know if anything pops up
URGENT, can you check the logs on this?
Just pushed change to the /isl to use max execution time (15 minutes), and doubled the RAM just in case
@Quint Underwood, just did a test in #firefoam, you seeing it executing?
It probably hasn't finished building yet, typically takes about ~7 minutes. I'm checking though
Hey Ryan, touching base on a few things: • Still have some work to finish on TIP daily financials lambda, and today’s getting chaotic so I sent a reschedule request for today’s meeting for Friday same time—all of Friday (20 Sept) is open for me so feel free to choose time that works • The /isl command started working again Friday evening (timeout issue), but I wouldn’t be surprised if it returns. I think the best long-term fix is to replace the slack get_channels() API call with a database read. I estimate this would be ~15 hours effort, and would help jumpstart the process of updating the remaining Slack slash commands (some rearchitecturing to be faster, more reliable, less manual effort by Brian to update .csv file in Github). We can talk through this more if you like. (We avoided the database read initially in order to keep it simple and avoid scope creep). • If we do any microservice rework, there are a few security best practices I’d recommend implementing. Mainly increasing security of the databases by adding a second layer of authentication for access (bastion/jump host, VPN, etc.).
@Quint Underwood , sounds good. Let’s talk /isl on that Friday meeting. Can you keep logs up and make sure we try to minimize this?
Need to move our SL Lambda TIP to next week (anytime Tuesday works on my end, requested on cal)—managing product release that’s behind schedule & need to focus on that today
@Quint Underwood, how you coming on SL Calc Perf and the new ISL command? I'm traveling today and if we are not ready to test these, I can push the meeting.
Let's push it--made a ton of progress on /isl and as a byproduct made some headway on database security setup, but still some to go. Friday would be most ideal for me--traveling tomorrow afternoon but could do early meeting (excluding 11-12) if needed. Most of Thursday is booked but could do 9am or ~11:30am. Friday is open all day for me
Morning Quint, about to board my plane back to Tulsa. My oldest son got pretty sick so I need to push our Calc_Perf and ISL Slash command review to Monday or Tuesday next week, let me know some times.
Hey @Ryan I'm sorry to hear, hope he recovers quickly
And yes of course--my calendar is open all of next Monday so anytime should work. I'm in KC for next few weeks so same TZ as Tulsa, fwiw
Ty, welcome home. I’ll check Monday for times.