Skip to content

Ensure route destinations have consistent order#2751

Closed
sethboyles wants to merge 1 commit intomainfrom
sort-route-destinations
Closed

Ensure route destinations have consistent order#2751
sethboyles wants to merge 1 commit intomainfrom
sort-route-destinations

Conversation

@sethboyles
Copy link
Copy Markdown
Member

A lot of our route destinations assume consistent ordering from the DB, but no code actually enforces it, resulting in lots of flakes like this: https://ci.cake.capi.land/teams/main/pipelines/capi/jobs/cc-unit-tests/builds/740

This does a simple in-memory sort on the presenter.

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

Authored-by: Seth Boyles <sboyles@pivotal.io>
@sethboyles sethboyles force-pushed the sort-route-destinations branch from f17f3e6 to 354a398 Compare April 4, 2022 19:26
@sethboyles
Copy link
Copy Markdown
Member Author

considering PATCH destinations create multiple destinations at the same time, created_at might not make the most sense. guid by itself is arbitrary, so not my favorite pick either... not sure what the best thing to do here. Maybe just refactor the tests to be order-agnostic

@moleske
Copy link
Copy Markdown
Member

moleske commented Apr 4, 2022

Maybe just refactor the tests to be order-agnostic

If there's not a user or other component benefit to specifying an order, I'd lean toward making the tests order agnostic. Though since I haven't looked at the test code so I don't know how difficult it is to change the tests

@sethboyles
Copy link
Copy Markdown
Member Author

closing in favor of #2752

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.

3 participants