Commit 9cf1846
authored
Restore service binding ordering in sys env presenter (#4665)
The ordering of multiple service bindings for the same service with VCAP
service has changed. They are now sorted by service instance guid and
not service binding id. This was implicit behaviour.
While clients should be inspecting the binding
object itslef and not relying on the index, unfortunately not all clients
do that.
This appears to have been introduced as part of this commit to support binding rotation
79b4da3#diff-403a1ff3052c3335b1d4f0db3569c895bf7ba4ca01539c562d009394c907d64bR148 and this migration f011651
and I believe the introduction of the index:
```
add_index %i[app_guid service_instance_guid], name: :service_bindings_app_guid_service_instance_guid_index
```
Means that the query to obtain the binding list now uses this index, and it uses the
natural order of that index, which is by service_instance_guid
rather than previously which would have been the natural order by id.
This change restores the previous behaviour by explicitly specifying the
ordering.1 parent 2feeac5 commit 9cf1846
File tree
2 files changed
+20
-1
lines changed- app/models/services
- spec/unit/presenters/system_environment
2 files changed
+20
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
143 | 161 | | |
144 | 162 | | |
145 | 163 | | |
| |||
0 commit comments