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

Handle transient failures during app log polling #4040

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

lopert
Copy link
Contributor

@lopert lopert commented Jun 12, 2024

WHY are these changes introduced?

Fixes https://github.com/Shopify/script-editor/issues/4145

WHAT is this pull request doing?

Changes the behaviour when we encounter an unexpected error.
Previously, we would catch the error and stop the polling.
Now, we always enqueue another polling attempt regardless of the error.

How to test your changes?

  • run dev targetting your spin instance
  • change partners app logs controller to return various errors, i.e.
return render json: { errors: ['some text'] }, status: 422

Post-release steps

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

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.

@lopert lopert force-pushed the lopert.retry-on-all-failures branch from 17da1f4 to 682b259 Compare June 12, 2024 21:13
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.

Copy link
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
71.98% (-0.03% 🔻)
7355/10218
🟡 Branches
68.85% (-0.01% 🔻)
3602/5232
🟡 Functions
71.48% (-0.09% 🔻)
1950/2728
🟡 Lines
73.24% (-0.03% 🔻)
6936/9470
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / poll-app-logs.ts
86.54% (-5.62% 🔻)
72.22% (-2.78% 🔻)
50% (-25% 🔻)
86.54% (-5.62% 🔻)

Test suite run success

1697 tests passing in 792 suites.

Report generated by 🧪jest coverage report action from 682b259

@lopert lopert added this pull request to the merge queue Jun 13, 2024
Merged via the queue into main with commit 633a881 Jun 13, 2024
35 checks passed
@lopert lopert deleted the lopert.retry-on-all-failures branch June 13, 2024 15:26
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.

None yet

4 participants