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(ui): fixed yield bug that was caused by race condition #17208

Merged
merged 2 commits into from
Mar 11, 2020

Conversation

asalem1
Copy link
Contributor

@asalem1 asalem1 commented Mar 11, 2020

Closes https://github.com/influxdata/idpe/issues/6240

Problem

Race condition was leading to a bug where user was receiving an error due to an undefined variable

Solution

Replaced the state with getState to get the most up-to-date version of the state, thereby resolving the race condition error

  • CHANGELOG.md updated with a link to the PR (not the Issue)

@asalem1 asalem1 requested a review from TCL735 March 11, 2020 19:37
@@ -131,8 +131,11 @@ export const executeQueries = (dashboardID?: string) => async (
dispatch(setQueryResults(RemoteDataState.Loading, [], null))

await dispatch(refreshTimeMachineVariableValues(dashboardID))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this updates the state. So when we we were using state beforehand, the state we had referenced was changed here, but those changes weren't reflected on the state variable

@asalem1 asalem1 merged commit 0980773 into master Mar 11, 2020
@asalem1 asalem1 deleted the fix/yield-bug branch March 11, 2020 19:51
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