Skip to content

Bug: OrchProgramManager stores programs in reversed order #60

@PiotrKorkus

Description

@PiotrKorkus

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<orchestration::program::Program, iceoryx2_bb_memory::heap_allocator::HeapAllocator> { 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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    In Progress

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions