Skip to content

Instantly share code, notes, and snippets.

View MelissaKaulfuss's full-sized avatar

Melissa Kaulfuss MelissaKaulfuss

View GitHub Profile
@MelissaKaulfuss
MelissaKaulfuss / push_to_booked.md
Last active May 31, 2018 00:23
Pushing blocked bookings to booked

New system

Find the booking_id, the correct resolution, fire up postman and 💥

Old system

  • ssh...
  • sudo su deploy
  • cd /app/<appname>/current/
  • bin/rails c
@MelissaKaulfuss
MelissaKaulfuss / dup_ruby.md
Last active May 25, 2018 04:46
the dup method in ruby

What's this #dup method do?

Doing a code read today in our monthly 10% time I started to read and document an internal event sourcing framework we've built in our team. I stumbled across the .dup method and so naturally I got sidetracked (losing sight of the high level) with StackOverflow posts, Ruby-Doc and my own IRB comparisons between it, and another method that appears quite similar -clone.

Importantly dup differs from clone in that it duplicates the object as a completely new record (if it's an ActiveRecord object no id is assigned however if it's a PORO a new object_id is assigned so it's completely different). The duped object has no direct assocation with the original at all. Thus, if you modify a duped object, you won't change the original object and that's because it's a “shallow” copy – it copies the object’s attributes only, not its associations.

@MelissaKaulfuss
MelissaKaulfuss / nightly_rates.md
Last active June 8, 2018 03:14
nightly_rates for CSRs

Nightly rates live in the provider_reservation_successful event.

@MelissaKaulfuss
MelissaKaulfuss / csv_and_postman.md
Last active June 20, 2018 00:17
Using a CSV with Postman
  1. Create a new collection in postman - only include actions you want to run in there.
  2. Give it a CSV with the amendments/fields, name the columns by the variables that postman expects.
  3. Remember to put the underscores in the column names in CSV.
  4. Add number of iterations for how many times you want it to happen.
@MelissaKaulfuss
MelissaKaulfuss / event_example_finding.md
Created July 3, 2018 03:31
Finding an IRL example of a particular event
  1. In splunk search for your event with event.event_type = booking_change_creation_failed
  2. Grab the booking ID
  3. Jump into Booking Manager and track down the booking
  4. Open up shari, et voila!

Look for the reservation or booking using the EAN itinerary ID (not our confirmation number).

@MelissaKaulfuss
MelissaKaulfuss / acceptance_spec_gotchas.md
Created October 4, 2018 06:40
Tail the logs for failing acceptance specs!

In a separate tab run tail -f log/*.log and clear the screen. Run the specs and see the logs yo. It's HELPFUL!!!

@MelissaKaulfuss
MelissaKaulfuss / click_logs_for_dublicate_bookings.md
Last active November 28, 2018 03:51
Request for click logs – how to tell if a customer saw the confirmation page multiple times
  • Log into splunk
  • Grab the booking aggregate ID
  • In splunk search within the date range of the booking and with the search params /hotels/bookings/agg-id
  • You'll see a bunch of json renderered logs
  • You're looking for the bookings/controller rendering HTML (this means the polling stopped and the response was recieved and rendered)

Keybase proof

I hereby claim:

  • I am melissakaulfuss on github.
  • I am m3llo (https://keybase.io/m3llo) on keybase.
  • I have a public key ASCPiYoTlhaMbzjcXxpAtqwGeqwYgd_tKzatIXgKW-OdZAo

To claim this, I am signing this object:

@MelissaKaulfuss
MelissaKaulfuss / reprocessing_shari_events.md
Last active July 29, 2019 01:31
Reprocessing Shari events that weren't handled

New School

  1. get the aggregate_id for the events that need to be reprocessed (the last successful event).
  2. You can do this via the Platform CLI or the rails c of the app in question (the former is the most advisable).
  3. The new Shari reprocess helper method can simply take the aggregate as the arg like so: reprocess(aggregate_id) |

Old School

  1. Get the event id/s for the event/s that weren't handled
  2. Connect to console for the app in question 3. then sudo su deploy, cd/app_name/current etc.
  3. Retrieve the event/s