[WIP] feat : Add logic in manager to monitor Pending PipelineRuns and run them#93
Conversation
- Add method in manager.go to list all PipelineRuns in Pending status every 5 seconds - as of now all pending PipelineRuns would be started immediately. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Signed-off-by: Rohan Kumar <rohaan@redhat.com>
8cd20fd to
b31b448
Compare
| DefaultPipelineRunSyncInterval = 5 * time.Second | ||
| ) | ||
|
|
||
| type BareMetalMachineConfig struct { |
There was a problem hiding this comment.
I guess it is too early but this logic (hard part of the logic) should be on its own package...the manager should kept as much clean as possible
There was a problem hiding this comment.
I apologize for the messy state of this PR. It's still in a poc-ish state.
Let me at least move this portion to a separate package.
There was a problem hiding this comment.
yeah yean no need to apologies, I saw the WIP you can keep it as much messy as you want till it works and you start to cleanup it up.
Just went through it and added the comment. Feel free to manage it whenever you want not right now
There was a problem hiding this comment.
I've reorganized the code into a separate package named autoscheduling (not 100% sure about the naming)
pkg/manager/autoscheduling
├── baremetal.go # Handles connection and status retrieval for QE lab instances
└── pipelinerun_manager.go # Manages status updates for Pending/Completed PipelineRuns Let me know your thoughts on the package structure and naming.
There was a problem hiding this comment.
Yeah that seems perfect, may I even reduce the name to scheduling or scheduler and then inside the type of resource scheduled in this case pipelines but totally up to you.
Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…nstead of environment variables Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…stion Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Description
manager.goto list all PipelineRuns in Pending status every 5 secondsThis PR is based on my discussion with @albfan :
Signed-off-by: Rohan Kumar rohaan@redhat.com