Skip to content
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

Function log replay correlation #4087

Merged
merged 10 commits into from
Jun 20, 2024
Merged

Conversation

nickwesselman
Copy link
Contributor

@nickwesselman nickwesselman commented Jun 18, 2024

WHY are these changes introduced?

Fixes https://github.com/Shopify/shopify-functions/issues/245

Makes it easier to go from seeing a function execution in app dev, to using it in replay.

WHAT is this pull request doing?

Adds the log "identifier" to the app dev output, to further differentiate each execution:

image

... and provide a string that can be used when searching for logs in replay:

image

... or to feed into the new --log argument of replay to bypass the manual selection:

image

How to test your changes?

Use app dev, then copy the identifier into a replay execution using the --log argument.

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

Copy link
Contributor

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/advanced-edits
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/app-management

@nickwesselman nickwesselman marked this pull request as ready for review June 19, 2024 00:43
Copy link
Contributor

We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** and there are no updates in the .changeset.
If the changes are user-facing, run "pnpm changeset add" to track your changes and include them in the next release CHANGELOG.

@nickwesselman nickwesselman marked this pull request as draft June 19, 2024 00:45
Copy link
Contributor

github-actions bot commented Jun 19, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
72.58% (-0.01% 🔻)
7466/10286
🟡 Branches
69.16% (-0.01% 🔻)
3665/5299
🟡 Functions
71.57% (+0.04% 🔼)
1974/2758
🟡 Lines
72.93% (-0.01% 🔻)
7052/9670
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / breakdown-extensions.ts
96.55% (-0.14% 🔻)
83.93% (+0.6% 🔼)
100% 100%
🟢
... / upload.ts
84.09% (-0.87% 🔻)
78.57% (-1.98% 🔻)
85.37%
84.87% (-0.96% 🔻)
🟢
... / replay.ts
96.49% (-1.13% 🔻)
86.96% (+3.62% 🔼)
100%
96.49% (-1.13% 🔻)
🟢
... / ConcurrentOutput.tsx
98.39% (-1.61% 🔻)
90.91% (-4.55% 🔻)
100%
98.33% (-1.67% 🔻)

Test suite run success

1715 tests passing in 794 suites.

Report generated by 🧪jest coverage report action from 91ad416

@nickwesselman nickwesselman marked this pull request as ready for review June 19, 2024 04:43
Copy link
Contributor

@andrewhassan andrewhassan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks pretty good! Just have a few minor suggestions.

packages/app/src/cli/services/function/replay.ts Outdated Show resolved Hide resolved
packages/app/src/cli/services/function/replay.ts Outdated Show resolved Hide resolved
packages/app/src/cli/services/function/replay.ts Outdated Show resolved Hide resolved
packages/app/src/cli/services/function/replay.test.ts Outdated Show resolved Hide resolved
@DuncanUszkay1 DuncanUszkay1 force-pushed the function-log-replay-correlation branch 3 times, most recently from 0c18220 to 65a8807 Compare June 20, 2024 17:54
@DuncanUszkay1 DuncanUszkay1 force-pushed the function-log-replay-correlation branch from 65a8807 to 91ad416 Compare June 20, 2024 18:15
@DuncanUszkay1
Copy link
Contributor

Going to wait until the log command ships, to avoid introducing any conflicts.

@DuncanUszkay1 DuncanUszkay1 added this pull request to the merge queue Jun 20, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 20, 2024
@DuncanUszkay1 DuncanUszkay1 added this pull request to the merge queue Jun 20, 2024
Merged via the queue into main with commit cb9d4b3 Jun 20, 2024
@DuncanUszkay1 DuncanUszkay1 deleted the function-log-replay-correlation branch June 20, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants