Shopify / Shopify/app_profiler

Refactor vernier support logic

Open
#155 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
268
Forks
14
Avg merge
1h 9m
Merged PRs (30d)
1

Description

We use a defined? check to make sure the vernier constant can be loaded. Instead, we should be able to determine which config option maps to what backend without loading said backend. This was recently re-added to App Profiler in https://github.com/Shopify/app_profiler/pull/154 after the behaviour regressed. So, I'd like to:

  1. Change the vernier branching logic not use defined? by keeping backend names outside of their respective constants that load peer dependency gems.
  2. Make stackrof a peer dependency as well (if it isn't already).
  3. Add tests to make sure we don't regress.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the vernier branching logic and the dependency declarations, then compare the regression fix in App Profiler pull request 154. Trace how backend names are currently tied to constants that load peer gems, including stackrof. Add regression coverage for selecting backends without loading them and verify the project tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.