eclipse-score / eclipse-score/orchestrator

Bug: OrchProgramManager stores programs in reversed order

Open
#60 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
5
Forks
18
Avg merge
15h 58m
Merged PRs (30d)
1

Description

Original report: https://github.com/qorix-group/inc_orchestrator_internal/issues/382
----

### Describe the bug:

Programs added to the design are stored in reversed order.

### Steps to reproduce the behavior:
1. Checkout `git switch piotrkorkus_complex_graphs`
2. `cd component_integration_tests/rust_test_scenarios`
3. `cargo run -- --name orchestration.graphs.integration_graph --input '{"runtime": {"task_queue_size": 256, "workers": 4}, "test":{"design_name":"two_programs"}}'`

### Observed behavior:
```
Programs: PolymorphicVec { capacity: 2, len: 2 content: [ Program - GraphDesignProgram2
Body:
|-LocalGraphAction - Tag(id:8572010998622897224, str: orch::internal::graph)
|node 0 { indegree: 0, edges: [1] }
|node 1 { indegree: 1, edges: [2] }
|node 2 { indegree: 1, edges: [] }
, Program - GraphDesignProgram
Body:
|-LocalGraphAction - Tag(id:8572010998622897224, str: orch::internal::graph)
|node 0 { indegree: 0, edges: [1] }
|node 1 { indegree: 1, edges: [] }
] }
```
GraphDesignProgram2 is on index 0 and GraphDesignProgram index 1. They were created in order: GraphDesignProgram, GraphDesignProgram2.

### Expected behavior
When iterating over `program_manager.get_programs()` programs should keep the order they were pushed to the vector containing them.

### Occurrence:

Always
### Attachments / Logs:

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.