Implicit ordering of map elements in a scenario
- Dominant language
- C#
- Stars
- 1.1k
- Forks
- 111
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 3
Description
For various reasons, I wrote a filter in python that would read a yaml file and write the same (or modified) yaml file, which would then be used as the configuration input to crank coordinator.
It seems that the order of callouts in the scenario's map is important.
A working scenarios is, for example https://github.com/aspnet/Benchmarks/blob/7bd91967745c974d5fc6ccd1640296d439475793/src/BenchmarksApps/Kestrel/PlatformBenchmarks/platform.benchmarks.yml#L67
scenarios:
single_query:
db: ...
application: ...
load: ...
This ordering works. The db is spun up first, then the application that will talk with the db (using the connection string, which I had a mistaken concern was being modified), then the load.
But, of course single_query is a map, so the call-out ordering of keys should not matter.
However, the python filter will print out the key:value pairs in a map in key-alphabetical order. This results in the enumeration order application: db: load: which for crank's apparent iteration order is the *wrong* order for the whole stack, The application starts before the db.
If this were a Makefile, I'd say there was one or more dependencies missing :)
Contributor guide
Assessment
This issue has not been assessed yet.