Skip to content

Instantly share code, notes, and snippets.

View MelissaKaulfuss's full-sized avatar
🎯
Focusing

Melissa Kaulfuss MelissaKaulfuss

🎯
Focusing
View GitHub Profile
@MelissaKaulfuss
MelissaKaulfuss / buildkite-team-with-pipeline-query.graphql
Created March 2, 2023 23:43
GraphQL API query to return a Buildkite team and their pipelines
query TeamsWithPipelineInfo {
organization(slug: "orgSlug") {
id
name
teams(first: 100) {
edges{
node{
name
pipelines(first: 100) {
edges{
@MelissaKaulfuss
MelissaKaulfuss / gist:271b938e8e7c05ef3c3b2dcc89007c78
Created October 22, 2019 23:26
Adding new upstream Docker images to ECR
Add to: [https://github.com/hooroo/docker-upstream-images]
@MelissaKaulfuss
MelissaKaulfuss / debugging_acceptance_specs.md
Created June 3, 2019 06:04
Tips for starting to debug acceptance specs....
  1. Put a pry in the event command handler in question for example command_handler/create_cancellation
  2. Take a look at what's happening there:
  • once you hit the pry (might be in the valid or invalid method) check out the request: request.as_mash
  • check out any errors request.errors and request.errors.full_messages
  1. Check out the error's event type Shari::Repositories::EventRecord.order(:created_at).map(&:event_type)
  2. Then drill down into that event to see the message: Shari::Repositories::EventRecord.order(:created_at).where(event_type: "reservation_acceptance_validation_failed")

This should give you a better picture of what's happening.

@MelissaKaulfuss
MelissaKaulfuss / booking_manager_api_specs_ted.md
Created May 2, 2019 01:37
booking-manager-api running tests via ted

Testing

  • bin/ted/test (all tests)
  • bin/ted/test spec/unit/whatever_spec.rb (single test)
  • --tag ~acceptance (only run the fast tests)
  • bin/ted/rails db:migrate(run a migration)
  • bin/ted/rails db:migrate RAILS_ENV=test (run a migration in specific environment)
@MelissaKaulfuss
MelissaKaulfuss / shari_debug.md
Last active March 20, 2019 05:49
shari debug - per service

Let's you see the latest successfully handled or unsuccessfully handled events per application 👍

https://environment-appname.env.jqdev.net/_debug

appname = fraud, bookings etc

env = prod or nonprod

@MelissaKaulfuss
MelissaKaulfuss / installing_ruby_versions_with_chruby.md
Last active August 4, 2023 19:28
How to install different Ruby versions with chruby

Managing Ruby Versions with chruby

So I'm always forgetting how to do this! I guess I'm only ever updating Ruby versions every now and then.

Checking out which Ruby versions chruby has access to

$ chruby will display your installed rubies and show you the version you're currently using in your shell.

   ruby-2.1.2
   ruby-2.2.1
 ruby-2.3.1
@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

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 / 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)
@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!!!