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

fix: Correctly populate flow settings and status #3412

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

DafyddLlyr
Copy link
Contributor

What's the problem?

When creating a new flow, the status shows as "online" if accessed via the Editor Menu. If we check the database, this is set to "offline" (and all tests for triggers etc are passing) - it's just a frontend visual bug.

What's the cause?

Somewhere in the Editor Menu work a regression has slipped in which changed the way data was fetched. When accessing it via the dropdown menu, there's no issues. When accessing via the Editor Menu, the correct data is not fetched.

This is what's causing E2E tests to fail in #3408 & #3409

What's the solution?

  • Only fetch flow settings when navigating to flow/settings
  • Make this an async request
  • Make query names unique (made debugging this more tricky as we had multiple GetFlow queries)

await getFlowMetadata(flow, req.params.team);
useStore.setState({ flowSettings, flowAnalyticsLink, isFlowPublished });
useStore.setState({ flowAnalyticsLink, isFlowPublished });
Copy link
Contributor Author

Choose a reason for hiding this comment

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

flowSettings is not needed here - it's only actually used and displayed when we navigate to the settings page.

@DafyddLlyr DafyddLlyr requested a review from a team July 12, 2024 07:56
@DafyddLlyr DafyddLlyr marked this pull request as ready for review July 12, 2024 07:56
Copy link

github-actions bot commented Jul 12, 2024

Removed vultr server and associated DNS entries

Copy link
Contributor

@ianjon3s ianjon3s left a comment

Choose a reason for hiding this comment

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

Settings and online/offline status appear to be populating correctly across flows

@DafyddLlyr DafyddLlyr merged commit 80ae221 into main Jul 12, 2024
12 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/offline-new-flow branch July 12, 2024 09:41
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