Skip to content

Conversation

@landenai
Copy link
Collaborator

When the backend service called during the checkout flow is flask, set the seerDemo tag to true. This will enable team members to find example issues for the seer demo easily.

Testing:

  • This tag hsould only be set when the flask service is called during the checkout flow

@landenai landenai requested a review from maxkosty July 16, 2025 15:09
@landenai landenai requested a review from ndmanvar as a code owner July 16, 2025 15:09
@vercel
Copy link

vercel bot commented Jul 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
empower ⬜️ Ignored (Inspect) Visit Preview Jul 16, 2025 8:51pm

@codecov
Copy link

codecov bot commented Jul 16, 2025

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 26.65%. Comparing base (ab9834a) to head (9aa742e).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
react/src/components/Checkout.jsx 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #937      +/-   ##
==========================================
- Coverage   26.70%   26.65%   -0.05%     
==========================================
  Files          41       41              
  Lines        1101     1103       +2     
  Branches      121      122       +1     
==========================================
  Hits          294      294              
- Misses        787      789       +2     
  Partials       20       20              
Flag Coverage Δ
api 6.13% <ø> (ø)
frontend 43.97% <0.00%> (-0.15%) ⬇️
Components Coverage Δ
checkout_module 6.13% <ø> (ø)
product_component 40.40% <0.00%> (-0.24%) ⬇️
Files with missing lines Coverage Δ
react/src/components/Checkout.jsx 15.66% <0.00%> (-0.39%) ⬇️

Copy link
Collaborator

@maxkosty maxkosty left a comment

Choose a reason for hiding this comment

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

Looks like we never shipped this. Some comments

return;
}

if(getTag('backendType') === 'flask') {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Now 2 more backends have a well-tested seer RCA+solution

Suggested change
if(getTag('backendType') === 'flask') {
if(['flask', 'laravel', 'flask-otlp'].includes(getTag('backendType'))) {

Comment on lines +51 to +116
// test('sets seerDemo tag when backendType is flask', async () => {
// const mockGetCurrentScope = jest.fn(() => ({
// _tags: { backendType: 'flask' }
// }));
// Sentry.getCurrentScope.mockImplementation(mockGetCurrentScope);

// render(
// <Provider store={store}>
// <Router>
// <Checkout backend="/api" rageclick={false} />
// </Router>
// </Provider>
// );

// // Trigger checkout by submitting the form
// fireEvent.submit(screen.getByRole('button', { name: /Complete order/i }));

// await waitFor(() => {
// expect(Sentry.setTag).toHaveBeenCalledWith('seerDemo', true);
// });
// });

// test('does not set seerDemo tag when backendType is not flask', async () => {
// const mockGetCurrentScope = jest.fn(() => ({
// _tags: { backendType: 'express' }
// }));
// Sentry.getCurrentScope.mockImplementation(mockGetCurrentScope);

// render(
// <Provider store={store}>
// <Router>
// <Checkout backend="/api" rageclick={false} />
// </Router>
// </Provider>
// );

// // Trigger checkout by submitting the form
// fireEvent.submit(screen.getByRole('button', { name: /Complete order/i }));

// await waitFor(() => {
// expect(Sentry.setTag).not.toHaveBeenCalledWith('seerDemo', true);
// });
// });

// test('does not set seerDemo tag when backendType is undefined', async () => {
// const mockGetCurrentScope = jest.fn(() => ({
// _tags: {}
// }));
// Sentry.getCurrentScope.mockImplementation(mockGetCurrentScope);

// render(
// <Provider store={store}>
// <Router>
// <Checkout backend="/api" rageclick={false} />
// </Router>
// </Provider>
// );

// // Trigger checkout by submitting the form
// fireEvent.submit(screen.getByRole('button', { name: /Complete order/i }));

// await waitFor(() => {
// expect(Sentry.setTag).not.toHaveBeenCalledWith('seerDemo', true);
// });
// });

Copy link
Collaborator

Choose a reason for hiding this comment

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

???

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.

2 participants