Skip to content

Error on nav from IP pools to IP pool detail before utilization fetch completes #2107

Closed

Description

@david-crespo

https://github.com/oxidecomputer/console/actions/runs/8471024725/job/23210114552

Based on the trace, I'm seeing that the usePrefetchedApiQuery invariant is failing, which means the API call in the loader is failing.

Uploading Screenshot 2024-03-28 at 12.23.53 PM.png…

When I look at the network log in the trace, that utilization call is freaking out.

Screenshot 2024-03-28 at 12 23 37 PM

This can't be due to MSW not being loaded yet or something, because we are successfully loading the IP pools list page and then clicking the link to got to IP pool detail, and it's only then we get this weird behavior.

image

My initial hunch is that it has something to do with the fact that we are requesting ipPoolUtilizationView for ip-pool-1 on the list view, then navigating super fast (before that request is done) to a page where we're making the same request as a prefetch in a loader. Somehow the fast unmount-remount of the same request is causing it to break.

It is relevant that we also see some flakiness in Chrome, even if it's more likely to pass. I wonder if that means it's reproducible locally sometimes.

image

Activity

  1. david-crespo commented on Mar 28, 2024

    @david-crespo
    CollaboratorAuthor

    Yep, got it. It's a real bug. By adding a 1s sleep to the API handler I was able to get it to repro locally 100% of the time, and I was able to repro on dogfood by clicking an IP pool row before the request has come back.

  2. changed the title [-]E2E test flake on IP pools around utilization API call[/-] [+]Error on nav from IP pools to IP pool detail before utilization fetch completes[/+] on Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions