From a395afbab090122ad49793a64a6a85f7cecdd62c Mon Sep 17 00:00:00 2001 From: Jalander Ramagiri Date: Sat, 26 Nov 2022 17:36:24 +0000 Subject: [PATCH 1/2] adding a file reorder-waiting-executions --- rfc/reorder-waiting-executions.md | 116 ++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 rfc/reorder-waiting-executions.md diff --git a/rfc/reorder-waiting-executions.md b/rfc/reorder-waiting-executions.md new file mode 100644 index 0000000..fc3c7a9 --- /dev/null +++ b/rfc/reorder-waiting-executions.md @@ -0,0 +1,116 @@ +# _Re-ordering waiting executions of a Pipeline_ + +_**IMPORTANT**: Fill in and remove all italicized text before submission. +If a section is not applicable, remove it._ + +| | | +|-|-| +| **Status** | _**Proposed**, Accepted, Implemented, Obsolete_ | +| **RFC #** | _Update after PR has been made_ | +| **Author(s)** | _Jalander Ramagiri (`@rjalander`)_ +| **SIG / WG** | _Applicable SIG(s) or Working Group(s)_ | + + +## Overview + +_Curreently the waiting execuitions of a pipelines runs in FIFO order. But due to certain project urgencies and release purpose, we quite often need to change the executions order of a pipeline._ + +_Implementing the Re-order functionality helps to run the waiting executions in the order the user wants_ + +### Goals and Non-Goals + +Goals: + +_Introduce an option through Spin CLI and Spinnaker dashboard(GUI) to move the specific waiting execution of a Pipeline towards UP/DOWN or Top/Bottom from the current position, which is set in FIFO order by default_ + +_What problems are not not trying to solve?_ + +## Motivation and Rationale + +_Currently it is not possible If the user wants to prioritize specific execution of a pipeline. Adding Re-order feature from CLI/GUI will help end-users and operators to change the priority order of a waiting execution for release purpose or any project urgencies._ + + +## Timeline +_The code for CLI command reorder implementation is almost ready for review. +Plannig to implement this feature in two Phases._ + +_Phase-1: completing CLI command implementaion and make this feature available for customers to use and work on feedback if any._ + +_Phase-2: Implemeting GUI for reorder functionality by using the backend that is available from CLI reorder implementaion in Phase-1._ + +_Proposed timeline for Phase-1 whould be 1-2 weeks as this feature is demoed for some users and got the feedback. +Phase-2 would be 3-4 weeks as there are some existing issues in the waiting executions area of Spinnaker dashboard that needs to be fixed._ + +## Design + +_The Re-ordering waiting executions of a pipeline can be done through Spin CLI command and Spin dashboard._ + +_Introducing a new CLI command for reorder functionality of a waiting executions, the command will be used to Re-order waiting execution to UP/DOWN or Top/Bottom based on the current position of the provided execution._ + +_Example Spin CLI Command_ + >>spin pipeline execution reorder --execution-id 01GJQ601MC3SBACVNZB0XC5GHJ --reorder-action UP + +_New buttons will be added in Spinnaker dashboard(GUI) for each waiting execution to move the specific execution towrds UP/Down or Top/Bottom based on the current position of the execution._ + +_New Gate API endpoint will be created for external access_ +>>:8084/pipelines//reorder?reorderAction= + +_New Orca API endpoint will be created to access the same way +>>:8083/pipelines//reorder?reorderAction= + +_The main business logic of the feature lies in Spin Orca service, where the **CompoundExecutionOperator** will update the Redis repo using the class **RedisExecutionRepository** and update the pending executions to the user selected position in the Redis repo using the Class **RedisPendingExecutionService** + +**_Note_** + +_The Re-ordering will not be done for the executions which are not in Waiting state, an appropriate error message should be displayed._ + +_In the Spinnaker dashboard(GUI), only the waiting executions should have buttons to reorder, buttons should be removed once the execution is started._ + + +### Dependencies + +_This proposal depends on existing services Spin CLI, Spin Deck, Spin Gate and Spin Orca_ +_No new dependencies are needed, existing systems will be sufficient to implement this feature_ + +## Drawbacks + +_Currently there is no Re-order functionality of an execution_ +_Why should we **not** do this?_ + +## Prior Art and Alternatives + +_What other approaches did you consider?_ +_What existing solutions are close but not quite right?_ +_How will this project replace or integrate with the alternatives?_ + +## Known Unknowns + +_What parts of the design do you expect to resolve through the RFC process?_ +_What parts of the design do you expect to resolve through implementation before stabilization?_ +_What related issues do you consider out of scope for this RFC that could be addressed in the future?_ + +## Security, Privacy, and Compliance + +_What security/privacy/compliance aspects should be considered?_ + +_If you are not certain, never assume there aren't any._ +_Always talk to the Security SIG or Technical Oversight Committee._ + +## Operations + +_Are you adding any new, regular human processes, or extra work for any users?_ +_What telemetry is needed to verify correct behavior?_ +_What tooling needs to be introduced for on-going support?_ + +## Risks + +_What known risks exist?_ +_What factors may complicate your project?_ + +_Include: security, complexity, compatibility, latency, service immaturity, lack of team expertise, etc._ + +## Future Possibilities + +_What are the natural extensions and evolution of this RFC that would affect the project as a whole?_ + +_Feel free to dump ideas here, they're meant to get wheels turning, and won't affect the outcome of the approval process._ From b9beab77582369b237f81a5f2c9e47ad5db79b65 Mon Sep 17 00:00:00 2001 From: Jalander Ramagiri Date: Mon, 28 Nov 2022 13:34:32 +0000 Subject: [PATCH 2/2] Adding content --- rfc/reorder-waiting-executions.md | 58 +++++++++++++++---------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/rfc/reorder-waiting-executions.md b/rfc/reorder-waiting-executions.md index fc3c7a9..6e67d0a 100644 --- a/rfc/reorder-waiting-executions.md +++ b/rfc/reorder-waiting-executions.md @@ -13,7 +13,7 @@ If a section is not applicable, remove it._ ## Overview -_Curreently the waiting execuitions of a pipelines runs in FIFO order. But due to certain project urgencies and release purpose, we quite often need to change the executions order of a pipeline._ +_Currently the waiting executions of a pipeline runs in FIFO order. But due to certain project urgencies and release purpose, we quite often need to change the executions order of a pipeline._ _Implementing the Re-order functionality helps to run the waiting executions in the order the user wants_ @@ -32,13 +32,13 @@ _Currently it is not possible If the user wants to prioritize specific execution ## Timeline _The code for CLI command reorder implementation is almost ready for review. -Plannig to implement this feature in two Phases._ +Planning to implement this feature in two Phases._ -_Phase-1: completing CLI command implementaion and make this feature available for customers to use and work on feedback if any._ +_Phase-1: completing CLI command implementation and make this feature available for customers to use and work on feedback if any._ -_Phase-2: Implemeting GUI for reorder functionality by using the backend that is available from CLI reorder implementaion in Phase-1._ +_Phase-2: Implementing GUI for reorder functionality by using the backend that is available from CLI reorder implementation in Phase-1._ -_Proposed timeline for Phase-1 whould be 1-2 weeks as this feature is demoed for some users and got the feedback. +_Proposed timeline for Phase-1 would be 1-2 weeks as this feature is demoed for some Spinnaker users and got the feedback. Phase-2 would be 3-4 weeks as there are some existing issues in the waiting executions area of Spinnaker dashboard that needs to be fixed._ ## Design @@ -50,15 +50,17 @@ _Introducing a new CLI command for reorder functionality of a waiting executions _Example Spin CLI Command_ >>spin pipeline execution reorder --execution-id 01GJQ601MC3SBACVNZB0XC5GHJ --reorder-action UP -_New buttons will be added in Spinnaker dashboard(GUI) for each waiting execution to move the specific execution towrds UP/Down or Top/Bottom based on the current position of the execution._ +_New buttons will be added in Spinnaker dashboard(GUI) for each waiting execution to move the specific execution towards UP/Down or Top/Bottom based on the current position of the execution._ _New Gate API endpoint will be created for external access_ >>:8084/pipelines//reorder?reorderAction= -_New Orca API endpoint will be created to access the same way +_New Orca API endpoint will be created to access the same way_ >>:8083/pipelines//reorder?reorderAction= -_The main business logic of the feature lies in Spin Orca service, where the **CompoundExecutionOperator** will update the Redis repo using the class **RedisExecutionRepository** and update the pending executions to the user selected position in the Redis repo using the Class **RedisPendingExecutionService** +_The main business logic of the feature lies in Spin Orca service, where the **CompoundExecutionOperator** will update the Redis repo using the existing class **RedisExecutionRepository** and update the pending executions to the user selected position in the Redis repo using the Class **RedisPendingExecutionService**._ + +_A new handler class **ReorderWaitingExecutionHandler** will be created in orca-queue handler package, to handle the reorder of a waiting execution._ **_Note_** @@ -69,7 +71,8 @@ _In the Spinnaker dashboard(GUI), only the waiting executions should have button ### Dependencies -_This proposal depends on existing services Spin CLI, Spin Deck, Spin Gate and Spin Orca_ +_This proposal depends on existing services Spin CLI, Spin Deck, Spin Gate and Spin Orca._ + _No new dependencies are needed, existing systems will be sufficient to implement this feature_ ## Drawbacks @@ -79,38 +82,35 @@ _Why should we **not** do this?_ ## Prior Art and Alternatives -_What other approaches did you consider?_ -_What existing solutions are close but not quite right?_ -_How will this project replace or integrate with the alternatives?_ +_There is an alternate method that can be followed by cancelling all the running pipelines and Re-run the executions one after another in the right order in which the user wants. But this is a tedious process to run for every time to change the order of executions._ + +_This feature will help the user to re-order the executions any number of times until they are in waiting state._ + ## Known Unknowns -_What parts of the design do you expect to resolve through the RFC process?_ -_What parts of the design do you expect to resolve through implementation before stabilization?_ -_What related issues do you consider out of scope for this RFC that could be addressed in the future?_ +**Knowns** -## Security, Privacy, and Compliance +_Will be implementing re-order feature using CLI/GUI for a waiting executions of a pipeline_ + +_Re-order with CLI will be implemented and released first to stabilize the features_ -_What security/privacy/compliance aspects should be considered?_ +**Unknowns** -_If you are not certain, never assume there aren't any._ -_Always talk to the Security SIG or Technical Oversight Committee._ +_The current implementation uses RedisPendingExecutionService and need to check on the requirement of implementing different pending execution services like DualPendingExecutionService, InMemoryPendingExecutionService and SqlPendingExecutionService._ + +## Security, Privacy, and Compliance + +_As this feature is plugin to the existing component, need to check the security aspects with Security SIG or Technical Oversight Committee._ ## Operations -_Are you adding any new, regular human processes, or extra work for any users?_ -_What telemetry is needed to verify correct behavior?_ -_What tooling needs to be introduced for on-going support?_ +_A new CLI will be created to re-order the waiting executions, that user can run using Spin CLI_ +_And waiting executions in GUI will have an additional option/button to re-order the executions_ ## Risks -_What known risks exist?_ -_What factors may complicate your project?_ - -_Include: security, complexity, compatibility, latency, service immaturity, lack of team expertise, etc._ +_What happens If this feature not implemented with other pending executions services like DualPendingExecutionService, InMemoryPendingExecutionService and SqlPendingExecutionService._ ## Future Possibilities -_What are the natural extensions and evolution of this RFC that would affect the project as a whole?_ - -_Feel free to dump ideas here, they're meant to get wheels turning, and won't affect the outcome of the approval process._