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

Sorting keys wherever we render inputs/outputs #24

Merged
merged 3 commits into from
Dec 2, 2019
Merged

Conversation

schottra
Copy link
Contributor

@schottra schottra commented Dec 2, 2019

flyteorg/flyte#98

Object.entries and Object.keys don't guarantee an ordering. This is normally not a problem, except we directly render the result of calling these functions on an input/output object to the screen.
Since the API response also does not guarantee ordering, this can mean a re-ordering in the rendered content when we are polling for execution status and/or changing launch plan versions.
Consistency of display is preferred to optimal ordering of values, so for now we will sort the values lexicographically.

  • Added helper functions for calling Object.entries and Object.keys and subsequently sorting the resulting arrays
  • Updated the three places we use those built-ins to generate output to call the sorted versions instead.
  • Wrote tests for the components in question to ensure that sorting is correct in the generated DOM elements.

@schottra schottra requested a review from mrmcduff December 2, 2019 20:39
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